configure.in 8.21 KB
Newer Older
1
#
2
# Copyright (c) 2000-2013 University of Utah and the Flux Group.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
# 
# {{{EMULAB-LICENSE
# 
# This file is part of the Emulab network testbed software.
# 
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
# 
# This file is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public
# License for more details.
# 
# You should have received a copy of the GNU Affero General Public License
# along with this file.  If not, see <http://www.gnu.org/licenses/>.
# 
# }}}
22
#
23 24 25 26 27
AC_PREREQ(2.62)

AC_INIT(Makeconf.in)
AC_CONFIG_AUX_DIR(${srcdir}/autoconf)
AC_CONFIG_HEADER(config.h)
Leigh Stoller's avatar
Leigh Stoller committed
28
AC_CANONICAL_HOST
29

30 31 32 33 34 35
AC_PROG_CPP
AC_PROG_CXX
AC_PROG_LN_S
AC_PROG_RANLIB
AC_PROG_MKDIR_P
AC_PROG_INSTALL
Leigh Stoller's avatar
Leigh Stoller committed
36 37 38 39
AC_PATH_PROG(SUDO,sudo)
if test -z "$SUDO" ; then
    AC_MSG_ERROR([no acceptable sudo found in \$PATH])
fi
40 41 42 43
AC_PATH_PROG(AR, ar)
if test -z "$AR" ; then
    AC_MSG_ERROR([no acceptable ar found in \$PATH])
fi
44 45 46 47
AC_PATH_PROG(STRIP, strip)
if test -z "$STRIP" ; then
    AC_MSG_ERROR([no acceptable strip found in \$PATH])
fi
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
AC_PATH_PROG(RM, rm)
if test -z "$RM" ; then
    AC_MSG_ERROR([no acceptable rm found in \$PATH])
fi
AC_PATH_PROG(CP, cp)
if test -z "$CP" ; then
    AC_MSG_ERROR([no acceptable cp found in \$PATH])
fi
AC_PATH_PROG(YACC, byacc)
if test -z "$YACC" ; then
    AC_MSG_ERROR([no byacc found in \$PATH])
fi
AC_PATH_PROG(TAR, tar)
if test -z "$TAR" ; then
    AC_MSG_ERROR([no tar found in \$PATH])
fi
AC_PATH_PROG(RPM, rpm, rpm)
if test -z "$RPM" ; then
    AC_MSG_ERROR([no rpm found in \$PATH])
fi
Leigh Stoller's avatar
Leigh Stoller committed
68
AC_PATH_PROG(ELVIN_CONFIG,elvin-config)
69

70 71 72
# Need this for Makeconf.
AC_SUBST(PATH)

Leigh Stoller's avatar
Leigh Stoller committed
73 74 75 76 77 78
#
# Flag build as clientside only, not withing full Emulab build
#
WITH_EMULAB=0
AC_SUBST(WITH_EMULAB)

Leigh Stoller's avatar
Leigh Stoller committed
79 80 81 82
# TPM stuff. See option below.
TPM=0
AC_SUBST(TPM)

83
#
Leigh Stoller's avatar
Leigh Stoller committed
84
# Elvin compat option, which we	still need. Always turn on event system.
85 86 87
#
AC_SUBST(ELVIN_COMPAT)
ELVIN_COMPAT=0
Leigh Stoller's avatar
Leigh Stoller committed
88 89
AC_SUBST(EVENTSYS)
EVENTSYS=1
90

91 92 93
AC_SUBST(DISABLE_NAMED_SETUP)
DISABLE_NAMED_SETUP=0

94 95 96 97 98 99 100 101 102
AC_SUBST(CLIENT_ETCDIR)
AC_SUBST(CLIENT_BINDIR)
AC_SUBST(CLIENT_VARDIR)
AC_SUBST(CLIENT_MANDIR)
CLIENT_ETCDIR="/etc/emulab"
CLIENT_BINDIR="/usr/local/etc/emulab"
CLIENT_VARDIR="/var/emulab"
CLIENT_MANDIR="/usr/local/man"

103 104 105 106 107 108 109 110
# XXX compat. We have no business expanding these on the client side!
AC_SUBST(PROJROOT_DIR)
AC_SUBST(EVENTSERVER)
AC_SUBST(NOSHAREDFS)
PROJROOT_DIR="/proj"
EVENTSERVER="event-server"
NOSHAREDFS=0

111 112 113 114 115 116
TBLOGFACIL="local5"
LOG_TESTBED=`echo "LOG_$TBLOGFACIL" | tr a-z A-Z`
AC_DEFINE_UNQUOTED(LOG_TESTBED, $LOG_TESTBED)
AC_SUBST(LOG_TESTBED)
AC_SUBST(TBLOGFACIL)

