summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac46
1 files changed, 22 insertions, 24 deletions
diff --git a/configure.ac b/configure.ac
index eb96f64..c8940c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,14 +2,8 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.56)
-
-AC_DEFINE(PACKAGE, [Baltisot], "Package name")
-AC_DEFINE(VERSION, [0.1.0], "Version")
-
-AC_SUBST(PACKAGE, [Baltisot])
-AC_SUBST(VERSION, [0.1.0])
-
-AC_INIT([Baltisot], [0.1.0], [pixel@nobis-crew.org])
+AC_INIT([Baltisot],[0.1.0],[pixel@nobis-crew.org])
+AM_INIT_AUTOMAKE(Balisot, 0.1.0)
AC_CONFIG_SRCDIR(src/Main.cc)
AM_CONFIG_HEADER(config.h)
@@ -25,7 +19,6 @@ AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_PROG_YACC
AM_PROG_LIBTOOL
-AC_ARG_PROGRAM
# Checks for libraries.
AC_CHECK_LIB([c], [printf])
@@ -69,20 +62,26 @@ if test x$ac_cv_search_deflate != xno ; then
OLDCPPFLAGS=$CPPFLAGS
CPPFLAGS="-Werror"
AC_CACHE_CHECK([for well defined gzwrite in zlib.h], ac_cv_wd_gzwrite,
- AC_TRY_COMPILE(
- [#include <zlib.h>],
- [const char * buf = "Poide"; gzwrite(NULL, buf, 10);],
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <zlib.h>]],
+ [[const char * buf = "Poide"; gzwrite(NULL, buf, 10);]]
+ )],
[AC_DEFINE([HAVE_WD_ZLIB], 1, [Have a well structured ZLIB])
- ac_cv_wd_gzwrite="yes"],
- [ac_cv_wd_gzwrite="no"]
- AC_WARNING([You have a broken zconf.h. You should]
- [patch this using the zconf.h-patch file.]
- [Enabling workaround])
- )
+ ac_cv_wd_gzwrite="yes"],[ac_cv_wd_gzwrite="no"
+ ])
)
CPPFLAGS=$OLDCPPFLAGS
-fi
+else
+ AC_MSG_ERROR([no zlib found in the system.])
+fi
+if test x$ac_cv_wd_gzwrite != xyes ; then
+ AC_MSG_WARN([You have a broken zconf.h.]
+ [You should patch this using]
+ [the zconf.h-patch file.]
+ [Enabling workaround.])
+fi
AC_CHECK_FUNCS(gethostbyname)
AC_CHECK_FUNCS(regcomp)
@@ -98,11 +97,10 @@ else
AC_MSG_RESULT($system)
fi
-
-AC_DEFINE(USE_LONG_LONG, 1, [Use long long])
-AC_DEFINE(USE_DATE, 1, [Use the String's date extension])
-AC_DEFINE(DEBUG, 1, [Enable verbose debugging])
-
+AC_ARG_ENABLE([debug],
+ [ --enable-debug enable verbose debugging],
+ AC_DEFINE(DEBUG, 1, [Enable verbose debugging]))
+
AC_CONFIG_FILES([Makefile
doc/Makefile
include/Makefile