configure.in 3.01 KB
Newer Older
1 2 3 4 5

AC_PREREQ(2.13)

AC_INIT(Makeconf.in)
AC_CONFIG_AUX_DIR(${srcdir}/autoconf)
6
AC_PREFIX_DEFAULT(/usr/testbed)
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

AC_CHECK_TOOL(CC,gcc)
AC_CHECK_TOOL(CXX,g++)
AC_CHECK_TOOL(AR,ar)
AC_CHECK_TOOL(RANLIB,ranlib)
AC_CHECK_TOOL(STRIP,strip)

#
# Okay, I know this is improper usage of --with. Too bad.
#
AC_ARG_WITH(TBDBNAME,
[  --with-TBDBNAME=name		Specify TBDB name (tbdb default)],
[
    if test "$withval" = "yes"; then
	AC_MSG_ERROR(Invalid TBDBNAME - Must specify the value)
    fi
    TBDBNAME="$withval"
],[
    TBDBNAME="tbdb"
])
AC_SUBST(TBDBNAME)

29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
#
# Okay, I know this is improper usage of --with. Too bad.
#
AC_ARG_WITH(WWWDEFS,
[  --with-WWWDEFS=name		Specify WWW defintions ("default" default)],
[
    if test "$withval" = "yes"; then
	AC_MSG_ERROR(Invalid WWWDEFS - Must specify the value)
    fi
    WWWDEFS="$withval"
],[
    WWWDEFS="default"
])
AC_SUBST(WWWDEFS)

44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
AC_ARG_WITH(LEDA,
[  --with-LEDA			Specify LEDA path (/usr/testbed default)],
[
    if test "$withval" = "yes"; then
        LEDA="$ac_default_prefix/LEDA/LEDA-4.0"
    else
        LEDA="$withval"
    fi
],[
    LEDA="$ac_default_prefix/LEDA/LEDA-4.0"
])
AC_SUBST(LEDA)

#
# Optionally build with optimization or aggressive non-optimization
# (Actually three options: on, off or default.)
#
AC_ARG_ENABLE(debug,
[  --enable-debug        Build with debug flags (-g -DDEBUG)
  --disable-debug       Build with optimization flags (-O2 -DNDEBUG -UDEBUG)])

if test "$enable_debug" = "yes"; then
	OPT_CFLAGS="-g -DDEBUG";
else
	if test "$enable_debug" = "no"; then
		OPT_CFLAGS="-O2 -DNDEBUG -UDEBUG";
	else
		OPT_CFLAGS="-g -O";
	fi
fi
AC_SUBST(OPT_CFLAGS)

# Make sure $INSTALL is valid at any depth in our tree, i.e. make it absoulte.
# This can be needed when no valid install is found and autoconf falls back on
# the supplied install.sh, but we called 'configure' with a relative path.
AC_PROG_INSTALL
[case "$INSTALL" in
..*)
        INSTALL=`pwd`/$INSTALL
        ;;
esac]


outfiles="$outfiles Makeconf GNUmakefile \
	assign/GNUmakefile \
	capture/GNUmakefile \
90
	db/GNUmakefile db/nalloc db/nfree db/if2port db/backup \
91 92 93 94
	discvr/GNUmakefile \
	lib/GNUmakefile \
	os/GNUmakefile os/imagezip/GNUmakefile \
	pxe/GNUmakefile pxe/proxydhcp.restart pxe/bootinfo.restart \
95 96 97
	security/GNUmakefile security/paperbag \
	tbsetup/GNUmakefile tbsetup/console_setup tbsetup/mkacct-ctrl \
	tbsetup/os_load tbsetup/os_setup tbsetup/mkprojdir tbsetup/power \
98
	tbsetup/resetvlans tbsetup/rmacct-ctrl tbsetup/rmproj \
99 100 101 102
	tbsetup/sched_reload tbsetup/tbdoit tbsetup/tbstopit \
	tbsetup/ir/GNUmakefile tbsetup/ir/postassign tbsetup/snmpit \
	tbsetup/ir/assign_wrapper tbsetup/ns2ir/GNUmakefile \
	tbsetup/ns2ir/postparse tbsetup/ir/handle_os tbsetup/ir/handle_ip \
103
	tbsetup/ns2ir/parse.tcl tbsetup/savevlans \
Christopher Alfeld's avatar
Christopher Alfeld committed
104
	tbsetup/tbprerun tbsetup/tbrun tbsetup/tbend tbsetup/tbreport \
105 106 107
	tbsetup/checkpass/GNUmakefile \
	tip/GNUmakefile \
	tmcd/GNUmakefile tmcd/tmcd.restart \
108 109 110 111 112 113 114 115 116
	www/GNUmakefile www/defs.php3 www/dbdefs.php3"

#
# Do this for easy distclean.
#
DISTCLEAN_FILES="$outfiles"
AC_SUBST(DISTCLEAN_FILES)

AC_OUTPUT($outfiles)