home directory of the petidomo user. Now, Petidomo expects its master config file in ETCDIR, which is '/etc' per default. All other paths will be set there at run-time.
68 lines
1.3 KiB
Plaintext
68 lines
1.3 KiB
Plaintext
dnl
|
|
dnl configure.in -- Process this file with autoconf to produce a configure script.
|
|
dnl
|
|
dnl $Header$
|
|
dnl
|
|
|
|
AC_INIT(petidomo.h)
|
|
AC_CONFIG_AUX_DIR(../etc)
|
|
AC_REVISION($Revision$)dnl
|
|
|
|
dnl Checks for paths and programs.
|
|
dnl
|
|
AC_PROG_CC
|
|
AC_PROG_RANLIB
|
|
AC_PROG_LEX
|
|
if test "$LEX" != "flex"; then
|
|
AC_MSG_WARN($LEX might not work for us. Please install flex if the build fails.)
|
|
fi
|
|
AC_PROG_YACC
|
|
if test "$YACC" != "bison -y"; then
|
|
AC_MSG_WARN($YACC might not work for us. Please install bison if the build fails.)
|
|
fi
|
|
|
|
dnl Checks for typedefs
|
|
dnl
|
|
AC_CHECK_TYPE(ssize_t, long)
|
|
|
|
dnl Set special flags for gcc.
|
|
dnl
|
|
if test "$GCC" = yes; then
|
|
CFLAGS="$CFLAGS -Wall -pedantic -pipe"
|
|
fi
|
|
|
|
dnl Remove '-g' from the compile flags.
|
|
dnl
|
|
CFLAGS=`echo $CFLAGS | sed -e "s/-g//"`
|
|
|
|
dnl Turn '-O2' to '-O3'.
|
|
dnl
|
|
CFLAGS=`echo $CFLAGS | sed -e "s/-O2/-O3/"`
|
|
|
|
dnl Where is the /etc directory?
|
|
dnl
|
|
AC_MSG_CHECKING(etcdir)
|
|
AC_ARG_WITH(etcdir,
|
|
[ --with-etcdir=PATH Directory containing petidomo.conf (default /etc).],
|
|
[ case "$withval" in
|
|
no)
|
|
AC_MSG_ERROR(Need ETCDIR.)
|
|
;;
|
|
yes)
|
|
ETCDIR="/etc"
|
|
AC_MSG_RESULT(/etc)
|
|
;;
|
|
*)
|
|
ETCDIR="$withval"
|
|
AC_MSG_RESULT($withval)
|
|
;;
|
|
esac ],
|
|
ETCDIR="/etc"
|
|
AC_MSG_RESULT(/etc)
|
|
)
|
|
AC_SUBST(ETCDIR)
|
|
|
|
dnl Write results.
|
|
dnl
|
|
AC_OUTPUT(Makefile)
|