"Fossies" - the Fresh Open Source Software Archive

Member "bandwidthd-2.0.1/configure.in" (11 Jan 2005, 3754 Bytes) of package /linux/privat/old/bandwidthd-2.0.1.tgz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # Process this file with autoconf to produce a configure script.
    2 AC_INIT
    3 AC_CANONICAL_HOST
    4 
    5 AC_CONFIG_SRCDIR([bandwidthd.c])
    6 AC_CONFIG_HEADER([config.h])
    7 
    8 MAJOR_VERSION=2
    9 MINOR_VERSION=0
   10 RELEASE_VERSION=0
   11 EXTRA_VERSION=""
   12 VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION"
   13 
   14 # Checks for programs.
   15 AC_PROG_YACC
   16 AC_PROG_CC
   17 AC_PROG_INSTALL
   18 AC_PROG_LEX
   19 
   20 
   21 # May be required for libgd on bsd
   22 AC_PATH_X
   23 if test -n "$x_libraries" && test "x$x_libraries" != xNONE ; then
   24 	LDFLAGS="$LDFLAGS -L$x_libraries"
   25 fi
   26 
   27 # May be equired for BSD
   28 LDFLAGS="$LDFLAGS -L/usr/local/lib"
   29 
   30 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
   31 
   32 #Check for Darwin sw directory
   33 AC_CHECK_FILE(/sw/lib, LDFLAGS="$LDFLAGS -L/sw/lib")
   34 AC_CHECK_FILE(/sw/include, CPPFLAGS="$CPPFLAGS -I/sw/include")
   35 
   36 #Check for NetBSD usr/pkg directory
   37 AC_CHECK_FILE(/usr/pkg/lib, LDFLAGS="$LDFLAGS -L/usr/pkg/lib")
   38 AC_CHECK_FILE(/usr/pkg/include, CPPFLAGS="$CPPFLAGS -I/usr/pkg/include")
   39 
   40 # Required for solaris
   41 AC_CHECK_LIB(socket, connect)
   42 AC_CHECK_LIB(nsl, gethostbyname)
   43 AC_CHECK_LIB(resolv, inet_aton)
   44 
   45 # Required for openbsd png library
   46 AC_CHECK_LIB(m, pow)
   47 
   48 # Required for gd under netbsd
   49 AC_CHECK_LIB(iconv, libiconv_open)
   50 
   51 # Required Libraries
   52 AC_CHECK_LIB(png, png_read_info, ,[AC_MSG_ERROR([Bandwidthd requires but cannot libpng])])
   53 AC_CHECK_LIB(gd, gdImageCreate, ,[AC_MSG_ERROR([Bandwidthd requires but cannot find libgd])])
   54 AC_CHECK_LIB(pcap, pcap_open_live, ,
   55 	[AC_CHECK_LIB(wpcap, pcap_open_live, ,[AC_MSG_ERROR([Bandwidthd requires but cannot find libpcap])])])
   56 
   57 # Optional Library
   58 AC_CHECK_FILE(/usr/local/pgsql/lib, LDFLAGS="$LDFLAGS -L/usr/local/pgsql/lib")
   59 AC_CHECK_FILE(/usr/local/pgsql/include, CPPFLAGS="$CPPFLAGS -I/usr/local/pgsql/include")
   60 AC_CHECK_LIB(pq, PQconnectdb,
   61 	[AC_CHECK_LIB(pq,PQexecParams, ,AC_MSG_WARN([libpq exists but is too old... bandwidthd requires support for PQexecParams]))])
   62 
   63 # Checks for header files.
   64 AC_HEADER_DIRENT
   65 
   66 AC_CHECK_HEADERS([gd.h],,
   67 	[AC_CHECK_HEADERS([gd/gd.h],,
   68 		AC_MSG_ERROR([Bandwidthd cannot find gd.h]))])
   69 
   70 AC_CHECK_HEADERS(gdfonts.h,,
   71 	[AC_CHECK_HEADERS(gd/gdfonts.h,,
   72 		AC_MSG_ERROR([Bandwidthd cannot find gdfonts.h]))])
   73 
   74 AC_CHECK_HEADERS([pcap.h],,
   75 	[AC_MSG_ERROR([Bandwidthd cannot find pcap.h])])
   76 
   77 AC_CHECK_HEADERS([arpa/inet.h errno.h netdb.h netinet/in.h stddef.h stdlib.h string.h sys/socket.h sys/time.h sys/wait.h syslog.h unistd.h],,
   78 	[AC_MSG_ERROR([Bandwidthd cannot find some header files])])
   79 
   80 
   81 #Headers missing on cygwin
   82 AC_CHECK_HEADERS([arpa/nameser.h])
   83 AC_CHECK_HEADERS([resolv.h],,,
   84 	[#include <netinet/in.h>
   85 	#include <arpa/nameser.h>])
   86 
   87 
   88 # Checks for typedefs, structures, and compiler characteristics.
   89 AC_C_CONST
   90 AC_C_INLINE
   91 AC_TYPE_PID_T
   92 AC_TYPE_SIZE_T
   93 AC_STRUCT_TM
   94 
   95 TCPHDR_SPORT="undefined"
   96 AC_CHECK_MEMBER(struct tcphdr.source,TCPHDR_SPORT="source",,[#include "bandwidthd.h"])
   97 AC_CHECK_MEMBER(struct tcphdr.th_sport,TCPHDR_SPORT="th_sport",,[#include "bandwidthd.h"])
   98 if test "$TCPHDR_SPORT" = "undefined" ; then
   99 	AC_MSG_ERROR([Could not determine souce port field name for tcphdr structure])
  100 fi
  101 AC_DEFINE_UNQUOTED(TCPHDR_SPORT,$TCPHDR_SPORT,[source port field name in tcphdr])
  102 
  103 TCPHDR_DPORT="undefined"
  104 AC_CHECK_MEMBER(struct tcphdr.dest,TCPHDR_DPORT="dest",,[#include "bandwidthd.h"])
  105 AC_CHECK_MEMBER(struct tcphdr.th_dport,TCPHDR_DPORT="th_dport",,[#include "bandwidthd.h"])
  106 if test "$TCPHDR_DPORT" = "undefined" ; then
  107 	AC_MSG_ERROR([Could not determine dest port field name for tcphdr structure])
  108 fi
  109 AC_DEFINE_UNQUOTED(TCPHDR_DPORT,$TCPHDR_DPORT,[dest port field name in tcphdr])
  110 
  111 
  112 # Checks for library functions.
  113 AC_FUNC_MALLOC
  114 AC_HEADER_STDC
  115 AC_FUNC_MKTIME
  116 AC_TYPE_SIGNAL
  117 AC_FUNC_STAT
  118 AC_CHECK_FUNCS([alarm gethostbyaddr inet_ntoa memset strdup strftime pcap_findalldevs])
  119 
  120 AC_OUTPUT(Makefile)