-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac
52 lines (46 loc) · 1.12 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
AC_PREREQ(2.59)
AC_INIT([router], [1.0], [email protected])
AM_INIT_AUTOMAKE
# Checks for programs.
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_YACC
AM_PROG_LIBTOOL
AM_PROG_LEX
# Less verbose compiling.
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# Option to build the standalone CLI.
AC_ARG_ENABLE(
[standalone_cli],
[ --enable-standalone-cli Build standalone CLI ],
[case "${enableval}" in
yes) standalone_cli=yes ;;
no) standalone_cli=no ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-standalone-cli]) ;;
esac],
[standalone_cli=no])
AM_CONDITIONAL([STANDALONE_CLI], [test x$standalone_cli = xyes])
# Determine the operating system.
AC_MSG_CHECKING([uname -s for detecting host operating system])
OSNAME=`uname -s`
case "$OSNAME" in
Linux*)
AC_MSG_RESULT(Linux)
linux=yes
;;
Darwin*)
AC_MSG_RESULT(Darwin)
darwin=yes
;;
esac
AM_CONDITIONAL(LINUX, test x$linux = xyes)
AM_CONDITIONAL(DARWIN, test x$darwin = xyes)
#AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_FILES([
Makefile
])
AC_OUTPUT
echo
echo "Building standalone cli: $standalone_cli"
echo