?? configure.in
字號:
# Process this file with autoconf to produce a configure script.AC_INITAC_CANONICAL_HOSTAC_CONFIG_SRCDIR([bandwidthd.c])AC_CONFIG_HEADER([config.h])MAJOR_VERSION=2MINOR_VERSION=0RELEASE_VERSION=0EXTRA_VERSION=""VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION"# Checks for programs.AC_PROG_YACCAC_PROG_CCAC_PROG_INSTALLAC_PROG_LEX# May be required for libgd on bsdAC_PATH_Xif test -n "$x_libraries" && test "x$x_libraries" != xNONE ; then LDFLAGS="$LDFLAGS -L$x_libraries"fi# May be equired for BSDLDFLAGS="$LDFLAGS -L/usr/local/lib"CPPFLAGS="$CPPFLAGS -I/usr/local/include"#Check for Darwin sw directoryAC_CHECK_FILE(/sw/lib, LDFLAGS="$LDFLAGS -L/sw/lib")AC_CHECK_FILE(/sw/include, CPPFLAGS="$CPPFLAGS -I/sw/include")#Check for NetBSD usr/pkg directoryAC_CHECK_FILE(/usr/pkg/lib, LDFLAGS="$LDFLAGS -L/usr/pkg/lib")AC_CHECK_FILE(/usr/pkg/include, CPPFLAGS="$CPPFLAGS -I/usr/pkg/include")# Required for solarisAC_CHECK_LIB(socket, connect)AC_CHECK_LIB(nsl, gethostbyname)AC_CHECK_LIB(resolv, inet_aton)# Required for openbsd png libraryAC_CHECK_LIB(m, pow)# Required for gd under netbsdAC_CHECK_LIB(iconv, libiconv_open)# Required LibrariesAC_CHECK_LIB(png, png_read_info, ,[AC_MSG_ERROR([Bandwidthd requires but cannot libpng])])AC_CHECK_LIB(gd, gdImageCreate, ,[AC_MSG_ERROR([Bandwidthd requires but cannot find libgd])])AC_CHECK_LIB(pcap, pcap_open_live, , [AC_CHECK_LIB(wpcap, pcap_open_live, ,[AC_MSG_ERROR([Bandwidthd requires but cannot find libpcap])])])# Optional LibraryAC_CHECK_FILE(/usr/local/pgsql/lib, LDFLAGS="$LDFLAGS -L/usr/local/pgsql/lib")AC_CHECK_FILE(/usr/local/pgsql/include, CPPFLAGS="$CPPFLAGS -I/usr/local/pgsql/include")AC_CHECK_LIB(pq, PQconnectdb, [AC_CHECK_LIB(pq,PQexecParams, ,AC_MSG_WARN([libpq exists but is too old... bandwidthd requires support for PQexecParams]))])# Checks for header files.AC_HEADER_DIRENTAC_CHECK_HEADERS([gd.h],, [AC_CHECK_HEADERS([gd/gd.h],, AC_MSG_ERROR([Bandwidthd cannot find gd.h]))])AC_CHECK_HEADERS(gdfonts.h,, [AC_CHECK_HEADERS(gd/gdfonts.h,, AC_MSG_ERROR([Bandwidthd cannot find gdfonts.h]))])AC_CHECK_HEADERS([pcap.h],, [AC_MSG_ERROR([Bandwidthd cannot find pcap.h])])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],, [AC_MSG_ERROR([Bandwidthd cannot find some header files])])#Headers missing on cygwinAC_CHECK_HEADERS([arpa/nameser.h])AC_CHECK_HEADERS([resolv.h],,, [#include <netinet/in.h> #include <arpa/nameser.h>])# Checks for typedefs, structures, and compiler characteristics.AC_C_CONSTAC_C_INLINEAC_TYPE_PID_TAC_TYPE_SIZE_TAC_STRUCT_TMTCPHDR_SPORT="undefined"AC_CHECK_MEMBER(struct tcphdr.source,TCPHDR_SPORT="source",,[#include "bandwidthd.h"])AC_CHECK_MEMBER(struct tcphdr.th_sport,TCPHDR_SPORT="th_sport",,[#include "bandwidthd.h"])if test "$TCPHDR_SPORT" = "undefined" ; then AC_MSG_ERROR([Could not determine souce port field name for tcphdr structure])fiAC_DEFINE_UNQUOTED(TCPHDR_SPORT,$TCPHDR_SPORT,[source port field name in tcphdr])TCPHDR_DPORT="undefined"AC_CHECK_MEMBER(struct tcphdr.dest,TCPHDR_DPORT="dest",,[#include "bandwidthd.h"])AC_CHECK_MEMBER(struct tcphdr.th_dport,TCPHDR_DPORT="th_dport",,[#include "bandwidthd.h"])if test "$TCPHDR_DPORT" = "undefined" ; then AC_MSG_ERROR([Could not determine dest port field name for tcphdr structure])fiAC_DEFINE_UNQUOTED(TCPHDR_DPORT,$TCPHDR_DPORT,[dest port field name in tcphdr])# Checks for library functions.AC_FUNC_MALLOCAC_HEADER_STDCAC_FUNC_MKTIMEAC_TYPE_SIGNALAC_FUNC_STATAC_CHECK_FUNCS([alarm gethostbyaddr inet_ntoa memset strdup strftime pcap_findalldevs])AC_OUTPUT(Makefile)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -