1*bd1f8aebSAndroid Build Coastguard Workerdnl $USAGI: configure.in,v 1.12 2003-07-16 09:49:01 yoshfuji Exp $ 2*bd1f8aebSAndroid Build Coastguard Worker 3*bd1f8aebSAndroid Build Coastguard Workerdnl Copyright (C) 2002 USAGI/WIDE Project. 4*bd1f8aebSAndroid Build Coastguard Workerdnl All rights reserved. 5*bd1f8aebSAndroid Build Coastguard Workerdnl 6*bd1f8aebSAndroid Build Coastguard Workerdnl Redistribution and use in source and binary forms, with or without 7*bd1f8aebSAndroid Build Coastguard Workerdnl modification, are permitted provided that the following conditions 8*bd1f8aebSAndroid Build Coastguard Workerdnl are met: 9*bd1f8aebSAndroid Build Coastguard Workerdnl 1. Redistributions of source code must retain the above copyright 10*bd1f8aebSAndroid Build Coastguard Workerdnl notice, this list of conditions and the following disclaimer. 11*bd1f8aebSAndroid Build Coastguard Workerdnl 2. Redistributions in binary form must reproduce the above copyright 12*bd1f8aebSAndroid Build Coastguard Workerdnl notice, this list of conditions and the following disclaimer in the 13*bd1f8aebSAndroid Build Coastguard Workerdnl documentation and/or other materials provided with the distribution. 14*bd1f8aebSAndroid Build Coastguard Workerdnl 3. Neither the name of the project nor the names of its contributors 15*bd1f8aebSAndroid Build Coastguard Workerdnl may be used to endorse or promote products derived from this software 16*bd1f8aebSAndroid Build Coastguard Workerdnl without specific prior written permission. 17*bd1f8aebSAndroid Build Coastguard Workerdnl 18*bd1f8aebSAndroid Build Coastguard Workerdnl THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 19*bd1f8aebSAndroid Build Coastguard Workerdnl ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20*bd1f8aebSAndroid Build Coastguard Workerdnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21*bd1f8aebSAndroid Build Coastguard Workerdnl ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 22*bd1f8aebSAndroid Build Coastguard Workerdnl FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23*bd1f8aebSAndroid Build Coastguard Workerdnl DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24*bd1f8aebSAndroid Build Coastguard Workerdnl OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25*bd1f8aebSAndroid Build Coastguard Workerdnl HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26*bd1f8aebSAndroid Build Coastguard Workerdnl LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27*bd1f8aebSAndroid Build Coastguard Workerdnl OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28*bd1f8aebSAndroid Build Coastguard Workerdnl SUCH DAMAGE. 29*bd1f8aebSAndroid Build Coastguard Worker 30*bd1f8aebSAndroid Build Coastguard WorkerAC_PREREQ(2.53) 31*bd1f8aebSAndroid Build Coastguard WorkerAC_INIT(ninfod.c) 32*bd1f8aebSAndroid Build Coastguard WorkerAC_CONFIG_HEADER(config.h) 33*bd1f8aebSAndroid Build Coastguard WorkerAC_PREFIX_DEFAULT(/usr/local/v6) 34*bd1f8aebSAndroid Build Coastguard Worker 35*bd1f8aebSAndroid Build Coastguard WorkerAC_COPYRIGHT([Copyright (C)2002 USAGI/WIDE Project. All Rights Reserved.]) 36*bd1f8aebSAndroid Build Coastguard Worker 37*bd1f8aebSAndroid Build Coastguard Workerdnl Checks for programs. 38*bd1f8aebSAndroid Build Coastguard WorkerAC_PROG_CC 39*bd1f8aebSAndroid Build Coastguard WorkerAC_PROG_INSTALL 40*bd1f8aebSAndroid Build Coastguard WorkerINSTALL_LIB="\${INSTALL_DATA}" 41*bd1f8aebSAndroid Build Coastguard WorkerAC_SUBST(INSTALL_LIB) 42*bd1f8aebSAndroid Build Coastguard WorkerINSTALL_DIR="\${INSTALL} -d" 43*bd1f8aebSAndroid Build Coastguard WorkerAC_SUBST(INSTALL_DIR) 44*bd1f8aebSAndroid Build Coastguard Worker 45*bd1f8aebSAndroid Build Coastguard Workerdnl Checks for Enable/With 46*bd1f8aebSAndroid Build Coastguard WorkerAC_ARG_ENABLE(debug, 47*bd1f8aebSAndroid Build Coastguard Worker[ --enable-debug Enable debugging]) 48*bd1f8aebSAndroid Build Coastguard Workerif test x"$enableval" != x"no"; then 49*bd1f8aebSAndroid Build Coastguard Worker AC_DEFINE(ENABLE_DEBUG, 1, 50*bd1f8aebSAndroid Build Coastguard Worker [Enable debugging]) 51*bd1f8aebSAndroid Build Coastguard Workerfi 52*bd1f8aebSAndroid Build Coastguard Worker 53*bd1f8aebSAndroid Build Coastguard WorkerAC_ARG_ENABLE(threads, 54*bd1f8aebSAndroid Build Coastguard Worker[ --disable-threads Disable threads (and random delay)],,enable_threads=no) 55*bd1f8aebSAndroid Build Coastguard Workerif test x"$enableval" != x"no"; then 56*bd1f8aebSAndroid Build Coastguard Worker AC_DEFINE(ENABLE_THREADS, 1, 57*bd1f8aebSAndroid Build Coastguard Worker [Enable threads]) 58*bd1f8aebSAndroid Build Coastguard Workerfi 59*bd1f8aebSAndroid Build Coastguard Worker 60*bd1f8aebSAndroid Build Coastguard WorkerAC_ARG_ENABLE(suptypes, 61*bd1f8aebSAndroid Build Coastguard Worker[ --enable-suptypes Enable suptypes qtype (deprecated)]) 62*bd1f8aebSAndroid Build Coastguard Workerif test x"$enableval" != x"no"; then 63*bd1f8aebSAndroid Build Coastguard Worker AC_DEFINE(ENABLE_SUPTYPES, 1, 64*bd1f8aebSAndroid Build Coastguard Worker [Enable suptypes (deprecated)]) 65*bd1f8aebSAndroid Build Coastguard Workerfi 66*bd1f8aebSAndroid Build Coastguard Worker 67*bd1f8aebSAndroid Build Coastguard WorkerAC_ARG_ENABLE(suptypes, 68*bd1f8aebSAndroid Build Coastguard Worker[ --enable-ttl Enable ttl support for qtypes (deprecated)]) 69*bd1f8aebSAndroid Build Coastguard Workerif test x"$enableval" != x"no"; then 70*bd1f8aebSAndroid Build Coastguard Worker AC_DEFINE(ENABLE_SUPTYPES, 1, 71*bd1f8aebSAndroid Build Coastguard Worker [Enable ttl support for qtypes (deprecated)]) 72*bd1f8aebSAndroid Build Coastguard Workerfi 73*bd1f8aebSAndroid Build Coastguard Worker 74*bd1f8aebSAndroid Build Coastguard Workerdnl Checks for libraries. 75*bd1f8aebSAndroid Build Coastguard Worker 76*bd1f8aebSAndroid Build Coastguard Workerdnl Checks for header files. 77*bd1f8aebSAndroid Build Coastguard WorkerAC_HEADER_STDC 78*bd1f8aebSAndroid Build Coastguard WorkerAC_HEADER_TIME 79*bd1f8aebSAndroid Build Coastguard WorkerAC_CHECK_HEADERS(limits.h) 80*bd1f8aebSAndroid Build Coastguard WorkerAC_CHECK_HEADERS(gnutls/openssl.h) 81*bd1f8aebSAndroid Build Coastguard WorkerAC_CHECK_HEADERS(openssl/md5.h) 82*bd1f8aebSAndroid Build Coastguard WorkerAC_CHECK_HEADERS(sys/uio.h) 83*bd1f8aebSAndroid Build Coastguard WorkerAC_CHECK_HEADERS(sys/utsname.h arpa/inet.h netdb.h syslog.h) 84*bd1f8aebSAndroid Build Coastguard WorkerAC_CHECK_HEADERS(sys/capability.h) 85*bd1f8aebSAndroid Build Coastguard WorkerAC_CHECK_HEADERS(pwd.h) 86*bd1f8aebSAndroid Build Coastguard WorkerAC_CHECK_HEADERS(netinet/in.h) 87*bd1f8aebSAndroid Build Coastguard WorkerAC_CHECK_HEADERS(netinet/ip6.h netinet/icmp6.h,,,[ 88*bd1f8aebSAndroid Build Coastguard Worker#if HAVE_SYS_TYPES_H 89*bd1f8aebSAndroid Build Coastguard Worker# include <sys/types.h> 90*bd1f8aebSAndroid Build Coastguard Worker#endif 91*bd1f8aebSAndroid Build Coastguard Worker#if HAVE_NETINET_IN_H 92*bd1f8aebSAndroid Build Coastguard Worker# include <netinet/in.h> 93*bd1f8aebSAndroid Build Coastguard Worker#endif 94*bd1f8aebSAndroid Build Coastguard Worker]) 95*bd1f8aebSAndroid Build Coastguard WorkerAC_CHECK_HEADERS(linux/rtnetlink.h,,,[ 96*bd1f8aebSAndroid Build Coastguard Worker#include <asm/types.h> 97*bd1f8aebSAndroid Build Coastguard Worker#include <sys/socket.h> 98*bd1f8aebSAndroid Build Coastguard Worker]) 99*bd1f8aebSAndroid Build Coastguard WorkerAC_CHECK_HEADERS(pthread.h) 100*bd1f8aebSAndroid Build Coastguard Worker 101*bd1f8aebSAndroid Build Coastguard Workerdnl Checks for typedefs, structures, and compiler characteristics. 102*bd1f8aebSAndroid Build Coastguard WorkerAC_C_BIGENDIAN 103*bd1f8aebSAndroid Build Coastguard WorkerAC_C_CONST 104*bd1f8aebSAndroid Build Coastguard WorkerAC_TYPE_SIZE_T 105*bd1f8aebSAndroid Build Coastguard Worker 106*bd1f8aebSAndroid Build Coastguard WorkerAC_MSG_CHECKING([for struct icmp6_nodeinfo]) 107*bd1f8aebSAndroid Build Coastguard WorkerAC_TRY_COMPILE([ 108*bd1f8aebSAndroid Build Coastguard Worker#include <sys/types.h> 109*bd1f8aebSAndroid Build Coastguard Worker#include <netinet/in.h> 110*bd1f8aebSAndroid Build Coastguard Worker#include <netinet/icmp6.h> 111*bd1f8aebSAndroid Build Coastguard Worker],[ 112*bd1f8aebSAndroid Build Coastguard Workerstruct icmp6_nodeinfo nodeinfo; 113*bd1f8aebSAndroid Build Coastguard Worker],[ 114*bd1f8aebSAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 115*bd1f8aebSAndroid Build Coastguard Worker AC_DEFINE([HAVE_STRUCT_ICMP6_NODEINFO], 1, 116*bd1f8aebSAndroid Build Coastguard Worker [Define to 1 if you have struct icmp6_nodeinfo]) 117*bd1f8aebSAndroid Build Coastguard Worker],[ 118*bd1f8aebSAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 119*bd1f8aebSAndroid Build Coastguard Worker]) 120*bd1f8aebSAndroid Build Coastguard Worker 121*bd1f8aebSAndroid Build Coastguard Workerdnl Checks for library functions. 122*bd1f8aebSAndroid Build Coastguard WorkerAC_CHECK_FUNCS(nanosleep) 123*bd1f8aebSAndroid Build Coastguard WorkerAC_CHECK_LIB(pthread, pthread_create) 124*bd1f8aebSAndroid Build Coastguard WorkerAC_CHECK_LIB(cap, cap_init) 125*bd1f8aebSAndroid Build Coastguard Worker 126*bd1f8aebSAndroid Build Coastguard WorkerAC_CHECK_LIB(gnutls-openssl, MD5_Init, 127*bd1f8aebSAndroid Build Coastguard Worker AC_DEFINE(HAVE_MD5_INIT) 128*bd1f8aebSAndroid Build Coastguard Worker LIBS="-lgnutls-openssl $LIBS", 129*bd1f8aebSAndroid Build Coastguard Worker AC_CHECK_LIB(crypto, MD5_Init, 130*bd1f8aebSAndroid Build Coastguard Worker AC_DEFINE(HAVE_MD5_INIT) 131*bd1f8aebSAndroid Build Coastguard Worker LIBS="-lcrypto $LIBS", 132*bd1f8aebSAndroid Build Coastguard Worker ) 133*bd1f8aebSAndroid Build Coastguard Worker) 134*bd1f8aebSAndroid Build Coastguard Workerdnl AC_CHECK_LIB(crypto, MD5Init, 135*bd1f8aebSAndroid Build Coastguard Workerdnl AC_DEFINE(HAVE_MD5INIT) 136*bd1f8aebSAndroid Build Coastguard Workerdnl LIBS="-lcrypto $LIBS", 137*bd1f8aebSAndroid Build Coastguard Workerdnl) 138*bd1f8aebSAndroid Build Coastguard Worker 139*bd1f8aebSAndroid Build Coastguard Workerdnl AC_SUBST(DEFS) 140*bd1f8aebSAndroid Build Coastguard Worker 141*bd1f8aebSAndroid Build Coastguard WorkerAC_OUTPUT(Makefile ninfod.sh) 142