/[svn]/hopm/trunk/src/libopm/configure.ac
ViewVC logotype

Annotation of /hopm/trunk/src/libopm/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5062 - (hide annotations)
Mon Dec 22 14:07:15 2014 UTC (7 years, 9 months ago) by michael
File size: 3117 byte(s)
- Update configure.ac

1 michael 5052 dnl Process this file with autoconf to produce a configure script.
2     AC_INIT(libopm, [0.1])
3     AC_CONFIG_SRCDIR(src/libopm.h)
4     AM_CONFIG_HEADER(src/setup.h)
5     AM_INIT_AUTOMAKE()
6     AC_PREFIX_DEFAULT([/usr/local/libopm])
7     AM_MAINTAINER_MODE
8    
9     # for documentation purposes
10     DOX_DIR_HTML=api
11     DOX_DIR_LATEX=latex
12     DOX_DIR_MAN=man
13    
14     AC_SUBST(DOX_DIR_HTML)
15     AC_SUBST(DOX_DIR_LATEX)
16     AC_SUBST(DOX_DIR_MAN)
17    
18     AC_ARG_WITH(extra-fascism,
19     AC_HELP_STRING([--with-extra-fascism],
20     [add extra gcc3-specific warning flags]),
21     [CFLAGS="$CFLAGS -g -O0 -W -Wall -Wfloat-equal -Wbad-function-cast -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs"])
22    
23     dnl AC_ARG_WITH(faldo,
24     dnl AC_HELP_STRING([--with-faldo],
25     dnl [make some use of Nick Faldo]))
26    
27     dnl Checks for programs.
28 michael 5059 AC_PROG_CC_C99
29     AS_IF([test "$ac_cv_prog_cc_c99" = "no"],
30     [AC_MSG_ERROR([no suitable C99 compiler found. Aborting.])])
31 michael 5052 AC_PROG_LIBTOOL
32     AC_SUBST(LIBTOOL_DEPS)
33    
34     dnl check if we need -lsocket or -lnsl
35     ETR_SOCKET_NSL
36    
37     dnl Checks for header files.
38     AC_HEADER_STDC
39    
40     AC_CHECK_HEADERS(sys/poll.h, have_poll_sys_h=yes, have_sys_poll_h=no)
41    
42     AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h strings.h)
43    
44     dnl Checks for typedefs, structures, and compiler characteristics.
45     AC_C_CONST
46     AC_TYPE_SIZE_T
47     AC_HEADER_TIME
48    
49     dnl if they want select() or they don't have poll() then we need to check
50     dnl that we actually have select()
51     if test "$have_sys_poll_h" = "no"; then
52     AC_CHECK_FUNCS(select, have_select=yes, have_select=no)
53     if test "$have_select" = "no"; then
54     AC_MSG_ERROR([No select() implementation found])
55     fi
56     fi
57    
58     AC_CHECK_FUNCS(inet_aton inet_pton)
59    
60     dnl Check if we can use gethostbyname2 for ipv6
61     AC_CHECK_FUNCS(gethostbyname gethostbyname2)
62    
63     dnl AIX fun
64     AC_C_BIGENDIAN
65    
66 michael 5062 AC_CHECK_FUNC(getaddrinfo, [], AC_SEARCH_LIBS(getaddrinfo, nsl))
67     AC_CHECK_FUNC(getnameinfo, [], AC_SEARCH_LIBS(getnameinfo, nsl))
68     AC_SEARCH_LIBS([socket],[socket],,[AC_MSG_ERROR([socket library not found])])
69 michael 5052
70     dnl teehee - taken from MRTG / Tobias Oetiker
71     dnl if test "$with_faldo" != "no"; then
72     dnl echo $ECHO_N "checking for Nick Faldo $ECHO_C"
73     dnl for bleh in 1 2 3; do
74     dnl echo $ECHO_N "."
75     dnl sleep 1
76     dnl done
77     dnl AC_MSG_RESULT([ http://blitzed.org/advocacy/enjoy.jpg])
78     dnl fi
79    
80     LTLIBOBJS=`echo "$LIB@&t@OBJS" |
81     sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
82     AC_SUBST(LTLIBOBJS)
83    
84     dnl This comes last because configure won't actually work with -Werror in
85     dnl the CFLAGS
86     AC_ARG_WITH(werror,
87     AC_HELP_STRING([--with-werror],
88     [use -Werror to abort compilation on any warning]),
89     [CFLAGS="$CFLAGS -Werror"])
90    
91     AC_OUTPUT(Makefile src/Makefile doc/Makefile doc/Doxyfile)
92    
93     echo "##############################################################################"
94     echo "Everything is now configured. To compile libopm now, just type make. It"
95     echo "requires GNU Make, which may be installed as gmake on your system."
96     echo
97     echo "libopm will be installed in ${prefix}. To change this, run:"
98     echo " ./configure --prefix=DIRECTORY"
99     echo
100     echo "##############################################################################"
101     echo

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28