117 118 119 120 121 122 123 124
#
# Allow enabling of NTFS support in imagezip
#
AC_SUBST(OUTERBOSS_NODENAME)
AC_SUBST(WINSUPPORT)
OUTERBOSS_NODENAME=""
WINSUPPORT=0

125 126 127 128 129 130 131 132
#
# Variables for Windows Unattended setup files.
#
AC_SUBST(WINDOWS_ORGNAME)
AC_SUBST(WINDOWS_OWNER)
AC_SUBST(WINDOWS_TIMEZONE)
AC_SUBST(WINDOWS_KEY_7PRO_X86)

Leigh Stoller's avatar
Leigh Stoller committed
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
#
# Allow tbdefs file that is supplied to full emulab build
#
AC_ARG_WITH(TBDEFS,
[  --with-TBDEFS=name	Specify definitions file (defs-default default)],
[
    if test "$withval" = "yes"; then
	AC_MSG_ERROR([Invalid TBDEFS - Must specify the value])
    fi
    TBDEFS="$withval"
    TBPATH=`dirname $withval`

    if test -f $TBDEFS; then
        #
        # Remove the comments and newlines.  Really, that's what it does.
        #
        OLDPATH=$PATH
        PATH="$TBPATH:$PATH"
        . $TBDEFS
        PATH=$OLDPATH
    else
        AC_MSG_ERROR([Definitions file $TBDEFS was not found.])
    fi
])

158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
AC_ARG_ENABLE(windows,
[  --enable-windows[[=yes/no]]  Enable Windows FAT/NTFS support in imagezip [[default=no]]])

if test "$enable_windows" = "no"; then
	WINSUPPORT=0;
elif test "$enable_windows" = "yes"; then
	WINSUPPORT=1;
fi

if test $WINSUPPORT -eq 0; then
	winfiles="";
else
	winfiles="os/imagezip/ntfs/GNUmakefile \
		  os/imagezip/ntfs/liblocale/GNUmakefile \
		  os/imagezip/ntfs/libntfs/GNUmakefile \
		  os/imagezip/fat/GNUmakefile"
        AC_DEFINE_UNQUOTED(WINSUPPORT, 1)
fi

Leigh Stoller's avatar
Leigh Stoller committed
177 178 179 180 181 182 183 184 185 186 187 188 189
#
# Allow command line option, since might not have a defs file.
#
AC_ARG_ENABLE(elvin_compat,
[  --enable-elvin_compat[[=yes/no]]  Include Elvin Hash compat [[default=no]]])

if test "$enable_elvin_compat" = "yes"; then
    ELVIN_COMPAT=1
fi
if test $ELVIN_COMPAT -eq 1; then
    AC_DEFINE_UNQUOTED(ELVIN_COMPAT, 1)
fi

190 191 192 193 194 195 196 197 198 199
AC_ARG_ENABLE(TPM,
[  --enable-TPM[[=yes/no]]           Include TPM support [[default=no]]])

if test "$enable_TPM" = "yes"; then
    TPM=1
fi
if test $TPM -eq 1; then
    AC_DEFINE_UNQUOTED(TPM, 1)
fi

Leigh Stoller's avatar
Leigh Stoller committed
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
# BEGIN Python detection. For the event library.
AC_PATH_PROGS(PYTHON, python python2.6 python2.5 python2.4 python2.3 python2.2)

if test x"$PYTHON" = x""; then
    AC_MSG_ERROR([python not detected])
fi

PYTHON_VERSION=`${PYTHON} -V 2>&1 | cut -d ' ' -f 2 | cut -d '.' -f 1,2`
PYTHON_PATH=`dirname ${PYTHON}`
if test ! -d "$PYTHON_PATH/include"; then
    PYTHON_PATH=`dirname ${PYTHON_PATH}`
fi
PYTHON_INCLUDE="${PYTHON_PATH}/include/python${PYTHON_VERSION}"
CPPFLAGS="${CPPFLAGS} -I${PYTHON_INCLUDE}"
AC_CHECK_HEADERS([Python.h],
		 [],
		 [AC_MSG_WARN("Cannot find Python.h in ${PYTHON_INCLUDE}")])
AC_SUBST(PYTHON_INCLUDE)
# END Python detection.

220 221 222 223 224
# Conditional files created for various versions of Windows
# based on which variables are defined.

# Win7 Pro x86
if test -n ${WINDOWS_KEY_7PRO_X86}; then
225 226
   WIN7_IMNAME="Windows 7 PROFESSIONAL"
   sed -e "s/@WIN7_IMNAME@/$WIN7_IMNAME/" < $srcdir/tmcc/cygwinseven/unattend-x86.xml.in.tmpl > $srcdir/tmcc/cygwinseven/unattend-7pro-x86.xml.in
227 228 229
   winfiles="$winfiles tmcc/cygwinseven/unattend-7pro-x86.xml"
