configure.in 3.83 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

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)

#
15 16
# These get defined in the definitions file (--with-TBDEFS).
# 
17
AC_SUBST(TBDBNAME)
18 19 20
AC_SUBST(WWWDEFS)
AC_SUBST(TBOPSEMAIL)
AC_SUBST(TBLOGSEMAIL)
21

22 23 24
#
# Okay, I know this is improper usage of --with. Too bad.
#
25 26
AC_ARG_WITH(TBDEFS,
[  --with-TBDEFS=name	Specify definitions file (defs-default default)],
27 28
[
    if test "$withval" = "yes"; then
29
	AC_MSG_ERROR(Invalid TBDEFS - Must specify the value)
30
    fi
31
    TBDEFS="$withval"
32
],[
33
    TBDEFS="$srcdir/defs-default"
34
])
35 36 37 38 39 40 41 42 43

if test -f $TBDEFS; then
    #
    # Remove the comments and newlines.  Really, that's what it does.
    #
    eval `cat $TBDEFS | sed -n -e '{s/#.*$//;H;}; ${g;s/\n/ /g;s/  */ /g;p;}'`
else
	AC_MSG_ERROR([Definitions file $TBDEFS was not found.])
fi
44

45
#
46
# The email addresses need to be be munged for perl scripts.
47 48
#
TBOPSEMAIL="`echo $TBOPSEMAIL | sed -e 's/@/\\\@/'`"
49
TBLOGSEMAIL="`echo $TBLOGSEMAIL | sed -e 's/@/\\\@/'`"
50 51 52 53

#
# LEDA library path
#
54
AC_ARG_WITH(LEDA,
55
[  --with-LEDA		Specify LEDA path (/usr/testbed default)],
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 90 91 92 93 94 95 96 97 98 99
[
    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 \
100
	db/GNUmakefile db/nalloc db/nfree db/if2port db/backup \
101
	db/webcontrol db/node_status db/genelists discvr/GNUmakefile \
Leigh B. Stoller's avatar
Leigh B. Stoller committed
102
	db/libdb.pm \
Mike Hibler's avatar
Mike Hibler committed
103
	ipod/GNUmakefile \
104
	lib/GNUmakefile \
105
	os/GNUmakefile os/split-image.sh os/imagezip/GNUmakefile \
106
	pxe/GNUmakefile pxe/proxydhcp.restart pxe/bootinfo.restart \
107 108 109
	security/GNUmakefile security/paperbag \
	tbsetup/GNUmakefile tbsetup/console_setup tbsetup/mkacct-ctrl \
	tbsetup/os_load tbsetup/os_setup tbsetup/mkprojdir tbsetup/power \
110
	tbsetup/node_reboot tbsetup/webnscheck tbsetup/nscheck \
111
	tbsetup/resetvlans tbsetup/rmacct-ctrl tbsetup/rmproj \
Leigh B. Stoller's avatar
Leigh B. Stoller committed
112
	tbsetup/sched_reload tbsetup/reload_daemon \
113 114
	tbsetup/batchexp tbsetup/killbatchexp tbsetup/batch_daemon \
	tbsetup/webbatchexp tbsetup/webkillbatchexp \
115
	tbsetup/startexp tbsetup/endexp tbsetup/webstartexp tbsetup/webendexp \
116 117 118
	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 \
119 120
	tbsetup/ns2ir/parse.tcl tbsetup/ns2ir/tb_compat.tcl \
	tbsetup/savevlans tbsetup/ir/extract_tb \
Christopher Alfeld's avatar
Christopher Alfeld committed
121
	tbsetup/tbprerun tbsetup/tbrun tbsetup/tbend tbsetup/tbreport \
122
	tbsetup/named_setup tbsetup/exports_setup \
123 124
	tbsetup/checkpass/GNUmakefile \
	tip/GNUmakefile \
125
	tmcd/GNUmakefile tmcd/freebsd/GNUmakefile tmcd/linux/GNUmakefile \
126
	tmcd/netbsd/GNUmakefile \
127
	tmcd/tmcd.restart \
128
	utils/GNUmakefile utils/vlandiff utils/vlansync utils/delay_config \
129 130 131 132 133 134 135 136 137
	www/GNUmakefile www/defs.php3 www/dbdefs.php3"

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

AC_OUTPUT($outfiles)