This repository has been archived on 2025-02-12. You can view files and clone it, but cannot push or open issues or pull requests.
NeoStats-logserv/configure.in

94 lines
2.2 KiB
Text
Raw Permalink Normal View History

2003-12-31 05:13:44 +00:00
dnl Process this file with autoconf to produce a configure script.
AC_INIT(logserv.c)
AC_CONFIG_HEADER(modconfig.h)
2005-02-19 23:45:00 +00:00
2003-12-31 05:13:44 +00:00
PACKAGE=LogServ
2004-09-10 14:49:36 +00:00
MODULE_MAJOR=3
2005-02-19 23:45:00 +00:00
MODULE_MINOR=0
2005-12-12 13:26:36 +00:00
MODULE_REV=a3
2005-02-19 23:45:00 +00:00
VERSION=$MODULE_MAJOR.$MODULE_MINOR.$MODULE_REV
2004-03-13 23:49:38 +00:00
AC_DEFINE_UNQUOTED(MODULE_VERSION, "$VERSION")
AC_DEFINE_UNQUOTED(MODULE_MAJOR, "$MODULE_MAJOR")
AC_DEFINE_UNQUOTED(MODULE_MINOR, "$MODULE_MINOR")
2005-02-22 15:57:58 +00:00
AC_DEFINE_UNQUOTED(MODULE_REV, "$MODULE_REV")
2004-09-10 14:49:36 +00:00
DIRINST=~/NeoStats3.0/
AC_PREFIX_DEFAULT(~/NeoStats3.0/)
2005-07-01 09:11:20 +00:00
CFLAGS="$CFLAGS -O2 -fno-strict-aliasing"
2003-12-31 05:13:44 +00:00
2005-02-19 23:45:00 +00:00
case "$host_os" in
*openbsd*)
MAKEDEPENDENCIES="";;
*freebsd*)
MAKEDEPENDENCIES="";;
*)
MAKEDEPENDENCIES="-include \$(OBJS:.o=.d)";;
esac
2003-12-31 05:13:44 +00:00
AC_MSG_CHECKING(Location of NeoStats...)
AC_ARG_WITH(neostats,
[ --with-neostats=DIR Location of NeoStats installation],
[DIRINST=$withval])
AC_MSG_RESULT($DIRINST)
2004-09-10 15:06:35 +00:00
AC_CHECK_FILE($DIRINST/include/neostats.h,
2003-12-31 05:13:44 +00:00
[INCLUDEDIR="$DIRINST/include/"],
[AC_MSG_ERROR(Can't find existing NeoStats Installation please supply with --with-neostats option)])
CPPFLAGS="$CPPFLAGS -I$INCLUDEDIR"
dnl Check we are running the latest supported version of NeoStats
AC_MSG_CHECKING(Version of NeoStats...)
AC_TRY_RUN(
[
#include <config.h>
#include <stdlib.h>
int main(void) {
2004-09-10 14:49:36 +00:00
if (MAJOR >= 3) {
if (MINOR >= 0) {
exit(0);
2003-12-31 05:13:44 +00:00
}
}
exit(1);
}
], ns_version_ok='yes',
ns_version_ok='no',
ns_version_ok='no')
if test "$ns_version_ok" = "yes"; then
2005-02-19 23:45:00 +00:00
AC_MSG_RESULT(Compatible version);
2003-12-31 05:13:44 +00:00
else
2005-03-08 22:03:16 +00:00
AC_MSG_ERROR(This module requires NeoStats 3.0.a2 or higher)
2003-12-31 05:13:44 +00:00
fi
2005-02-19 23:45:00 +00:00
dnl check if we are running with debug....
AC_MSG_CHECKING(Whether to enable debug...)
2003-12-31 05:13:44 +00:00
AC_ARG_ENABLE(debug,
2005-02-19 23:45:00 +00:00
[ --enable-debug - enable debug],
2003-12-31 05:13:44 +00:00
[ case "$enableval" in
yes)
CFLAGS="$CFLAGS -Wall -ggdb"
AC_DEFINE(DEBUG,1)
2005-02-19 23:45:00 +00:00
AC_MSG_RESULT(yes)
2003-12-31 05:13:44 +00:00
;;
*)
AC_MSG_RESULT(no)
;;
esac],
AC_MSG_RESULT(no)
)
2005-02-19 23:45:00 +00:00
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
2003-12-31 05:13:44 +00:00
AC_SUBST(DIRINST)
2005-02-19 23:45:00 +00:00
AC_SUBST(MAKEDEPENDENCIES)
2003-12-31 05:13:44 +00:00
AC_SUBST(CFLAGS)
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
2003-12-31 05:13:44 +00:00
AC_OUTPUT(Makefile)
2005-02-19 23:45:00 +00:00
echo "Configuration complete."
2005-02-22 00:38:12 +00:00
read -p "Press Enter key to read the release notes"
clear
more RELNOTES
2005-02-19 23:45:00 +00:00
echo "Run 'make' (or 'gmake' on some systems) to compile NeoStats."
echo "If you require support, see the README file."