root/branches/renetcolSMP/configure.in @ 164

Revision 164, 4.0 KB (checked in by andreu, 10 years ago)

first SMP imp

  • Property svn:eol-style set to native
RevLine 
[5]1#                                               -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.59)
[164]5AC_INIT(RENETCOLSMP, 0.0.1beta, andreu@renater.fr)
[5]6AC_CONFIG_SRCDIR(src/)
7AC_PROG_MAKE_SET
[8]8AM_CONFIG_HEADER(config.h)
[5]9AM_INIT_AUTOMAKE
[47]10CFLAGS="-I/usr/local/include -g -ansi -Wno-long-long -Wall -D _SVID_SOURCE -DSIGSETJMP_IS_BROKEN -D _XOPEN_SOURCE -pedantic"
[20]11
[29]12CFLAGS_OPTIMIZE="-O2"
[60]13CFLAGS_ASACC="-DASACC"
[59]14CFLAGS_IPV4AGGIDSNMP="-DIPV4AGGIDSNMP"
[94]15CFLAGS_IPV6AGGIDSNMP="-DIPV6AGGIDSNMP"
[95]16CFLAGS_IPV6LINKAGG="-DIPV6LINKAGG"
[59]17CFLAGS_IPV4AGGIDR="-DIPV4AGGIDR"
18CFLAGS_MATRIX="-DMATRIX"
[28]19CFLAGS_DEBUG="-DDEBUG"
[29]20CFLAGS_DEBUGAGG="-DDEBUGAGG"
[32]21CFLAGS_PRINTUNKNOWNSUBNET="-DPRINTUNKNOWNSUBNET"
[83]22CFLAGS_MULTISAMPLING="-DMULTISAMPLING"
[111]23CFLAGS_READFROMFILE="-DREADFROMFILE -lpcap"
[83]24
[5]25# Checks for programs.
26AC_PROG_CC
27
28# Checks for header files.
29AC_HEADER_STDC
30AC_CHECK_HEADERS([unistd.h stdio.h string.h stdlib.h syslog.h sys/types.h sys/socket.h netinet/in.h time.h errno.h sys/ipc.h sys/shm.h sys/sem.h ctype.h netdb.h net/if.h sys/ioctl.h arpa/inet.h signal.h setjmp.h sys/wait.h])
31
32# Checks for typedefs, structures, and compiler characteristics.
33AC_C_CONST
34AC_STRUCT_TM
35AC_C_VOLATILE
36AC_TYPE_SIZE_T
37
[109]38AC_ARG_ENABLE(ipv4aggidsnmp,[  --enable-ipv4aggidsnmp aggregation for IPv4 prefix, localisation based on SNMP ID=yes],
39ipv4aggidsnmp=$enableval,ipv4aggidsnmp=yes)
40if test $ipv4aggidsnmp = yes ; then
41CFLAGS="$CFLAGS $CFLAGS_IPV4AGGIDSNMP"
[29]42fi
43
[109]44AC_ARG_ENABLE(ipv4aggidr,[  --enable-ipv4aggidr aggregation for IPv4 prefix=no, flow localisation by routeur identification, if yes, enable-ipv4aggsnmp MUST be NO],
45ipv4aggidr=$enableval,ipv4aggidr=no)
46if test $ipv4aggidr = yes ; then
47CFLAGS="$CFLAGS $CFLAGS_IPV4AGGIDR"
48fi
49
50AC_ARG_ENABLE(multisampling,[  --enable-multisampling Multi-Sampling mode=no],
51multisampling=$enableval,multisampling=no)
52if test $multisampling = yes ; then
53CFLAGS="$CFLAGS $CFLAGS_MULTISAMPLING"
54fi
55
[111]56AC_ARG_ENABLE(readfromfile,[  --enable-readfromfile Read NDE from pcap FILE mode=no],
57readfromfile=$enableval,readfromfile=no)
58if test $readfromfile = yes ; then
59CFLAGS="$CFLAGS $CFLAGS_READFROMFILE"
60fi
61
[60]62AC_ARG_ENABLE(asacc,[  --enable-asacc AS accounting default=no],
63asacc=$enableval,asacc=no)
64if test $asacc = yes ; then
65CFLAGS="$CFLAGS $CFLAGS_ASACC"
66fi
67
68AC_ARG_ENABLE(matrix,[  --enable-matrix inter pop matrix default=no],
[59]69matrix=$enableval,matrix=no)
70if test $matrix = yes ; then
71CFLAGS="$CFLAGS $CFLAGS_MATRIX"
[22]72fi
73
[109]74AC_ARG_ENABLE(optimize,[  --enable-optimize gcc O2 option compilation default=no],
75optimize=$enableval,optimize=no)
76if test $optimize = yes ; then
77CFLAGS="$CFLAGS $CFLAGS_OPTIMIZE"
[59]78fi
79
[95]80AC_ARG_ENABLE(ipv6aggidsnmp,[  --enable-ipv6aggidsnmp aggregation for IPv6 prefix, localisation based on SNMP ID=no],
81ipv6aggidsnmp=$enableval,ipv6aggidsnmp=no)
[94]82if test $ipv6aggidsnmp = yes ; then
83CFLAGS="$CFLAGS $CFLAGS_IPV6AGGIDSNMP"
84fi
85
[95]86AC_ARG_ENABLE(ipv6linkagg,[  --enable-ipv6linkagg aggregation for IPv6 link agg (based on SNMP ID)=no],
87ipv6linkagg=$enableval,ipv6linkagg=no)
88if test $ipv6linkagg = yes ; then
89CFLAGS="$CFLAGS $CFLAGS_IPV6LINKAGG"
90fi
91
[28]92AC_ARG_ENABLE(debug,[  --enable-debug Debug mode definition=no],
93debug=$enableval,debug=no)
94if test $debug = yes ; then
95CFLAGS="$CFLAGS $CFLAGS_DEBUG"
[22]96fi
97
[29]98AC_ARG_ENABLE(debugagg,[  --enable-debugagg Debug Agg mode definition=no],
99debugagg=$enableval,debugagg=no)
100if test $debugagg = yes ; then
101CFLAGS="$CFLAGS $CFLAGS_DEBUGAGG"
102fi
103
[32]104AC_ARG_ENABLE(printunknownsubnet,[  --enable-printunknownsubnet Print Subnets who are not registered in subnet configuration file=no],
105printunknownsubnet=$enableval,printunknownsubnet=no)
106if test $printunknownsubnet = yes ; then
107CFLAGS="$CFLAGS $CFLAGS_PRINTUNKNOWNSUBNET"
108fi
109
[20]110AC_SUBST(CFLAGS)
111
[5]112# Checks for library functions.
113AC_FUNC_MALLOC
[94]114AC_CHECK_FUNCS([getpass inet_ntoa inet_pton memset socket strerror strspn])
[5]115AC_CHECK_FUNCS([mempcpy perror syslog sscanf signal malloc strcpy ntohl])
116AC_CHECK_FUNCS([strncmp strtok memcpy getaddrinfo gai_strerror sendto])
117AC_CONFIG_FILES([Makefile
118                 src/Makefile])
[20]119
120
[5]121AC_OUTPUT
Note: See TracBrowser for help on using the browser.