⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure.in

📁 DHCPv6协议在Linux操作系统下的一个客户端实现。
💻 IN
字号:
dnl Process this file with autoconf to produce a configure script.AC_INIT(dhcp6c.c)dnl Checks for programs.AC_PROG_INSTALLAC_PROG_MAKE_SETAC_PROG_CCAC_PROG_CPPAC_PROG_YACCAC_PROG_LEXdnl Checks for libraries.dnl AC_CHECK_LIB(c, kvm_open, [], [AC_CHECK_LIB(kvm, kvm_open)])dnl AC_CHECK_LIB(mld, nlist)AC_CHECK_LIB(crypto, MD5_Init, [], [AC_CHECK_LIB(ssl, MD5_Init)])AC_CHECK_LIB(resolv, __dn_comp, [], [])dnl pcap librarydnl CFLAGS="-I. $CFLAGS"dnl AC_MSG_CHECKING(for pcap library/header)dnl for dir in /usr/local/libpcap /usr/local/v6 /usr/local \dnl 		../libpcap* ../../libpcap*; dodnl 	ac_cv_pcap_lib=nodnl 	ac_cv_pcap_include=nodnl 	if test -d $dir -a -f $dir/libpcap.a; thendnl 		ac_cv_pcap_lib="$dir"dnl 	elif test -d $dir/lib -a -f $dir/lib/libpcap.a; thendnl 		ac_cv_pcap_lib="$dir/lib"dnl 	fidnl 	if test -d $dir -a -f $dir/pcap.h; thendnl 		ac_cv_pcap_include="$dir"dnl 	elif test -d $dir/include -a -f $dir/include/pcap.h; thendnl 		ac_cv_pcap_include="$dir/include"dnl 	fidnl 	if test "$ac_cv_pcap_lib" != "no" -a "$ac_cv_pcap_include" != "no"; thendnl 		LIBS="-L$ac_cv_pcap_lib $LIBS"dnl 		CFLAGS="-I$ac_cv_pcap_include $CFLAGS"dnl 		breakdnl 	fidnl donednl if test "$ac_cv_pcap_lib" = "no" -a "$ac_cv_pcap_include" = "no"; thendnl 	AC_MSG_RESULT(no)dnl elsednl 	AC_MSG_RESULT($ac_cv_pcap_lib and $ac_cv_pcap_include)dnl fidnl AC_CHECK_LIB(pcap, pcap_lookupdev, [],dnl 	[echo "Fatal: libpcap.a not found"dnl 	exit 1])dnl AC_TRY_COMPILE([#include <pcap.h>], [], [], [dnldnl 	echo "Fatal: pcap.h not found"dnl 	exit 1])CFLAGS="$CFLAGS -I\$(srcdir)"AC_MSG_CHECKING(for getaddrinfo/getnameinfo library)AC_EGREP_CPP(yes,[#include <netinet/in.h>#ifdef __KAME__ yes#endif], [result=kame])AC_MSG_RESULT($result)case $result inkame)	AC_DEFINE(INET6)	o_LIBS="$LIBS"	LIBS="$LIBS -L/usr/local/v6/lib -L/usr/lib"	AC_CHECK_LIB(inet6, getaddrinfo, [], [LIBS="$o_LIBS"])	;;*)	;;esacAC_REPLACE_FUNCS(getaddrinfo)AC_REPLACE_FUNCS(getnameinfo)AC_REPLACE_FUNCS(ifaddrs)AC_CHECK_FUNCS(if_nametoindex)AC_REPLACE_FUNCS(strlcpy strlcat)dnl Checks for header files.AC_HEADER_STDCAC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h syslog.h unistd.h ifaddrs.h)AC_MSG_CHECKING(for socklen_t)AC_TRY_COMPILE([#include <sys/types.h>#include <sys/socket.h>],	[socklen_t x;  x = 1; return x;],	[AC_MSG_RESULT(yes)],	[AC_MSG_RESULT(no)	AC_CHECK_TYPE(socklen_t, int)])dnl Checks for typedefs, structures, and compiler characteristics.AC_C_CONSTAC_TYPE_SIZE_TAC_HEADER_TIMEAC_STRUCT_TMAC_STRUCT_TIMEZONEdnl Checks for library functions.AC_FUNC_GETPGRPAC_PROG_GCC_TRADITIONALAC_FUNC_SETPGRPAC_TYPE_SIGNALAC_CHECK_FUNCS(mktime select socket)dnl Checks for arc4randomdnl AC_REPLACE_FUNCS(arc4random)dnl Checks for optinal parametersAC_MSG_CHECKING(if --enable-mediator option is specified)AC_ARG_WITH(mediator, [  --with-mediator         build with mediator (obsolete)],	[AC_DEFINE(MEDIATOR)	with_mediator=yes], [with_mediator=no])AC_MSG_RESULT($with_mediator);AC_MSG_CHECKING(if --enable-pedant option is specified)AC_ARG_ENABLE(pedant, [  --enable-pedant         pedantic compilation],	[if test "$enableval" = "yes"; then		CFLAGS="-Wall -Werror $CFLAGS"	fi], [enableval=no])AC_MSG_RESULT($enableval);dnl Checks predeclared identifers of function namesAC_MSG_CHECKING(ANSI predeclared __func__)AC_TRY_COMPILE([],[void func(void) {printf("%s\n", __func__);}],	[AC_MSG_RESULT(yes)	 pred_func_id=ansi],	[AC_MSG_RESULT(no)	 pred_func_id=no])if test $pred_func_id = no; thenAC_MSG_CHECKING(gcc predelcared __FUNCTION__)	AC_TRY_COMPILE([],	[void func(void) {printf("%s\n", __FUNCTION__);}],		[AC_MSG_RESULT(yes)		 pred_func_id=gcc],		[AC_MSG_RESULT(no)		 pred_func_id=no])ficase $pred_func_id in	ansi)		AC_DEFINE(HAVE_ANSI_FUNC)		;;	gcc)		AC_DEFINE(HAVE_GCC_FUNCTION)		;;esacdnl DHCP option type values not officially definedAC_MSG_CHECKING(for DHCP DNS resolvers option )AC_ARG_WITH(opt-dns-resolvers,[  --with-opt-dns-resolvers=VALUE    specify DHCP option value for DNS resolvers],    dhcpopt_dns_resolvers="$withval", dhcpopt_dns_resolvers=0)if test $dhcpopt_dns_resolvers = 0 ; then	dhcpopt_dns_resolvers=25	AC_MSG_RESULT(unspecified and using $dhcpopt_dns_resolvers)else	AC_MSG_RESULT(using $dhcpopt_dns_resolvers)fiAC_SUBST(dhcpopt_dns_resolvers)dnl DHCP option type values not officially definedAC_MSG_CHECKING(for DHCP domain list option )AC_ARG_WITH(opt-domain-list,[  --with-opt-domain-list=VALUE    specify DHCP option value for domain list],    dhcpopt_domain_list="$withval", dhcpopt_domain_list=0)if test $dhcpopt_domain_list = 0 ; then	dhcpopt_domain_list=26	AC_MSG_RESULT(unspecified and using $dhcpopt_domain_list)else	AC_MSG_RESULT(using $dhcpopt_domain_list)fiAC_SUBST(dhcpopt_domain_list)AC_MSG_CHECKING(for DHCP prefix delegation option)AC_ARG_WITH(opt-pdel,[  --with-opt-pdel=VALUE   specify DHCP option value for prefix delegation],    dhcpopt_pdel="$withval", dhcpopt_pdel=0)if test $dhcpopt_pdel = 0 ; then	dhcpopt_pdel=30	AC_MSG_RESULT(unspecified and using $dhcpopt_pdel)else	AC_MSG_RESULT(using $dhcpopt_pdel)fiAC_SUBST(dhcpopt_pdel)AC_MSG_CHECKING(for DHCP prefix information option)AC_ARG_WITH(opt-pinfo,[  --with-opt-pinfo=VALUE  specify DHCP option value for prefix information],    dhcpopt_pinfo="$withval", dhcpopt_pinfo=0)if test $dhcpopt_pinfo = 0 ; then	dhcpopt_pinfo=31	AC_MSG_RESULT(unspecified and using $dhcpopt_pinfo)else	AC_MSG_RESULT(using $dhcpopt_pinfo)fiAC_SUBST(dhcpopt_pinfo)AC_MSG_CHECKING(for DHCP prefix request option)AC_ARG_WITH(opt-preq,[  --with-opt-preq=VALUE   specify DHCP option value for prefix request],    dhcpopt_preq="$withval", dhcpopt_preq=0)if test $dhcpopt_preq = 0 ; then	dhcpopt_preq=32	AC_MSG_RESULT(unspecified and using $dhcpopt_preq)else	AC_MSG_RESULT(using $dhcpopt_preq)fiAC_SUBST(dhcpopt_preq)AC_CHECK_HEADERS(stdarg.h)AC_OUTPUT(Makefile)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -