root/trunk/configure.in

Revision 41, 1.7 kB (checked in by jesus, 8 years ago)

autoconf support

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 AC_INIT(spreadlogd.c)
2 AC_CONFIG_HEADER(sld_config.h)
3 AC_PROG_CC
4 AC_C_BIGENDIAN
5 AC_PROG_CPP
6 AC_PROG_INSTALL
7 AC_PROG_RANLIB
8 AC_PROG_LN_S
9 AC_PROG_YACC
10 AC_PROG_LEX
11
12 AC_PATH_PROGS(PERL, perl)
13 AC_PATH_PROG(AR, ar)
14 AC_SUBST(PERL)
15 AC_C_INLINE
16
17 # large file support
18 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE"
19
20 AC_CHECK_LIB(nsl, gethostbyaddr, , )
21 AC_CHECK_LIB(socket, socket, , )
22 AC_CHECK_LIB(dl, dlopen, , )
23 AC_CHECK_LIB(event, event_del, , AC_MSG_ERROR([****** needs libevent]))
24 AC_CHECK_LIB(spread, SP_receive, , )
25 AC_CHECK_LIB(gnuregex, regex_compile, , )
26 if test "x$ac_cv_lib_spread_SP_receive" != "xyes"; then
27         AC_CHECK_LIB(sp, SP_receive, ,
28                 AC_MSG_ERROR([****** needs Spread libraries]))
29 fi
30 AC_CHECK_HEADERS([ \
31         arpa/inet.h arpa/nameser.h assert.h ctype.h dlfcn.h errno.h \
32         fcntl.h gnuregex.h limits.h netinet/in.h signal.h stdint.h stdio.h \
33         stdlib.h string.h sys/cdefs.h sys/filio.h sys/ioctl.h sys/socket.h \
34         sys/sockio.h sys/time.h sys/types.h sys/uio.h time.h unistd.h \
35 ])
36 AC_CHECK_HEADER(sp.h)
37 if test "x$ac_cv_header_sp_h" = "xno"; then
38         AC_MSG_ERROR([****** needs Spread's sp.h])
39 fi
40 AC_CHECK_HEADER(event.h)
41 if test "x$ac_cv_header_event_h" = "xno"; then
42         AC_MSG_ERROR([****** needs libevent's event.h])
43 fi
44
45 # Checks for data types
46 AC_CHECK_SIZEOF(char, 1)
47 AC_CHECK_SIZEOF(short int, 2)
48 AC_CHECK_SIZEOF(int, 4)
49 AC_CHECK_SIZEOF(long int, 4)
50 AC_CHECK_SIZEOF(long long int, 8)
51 AC_CHECK_SIZEOF(void *, 1)
52
53 echo "Resolving configuration path..."
54 fullpath=$sysconfdir
55 while test "x$temppath" != "x$fullpath" ; do
56   temppath=$fullpath
57   fullpath=`eval echo ${fullpath}`
58 done
59 fullpath=`echo $fullpath | sed "s~NONE~$ac_default_prefix~"`
60 AC_DEFINE_UNQUOTED(ETCDIR, "${fullpath}")
61
62 AC_SUBST(ETCDIR)
63 AC_OUTPUT([Makefile])
Note: See TracBrowser for help on using the browser.