ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/hopm/trunk/configure.ac
Revision: 5061
Committed: Mon Dec 22 14:00:18 2014 UTC (9 years, 3 months ago) by michael
Content type: application/pkix-attr-cert
File size: 2996 byte(s)
Log Message:
- Update configure.ac to reflect name change to hopm

File Contents

# Content
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(hopm, [1.0.0beta1])
3 AC_CONFIG_SRCDIR(src/opercmd.h)
4 AM_CONFIG_HEADER(src/setup.h)
5 AM_INIT_AUTOMAKE()
6 AC_PREFIX_DEFAULT([\${HOME}/hopm])
7 AM_MAINTAINER_MODE
8
9 AC_ARG_WITH(extra-fascism,
10 AC_HELP_STRING([--with-extra-fascism],
11 [Add extra gcc3-specific warning flags]),
12 [CFLAGS="$CFLAGS -g -O0 -W -Wall -Wfloat-equal -Wbad-function-cast -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs"])
13
14 dnl ipv6?
15 dnl AC_ARG_ENABLE(ipv6,
16 dnl AC_HELP_STRING([--enable-ipv6], [Enable IPV6 support]),
17 dnl [ac_cv_ipv6=$enableval], [ac_cv_ipv6="no"])
18
19 dnl AC_MSG_CHECKING([whether to enable IPv6 features])
20
21 dnl if test "$ac_cv_ipv6" = "yes" ; then
22 dnl AC_DEFINE(IPV6, 1, [Use Ipv6 Support])
23 dnl AC_MSG_RESULT([yes])
24 dnl else
25 dnl AC_MSG_RESULT([no])
26 dnl fi
27
28 dnl Checks for programs.
29 AC_PROG_CC_C99
30 AS_IF([test "$ac_cv_prog_cc_c99" = "no"],
31 [AC_MSG_ERROR([no suitable C99 compiler found. Aborting.])])
32 AC_PROG_LIBTOOL
33
34 dnl Checks for libraries.
35
36 dnl Checks for header files.
37 AC_HEADER_STDC
38
39 AC_CHECK_HEADERS(sys/poll.h, have_poll_sys_h=yes, have_sys_poll_h=no)
40
41 AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h strings.h)
42
43 dnl Checks for typedefs, structures, and compiler characteristics.
44 AC_C_CONST
45 AC_TYPE_SIZE_T
46 AC_HEADER_TIME
47 AC_STRUCT_TM
48
49 dnl Checks for library functions.
50 AC_TYPE_SIGNAL
51 AC_FUNC_STRFTIME
52
53 dnl check for yacc
54 AC_PROG_INSTALL
55 AC_PROG_YACC
56
57 dnl check for lexx
58 AM_PROG_LEX
59
60 dnl check if we need -lsocket or -lnsl
61 ETR_SOCKET_NSL
62
63 AC_CHECK_FUNCS(inet_aton inet_pton socket strdup strstr)
64
65 dnl Check if we can use gethostbyname2 for ipv6
66 AC_CHECK_FUNCS(gethostbyname gethostbyname2)
67
68 dnl AIX fun
69 AC_C_BIGENDIAN
70
71 AC_CHECK_SIZEOF(int)
72 AC_CHECK_SIZEOF(short)
73 AC_CHECK_SIZEOF(long)
74
75
76 AH_BOTTOM([
77 #if SIZEOF_INT==4
78 typedef signed int int32;
79 typedef unsigned int uint32;
80 #elif SIZEOF_LONG==4
81 typedef signed long int32;
82 typedef unsigned long uint32;
83 #else
84 # error "No 32-bit integer type!"
85 #endif
86
87 #if SIZEOF_SHORT!=2
88 # error "Your short int data type is not 2 bytes: hopm (firedns) is not going to work for you."
89 #endif
90 ])
91
92 AC_CONFIG_SUBDIRS(src/libopm)
93
94 dnl This comes last because configure won't actually work with -Werror in
95 dnl the CFLAGS
96 AC_ARG_WITH(werror,
97 AC_HELP_STRING([--with-werror],
98 [use -Werror to abort compilation on any warning]),
99 [CFLAGS="$CFLAGS -Werror"])
100
101 AC_OUTPUT(Makefile src/Makefile)
102
103
104 echo "##############################################################################"
105 echo "Everything is now configured, but you can find some more (infrequently"
106 echo "changed) options in options.h. To compile HOPM now, just type make. It"
107 echo "requires GNU Make, which may be installed as gmake on your system."
108 echo
109 echo "hopm will be installed in ${prefix}. To change this, run:"
110 echo " ./configure --prefix=DIRECTORY"
111 echo "##############################################################################"