2014-04-26 02:57:48 +02:00
|
|
|
AC_PREREQ(2.60)
|
|
|
|
AC_INIT(iwd, 0.0)
|
|
|
|
|
2014-04-28 01:12:54 +02:00
|
|
|
AC_CONFIG_HEADERS(config.h)
|
|
|
|
AC_CONFIG_AUX_DIR(build-aux)
|
|
|
|
AC_CONFIG_MACRO_DIR(build-aux)
|
|
|
|
|
2014-04-26 02:57:48 +02:00
|
|
|
AM_INIT_AUTOMAKE([foreign subdir-objects color-tests silent-rules
|
|
|
|
tar-pax no-dist-gzip dist-xz])
|
|
|
|
|
|
|
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
|
|
|
|
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
|
|
|
|
AC_PREFIX_DEFAULT(/usr/local)
|
|
|
|
|
2014-07-15 22:18:59 +02:00
|
|
|
COMPILER_FLAGS
|
|
|
|
|
|
|
|
AC_LANG_C
|
|
|
|
|
2014-04-26 02:57:48 +02:00
|
|
|
AC_PROG_CC
|
2014-07-15 22:18:59 +02:00
|
|
|
AC_PROG_CC_PIE
|
2014-04-26 02:57:48 +02:00
|
|
|
AC_PROG_INSTALL
|
2014-04-28 01:12:54 +02:00
|
|
|
AC_PROG_MKDIR_P
|
|
|
|
AC_PROG_LN_S
|
|
|
|
|
|
|
|
LT_PREREQ(2.2)
|
|
|
|
LT_INIT([disable-static])
|
|
|
|
|
2014-07-16 02:10:15 +02:00
|
|
|
AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization],
|
|
|
|
[disable code optimization through compiler]), [
|
|
|
|
if (test "${enableval}" = "no"); then
|
2016-08-10 00:32:56 +02:00
|
|
|
CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -O0"
|
2014-07-16 02:10:15 +02:00
|
|
|
fi
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],
|
|
|
|
[enable compiling with debugging information]), [
|
|
|
|
if (test "${enableval}" = "yes" &&
|
|
|
|
test "${ac_cv_prog_cc_g}" = "yes"); then
|
|
|
|
CFLAGS="$CFLAGS -g"
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(pie, AC_HELP_STRING([--enable-pie],
|
|
|
|
[enable position independent executables flag]), [
|
|
|
|
if (test "${enableval}" = "yes" &&
|
|
|
|
test "${ac_cv_prog_cc_pie}" = "yes"); then
|
|
|
|
CFLAGS="$CFLAGS -fPIE"
|
|
|
|
LDFLAGS="$LDFLAGS -pie"
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
|
2015-04-26 18:14:08 +02:00
|
|
|
if (test "${prefix}" = "NONE"); then
|
|
|
|
dnl no prefix and no localstatedir, so default to /var
|
|
|
|
if (test "$localstatedir" = '${prefix}/var'); then
|
|
|
|
AC_SUBST([localstatedir], ['/var'])
|
|
|
|
fi
|
|
|
|
|
|
|
|
prefix="${ac_default_prefix}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if (test "$localstatedir" = '${prefix}/var'); then
|
|
|
|
storagedir="${prefix}/var/lib/iwd"
|
|
|
|
else
|
|
|
|
storagedir="${localstatedir}/lib/iwd"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_DEFINE_UNQUOTED(STORAGEDIR, "${storagedir}",
|
|
|
|
[Directory for the storage files])
|
2015-02-27 21:04:34 +01:00
|
|
|
AC_CHECK_HEADERS(linux/types.h linux/if_alg.h)
|
|
|
|
|
2014-08-15 21:10:58 +02:00
|
|
|
AC_PATH_PROG(A2X, [a2x], [], $PATH:/sbin:/usr/sbin)
|
|
|
|
|
2014-04-28 01:12:54 +02:00
|
|
|
AC_CONFIG_FILES(Makefile)
|
|
|
|
|
|
|
|
AC_OUTPUT
|
2014-04-26 02:57:48 +02:00
|
|
|
|
2014-04-28 01:12:54 +02:00
|
|
|
AC_MSG_RESULT([
|
|
|
|
$PACKAGE_NAME $VERSION
|
|
|
|
])
|