Configuration daemon for simple-netaid.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

116 lines
3.2 KiB

# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script
AC_PREREQ([2.69])
AC_INIT([snetaid],[1.0],[https://gitea.devuan.dev/aitor_czr/snetaid.git])
AM_INIT_AUTOMAKE([foreign])
AM_SILENT_RULES([yes])
AC_PREFIX_DEFAULT([/usr])
configure_flags="$*"
AC_DEFINE_UNQUOTED([CONFIG_FLAGS], ["$configure_flags"], [Flags passed to configure])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR(src/main.c)
# The earliest version of Libtool that can correctly process the project
LT_PREREQ(2.4.6)
dnl ***************************************************************************
dnl Internationalization
dnl ***************************************************************************
IT_PROG_INTLTOOL([0.35.0])
GETTEXT_PACKAGE=$PACKAGE
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.19.7])
LT_INIT([dlopen])
# ------------- Checks for programs
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MKDIR_P
AC_PROG_LN_S
AC_PROG_LIBTOOL
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADERS([config.h])
# Init script location
AC_ARG_WITH(initdir, AS_HELP_STRING(--with-initdir=DIR,Install init script in DIR (system dependent default)))
test "x$with_initdir" = xyes -o "x$with_initdir" = xno && with_initdir=
if test "x$with_initdir" = x ; then
if test -d /etc/init.d ; then
SYSINITDIR=/etc/init.d
else
if test -d /etc/rc.d/init.d ; then
SYSINITDIR=/etc/rc.d/init.d
else
AC_MSG_ERROR([missing --with-initdir=DIR])
fi
fi
else
SYSINITDIR="$with_initdir"
fi
AC_MSG_NOTICE([*** Init sript will be installed in $SYSINITDIR ***])
AC_SUBST(SYSINITDIR)
# Set paths here
AC_ARG_WITH(
[rootprefix],
[AS_HELP_STRING(
[--with-rootprefix=DIR],
[rootfs directory prefix for config files and kernel modules])],
[],
[with_rootprefix="\${prefix}"]
)
# Configured paths
AC_SUBST([rootprefix], [${with_rootprefix}])
# sysconfdir paths
AC_SUBST([snetaidconfdir],[${sysconfdir}/simple-netaid])
AC_SUBST([snetaidconffile],[${snetaidconfdir}/snetaid.conf])
# ------------------------------------------------------------------------------
AC_ARG_ENABLE([manpages], AS_HELP_STRING([--disable-manpages],[disable manpages]),[],[enable_manpages=no])
AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$enable_manpages" = "xyes"])
# ------------- Checks for header files
AC_HEADER_STDC
# Set the compilation flags.
AC_ARG_ENABLE(debug,
[AS_HELP_STRING([--enable-debug],
[No optimization, debug flags, no shared lib.])],
[AS_IF([test "x$enable_debug" != xno], [enable_debug=yes])],
[enable_debug=no])
AS_IF([test "x$enable_debug" = "xyes"],
[cflags_add="-g -O0"; enable_shared=no],
[cflags_add="-O3"])
CFLAGS="-Wall $cflags_add $CFLAGS"
AC_CONFIG_FILES([Makefile
src/Makefile
conf/Makefile]
po/Makefile.in)
AC_OUTPUT
# ------------------------------------------------------------------------------
AC_MSG_RESULT([
prefix: ${prefix}
snetaidconfdir: ${snetaidconfdir}
snetaidconffile: ${snetaidconffile}
])
# ------------------------------------------------------------------------------