home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.ee.lbl.gov
/
2014.05.ftp.ee.lbl.gov.tar
/
ftp.ee.lbl.gov
/
acld-1.11.tar.gz
/
acld-1.11.tar
/
acld-1.11
/
configure.in
< prev
next >
Wrap
Text File
|
2011-11-03
|
5KB
|
213 lines
AC_REVISION([@(#) $Id: configure.in 801 2011-11-04 00:47:24Z leres $ (LBL)])
dnl
AC_COPYRIGHT([Copyright (c) 2002, 2007, 2008, 2009, 2010, 2011
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(acld.c)
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_CHECK_HEADERS(memory.h paths.h)
dnl
dnl FreeBSD doesn't use malloc.h but stupidly has one...
dnl autoconf sets sets the wrong mandir under FreeBSD
dnl Install a startup script if we have the right one
dnl
case "$target_os" in
freebsd*)
INSTALL_START="install-localrcd"
eval _t="${mandir}"
eval _t="${_t}"
if test "${_t}" = "NONE/share/man"; then
mandir="/usr/local/man"
AC_MSG_NOTICE(Mapping FreeBSD mandir to ${mandir})
fi
;;
linux*)
AC_PATH_PROG(UPDATERCD, update-rc.d)
if test -n "$UPDATERCD" ; then
INSTALL_START="install-updatercd"
fi
;;
*)
if test -d "/usr/local/etc/rc.d/"; then
INSTALL_START="install-localrcd"
fi
AC_CHECK_HEADERS(malloc.h)
;;
esac
AC_LBL_SOCKADDR_SA_LEN
AC_LBL_CHECK_TYPE(int32_t, int)
AC_LBL_CHECK_TYPE(u_int16_t, u_short)
AC_LBL_CHECK_TYPE(u_int32_t, u_int)
AC_LBL_SOCKLEN_T
AC_REPLACE_FUNCS(daemon strerror inet_aton)
AC_CHECK_FUNCS(setsid)
AC_ARG_ENABLE([ipv6],
[AS_HELP_STRING([--disable-ipv6],
[disable ipv6 support @<:@default=check@:>@])],
ac_cv_enable_ipv6=${enable_ipv6})
AC_MSG_CHECKING(for ipv6)
if test "${ac_cv_enable_ipv6}" = "" -o \
"${ac_cv_enable_ipv6}" = yes ; then
AC_TRY_COMPILE([
# include <sys/types.h>
# include <sys/socket.h>
# include <netinet/in.h>
# include <arpa/inet.h>],
[int foo(void)
{
struct sockaddr_in6 sin6;
return (inet_pton(AF_INET, "foo", &sin6));
}],
ac_cv_have_ipv6=yes,
ac_cv_have_ipv6=no)
AC_MSG_RESULT($ac_cv_have_ipv6)
if test "${ac_cv_enable_ipv6}" = yes -a \
${ac_cv_have_ipv6} = no ; then
AC_MSG_ERROR(ipv6 explicitly enabled but not supported)
fi
else
AC_MSG_RESULT([disabled])
fi
AC_MSG_CHECKING(for altzone)
AC_CACHE_VAL(ac_cv_have_altzone,
AC_TRY_COMPILE([
# include <sys/types.h>
# include <time.h>],
[int i = altzone],
ac_cv_have_altzone=yes,
ac_cv_have_altzone=no))
AC_MSG_RESULT($ac_cv_have_altzone)
if test $ac_cv_have_altzone = yes ; then
AC_DEFINE(HAVE_ALTZONE)
fi
AC_LBL_LIBRARY_NET
AC_LBL_BROCCOLI(V_CCOPT, V_INCLS, 1.4.0)
if test "$ac_cv_have_broccoli" = yes ; then
ACLC="aclc"
dnl XXX don't want this for aclc
dnl AC_LIBOBJ([broccoli])
BRODSRCS="broccoli.c"
V_LIBHDRS="${V_LIBHDRS} broccoli.h"
fi
AC_ARG_ENABLE([cforce],
[AS_HELP_STRING([--disable-cforce],
[disable cForce support @<:@default=check@:>@])],
ac_cv_enable_cforce=${enableval})
AC_MSG_CHECKING(for cForce)
if test "${ac_cv_enable_cforce}" = "" -o \
"${ac_cv_enable_cforce}" = yes ; then
f="/home/cpacket/cForce/bin/cforce_linux.so"
if test -f ${f}; then
LIBS="${LIBS} ${f}"
AC_DEFINE(HAVE_CFORCE)
CFORCESRCS="cforce.c"
ac_cv_have_cforce="yes"
else
ac_cv_have_cforce="no"
fi
f="/home/cpacket/cForce/example_c/cforce.h"
if test -f ${f}; then
V_INCLS="$V_INCLS -I`dirname ${f}`"
fi
AC_MSG_RESULT(${ac_cv_have_cforce})
if test "${ac_cv_enable_cforce}" = yes -a \
${ac_cv_have_cforce} = no ; then
AC_MSG_ERROR(cForce explicitly enabled but not supported)
fi
else
AC_MSG_RESULT([disabled])
fi
AC_LBL_TYPE_SIGNAL
AC_LBL_UNION_WAIT
VERSION="`cat VERSION`"
expect="expect"
AC_PATH_PROG(EXPECT, ${expect}, "")
if test -z "$EXPECT" ; then
AC_MSG_ERROR([${expect} is required for acld to run])
fi
python="python"
AC_PATH_PROG(PYTHON, ${python}, "")
if test -z "$PYTHON" ; then
PYTHON="/usr/bin/env python"
fi
AC_LBL_DEVEL(V_CCOPT)
if test -f .devel ; then
AC_DEFINE(DEBUG)
fi
AC_LBL_LD_RUN_PATH
if test -r lbl/gnuc.h ; then
rm -f gnuc.h
ln -s lbl/gnuc.h gnuc.h
fi
PREFIX=${ac_default_prefix}
AC_SUBST(ACLC)
AC_SUBST(BROCCOLI_VERSION)
AC_SUBST(BRODSRCS)
AC_SUBST(CFLAGS)
AC_SUBST(CFORCESRCS)
AC_SUBST(CPPFLAGS)
AC_SUBST(EXPECT)
AC_SUBST(INSTALL_START)
AC_SUBST(LDFLAGS)
AC_SUBST(LIBS)
AC_SUBST(PREFIX)
AC_SUBST(PYTHON)
AC_SUBST(VERSION)
AC_SUBST(V_CCOPT)
AC_SUBST(V_ENVIRONMENT)
AC_SUBST(V_INCLS)
AC_SUBST(V_LIBHDRS)
scripts="acl.exp aclcompact.sh acld.sh acld-init.d.sh aclfw.sh check_acld.py"
AC_CONFIG_FILES(Makefile ${scripts})
AC_OUTPUT
chmod +x ${scripts}
if test -f .devel ; then
make depend
fi
exit 0