Develop and Download Open Source Software

Browse CVS Repository

Contents of /canna/canna/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.15 - (show annotations) (download)
Sat Dec 27 16:41:10 2003 UTC (20 years, 3 months ago) by aida_s
Branch: MAIN
CVS Tags: before_new_zipcode, after_new_zipcode, HEAD
Changes since 1.14: +2 -1 lines
* mkrelease.sh: always use autoconf 2.59
* configure.ac: add proper arguments of AC_INIT and RCSID
* ChangeLog: correct previous commit date

1 # Process this file with autoconf to produce a configure script.
2 AC_INIT([canna], [3.8devel1], [canna-dev@lists.sourceforge.jp])
3 AC_CONFIG_SRCDIR([WHATIS.jp])
4 AC_CONFIG_HEADER([accanna.h])
5
6 if test "x$IN_MAKE" != xyes; then
7 AC_MSG_ERROR([You cannot invloke configure directly.])
8 fi
9
10 # Checks for programs.
11 AC_PROG_CC
12
13 # Checks for libraries.
14
15 # Checks for header files.
16 AC_HEADER_STDC
17 AC_CHECK_HEADERS([fcntl.h locale.h memory.h netdb.h netinet/in.h stddef.h stdlib.h string.h]dnl
18 [strings.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h sys/timeb.h syslog.h unistd.h]dnl
19 [sys/select.h arpa/inet.h])
20
21 # Checks for typedefs, structures, and compiler characteristics.
22 AC_C_CONST
23 AC_TYPE_OFF_T
24 AC_TYPE_SIZE_T
25 AC_HEADER_TIME
26 AC_STRUCT_TM
27
28 # Checks for library functions.
29 AC_FUNC_FORK
30 AC_PROG_GCC_TRADITIONAL
31 AC_FUNC_MALLOC
32 AC_FUNC_MEMCMP
33 AC_FUNC_MMAP
34 AC_FUNC_SETPGRP
35 AC_TYPE_SIGNAL
36 AC_FUNC_STAT
37 AC_FUNC_VPRINTF
38 AC_CHECK_FUNCS([bzero dup2 gethostbyaddr gethostbyname gethostname inet_ntoa isascii memchr]dnl
39 [memset mkdir munmap select setlocale socket strchr strdup strrchr strspn]dnl
40 [index bcopy memcpy setsid rename FD_ISSET strlcpy syslog vsyslog inet_aton] )
41
42 AC_CHECK_TYPES([fd_set],,,[dnl
43 #include <sys/types.h>
44 #ifdef HAVE_SYS_SELECT_H
45 # include <sys/select.h>
46 #endif
47 ])
48 AC_CHECK_TYPES([int32_t],,,[dnl
49 #if defined(HAVE_INTTYPES_H)
50 # include <inttypes.h>
51 #elif defined(HAVE_STDINT_H)
52 # include <stdint.h>
53 #else
54 # include <sys/types.h>
55 #endif
56 ])
57 AC_CHECK_TYPES([time_t])
58 AC_CHECK_TYPES([in_addr_t],,,[dnl
59 #include <sys/types.h>
60 #include <netinet/in.h>
61 ])
62 AC_CHECK_TYPES([socklen_t],,,[dnl
63 #include <sys/types.h>
64 #ifdef HAVE_SYS_SOCKET_H
65 # include <sys/socket.h>
66 #endif
67 ])
68 AC_CHECK_SIZEOF([void *])
69 AC_CHECK_MEMBERS([struct hostent.h_addr_list],,,[#include <netdb.h>])
70 AC_CONFIG_FILES([])
71
72 dnl PUBCONF_DEFINE(NAME,VALUE)
73 define([PUBCONF_PREFIX],[CANNA_])
74 AC_DEFUN([PUBCONF_DEFINE],[dnl
75 cat << PUBCONF_EOF >> "$pubconf_tmp"
76 [#]define PUBCONF_PREFIX[$1] [$2]
77 PUBCONF_EOF[]dnl
78 ])
79 dnl PUBCONF_NOTDEF(NAME)
80 AC_DEFUN([PUBCONF_NOTDEF],[dnl
81 echo "/* [#]undef PUBCONF_PREFIX[$1] */" >> "$pubconf_tmp"[]dnl
82 ])
83 dnl PUBCONF_DEFINE_IF(NAME,COND)
84 AC_DEFUN([PUBCONF_DEFINE_IF],[dnl
85 if [$2]; then
86 PUBCONF_DEFINE([$1],1)
87 else
88 PUBCONF_NOTDEF([$1])
89 fi
90 ])
91 dnl PUBCONF_DEFINE_YESNO(NAME,VAR)
92 AC_DEFUN([PUBCONF_DEFINE_YESNO],[PUBCONF_DEFINE_IF([$1],[test "x$][$2" = xyes])])
93
94 AC_CONFIG_COMMANDS([pubconf.h],[
95 pubconf_hdr="pubconf.h"
96 pubconf_tmp="$pubconf_hdr.tmp"
97 AC_MSG_NOTICE([creating "$pubconf_hdr"])
98
99 cat << PUBCONF_EOF > "$pubconf_tmp"
100 /* Generated file. Modify "configure.ac" instead of this file. */
101 #ifndef CANNA_PUBCONF_H
102 #define CANNA_PUBCONF_H
103
104 PUBCONF_EOF
105
106 PUBCONF_DEFINE_YESNO([HAVE_INTTYPES_H],[pubconf_header_inttypes_h])
107 PUBCONF_DEFINE_YESNO([HAVE_STDINT_H],[pubconf_header_stdint_h])
108 PUBCONF_DEFINE_YESNO([HAVE_INT32_T],[pubconf_type_int32_t])
109
110 cat << PUBCONF_EOF >> "$pubconf_tmp"
111
112 #endif /* CANNA_PUBCONF_H */
113 PUBCONF_EOF
114
115 if cmp -s "$pubconf_hdr" "$pubconf_tmp"; then
116 AC_MSG_NOTICE(["$pubconf_hdr" is unchanged])
117 rm "$pubconf_tmp"
118 else
119 mv "$pubconf_tmp" "$pubconf_hdr"
120 fi
121 ],[
122 m4_foreach([Var],[header_inttypes_h,header_stdint_h,type_int32_t],[dnl
123 [pubconf_]Var="[$ac_cv_]Var"
124 ])
125 ])
126
127 AC_OUTPUT
128 # $Id$

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26