fi

230
outfiles="Makeconf GNUmakefile setversion \
231 232 233 234
	  lib/GNUmakefile \
          lib/libtb/GNUmakefile \
          lib/tmcd/GNUmakefile \
          lib/event/GNUmakefile \
235
	  event/GNUmakefile \
Leigh Stoller's avatar
Leigh Stoller committed
236
	  event/program-agent/GNUmakefile \
237
	  event/disk-agent/GNUmakefile \
Leigh Stoller's avatar
Leigh Stoller committed
238
	  event/link-agent/GNUmakefile \
239 240
	  event/proxy/GNUmakefile \
	  event/tevc/GNUmakefile \
241
	  event/trafgen/GNUmakefile \
242 243 244 245 246 247
	  event/linktest/GNUmakefile \
	  event/linktest/iperf/GNUmakefile \
	  event/linktest/rude/GNUmakefile \
	  event/linktest/weblinktest event/linktest/linktest.proxy \
	  event/linktest/linktest_control \
	  event/linktest/run_linktest.pl \
248
 	  event/delay-agent/GNUmakefile \
Leigh Stoller's avatar
Leigh Stoller committed
249
	  tools/GNUmakefile \
Leigh Stoller's avatar
Leigh Stoller committed
250
	  tools/pcapper/GNUmakefile \
Leigh Stoller's avatar
Leigh Stoller committed
251 252
	  sensors/GNUmakefile \
	  sensors/slothd/GNUmakefile \
Leigh Stoller's avatar
Leigh Stoller committed
253
	  sensors/canaryd/GNUmakefile \
254 255 256 257 258 259 260 261
	  tmcc/GNUmakefile \
	  tmcc/common/GNUmakefile tmcc/common/config/GNUmakefile \
	  tmcc/freebsd/GNUmakefile tmcc/freebsd/init/GNUmakefile \
	  tmcc/freebsd/init/4/GNUmakefile \
	  tmcc/freebsd/init/5/GNUmakefile \
	  tmcc/freebsd/init/6/GNUmakefile \
	  tmcc/freebsd/init/7/GNUmakefile \
	  tmcc/freebsd/init/8/GNUmakefile \
262
	  tmcc/freebsd/init/9/GNUmakefile \
263
	  tmcc/freebsd/init/10/GNUmakefile \
264 265 266 267 268
	  tmcc/freebsd/supfile tmcc/freebsd/sethostname \
	  tmcc/linux/GNUmakefile tmcc/linux/supfile \
	  tmcc/linux/sethostname.dhclient \
	  tmcc/linux9/GNUmakefile tmcc/linux9/supfile \
	  tmcc/fedora/GNUmakefile tmcc/fedora/supfile \
269
	  tmcc/fedora15/GNUmakefile \
270 271
	  tmcc/linux-sg/GNUmakefile tmcc/ubuntu7/GNUmakefile \
	  tmcc/ubuntu10/GNUmakefile \
272
	  tmcc/ubuntu11/GNUmakefile \
273 274
	  tmcc/freebsd5/GNUmakefile tmcc/freebsd5/supfile \
	  tmcc/freebsd6/GNUmakefile tmcc/freebsd6/supfile \
275 276
	  tmcc/freebsd6/netif-emulab \
	  tmcc/freebsd7/GNUmakefile tmcc/freebsd7/netif-emulab \
Mike Hibler's avatar
Mike Hibler committed
277
	  tmcc/freebsd9/GNUmakefile tmcc/freebsd9/netif-emulab \
278
	  tmcc/freebsd10/GNUmakefile tmcc/freebsd10/netif-emulab \
279 280
	  tmcc/cygwinxp/GNUmakefile tmcc/dp/GNUmakefile \
	  tmcc/openbsd/GNUmakefile tmcc/ron/GNUmakefile \
281
	  tmcc/plab/GNUmakefile tmcc/cygwinseven/GNUmakefile \
282
	  tmcc/centos6/GNUmakefile \
Leigh Stoller's avatar
Leigh Stoller committed
283
	  os/GNUmakefile os/syncd/GNUmakefile \
284 285 286 287 288 289 290
	  os/dijkstra/GNUmakefile os/genhostsfile/GNUmakefile \
	  os/frisbee.redux/GNUmakefile \
	  os/growdisk/GNUmakefile \
	  os/zapdisk/GNUmakefile \
	  os/imagezip/GNUmakefile \
	  os/imagezip/ffs/GNUmakefile \
	  os/imagezip/extfs/GNUmakefile \
291
	  $winfiles \
292 293
	  os/imagezip/hashmap/GNUmakefile \
	  protogeni/GNUmakefile"
294 295 296 297 298 299 300 301 302

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

AC_OUTPUT($outfiles)

303