home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.ee.lbl.gov
/
2014.05.ftp.ee.lbl.gov.tar
/
ftp.ee.lbl.gov
/
hf-1.2.tar.gz
/
hf-1.2.tar
/
hf-1.2
/
configure.in
< prev
next >
Wrap
Text File
|
2009-10-10
|
2KB
|
111 lines
AC_REVISION([@(#) $Id: configure.in 170 2009-10-11 00:18:21Z leres $ (LBL)])
dnl
AC_COPYRIGHT([Copyright (c) 1996, 1998, 1999, 2000, 2001, 2002, 2004, 2009
The Regents of the University of California. All rights reserved.])
dnl
dnl Process this file with autoconf to produce a configure script.
dnl
AC_INIT
AC_CONFIG_SRCDIR(hf.l)
AC_CANONICAL_TARGET
umask 002
if test -z "$PWD" ; then
PWD=`pwd`
fi
AC_LBL_C_INIT(V_CCOPT, V_INCLS)
AC_PROG_INSTALL
AC_LBL_LEX_AND_YACC(V_LEX, V_YACC)
AC_LBL_TYPE_SIGNAL
AC_LBL_CHECK_TYPE(int32_t, int)
AC_LBL_CHECK_TYPE(u_int32_t, u_int)
AC_LBL_CHECK_TYPE(u_int16_t, u_short)
AC_CHECK_HEADERS(memory.h net/ethernet.h netinet/ether.h)
AC_REPLACE_FUNCS(strerror)
d="/usr/local/bind"
AC_MSG_CHECKING(for ${d})
if test -d ${d}; then
AC_MSG_RESULT(yes)
LDFLAGS="$LDFLAGS -L${d}/lib"
V_INCLS="$V_INCLS -I${d}/include"
else
AC_MSG_RESULT(no)
fi
AC_CHECK_LIB(socket, main)
AC_CHECK_LIB(nsl, main)
dnl
dnl First see if res_mkquery() is in libc; if not, check -lresolv
dnl
dnl Stupidly, linux doesn't make routines such as ns_initparse()
dnl available so we have to (painfully) check for it too.
dnl
AC_MSG_CHECKING(for ns_initparse)
AC_TRY_LINK([
# include <sys/types.h>
# include <netinet/in.h>
# include <arpa/nameser.h>
# include <resolv.h>],
[int i = ns_initparse((u_char *)0, 0, (ns_msg *)0)],
hf_have_ns_initparse=yes,
hf_have_ns_initparse=no)
AC_MSG_RESULT($hf_have_ns_initparse)
if test $hf_have_ns_initparse = yes ; then
AC_CHECK_FUNCS(res_mkquery)
if test $ac_cv_func_res_mkquery = yes ; then
AC_DEFINE(HAVE_ASYNC_DNS)
V_ASYNC_OBJS="$V_ASYNC_OBJS nb_dns.o"
else
SAVED_LIBS="$LIBS"
AC_CHECK_LIB(resolv, res_mkquery)
LIBS="$SAVED_LIBS"
if test $ac_cv_lib_resolv_res_mkquery = yes ; then
AC_DEFINE(HAVE_ASYNC_DNS)
V_ASYNC_LIBS="$V_ASYNC_LIBS -lresolv"
V_ASYNC_OBJS="$V_ASYNC_OBJS nb_dns.o"
fi
fi
fi
AC_CHECK_FUNCS(gethostbyname2)
AC_LBL_DEVEL(V_CCOPT)
if test -f .devel ; then
AC_DEFINE(DEBUG)
fi
if test -r lbl/gnuc.h ; then
rm -f gnuc.h
ln -s lbl/gnuc.h gnuc.h
fi
AC_SUBST(CFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(LIBS)
AC_SUBST(V_CCOPT)
AC_SUBST(V_ASYNC_LIBS)
AC_SUBST(V_ASYNC_OBJS)
AC_SUBST(V_INCLS)
AC_SUBST(V_LEX)
AC_CONFIG_FILES(Makefile)
AC_OUTPUT
if test -f .devel ; then
make depend
fi
exit 0