diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 138 |
1 files changed, 138 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..972279b --- /dev/null +++ b/configure.ac @@ -0,0 +1,138 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.56) + +PACKAGE=Baltisot +VERSION=0.1.0 + +AC_SUBST(PACKAGE, [Baltisot]) +AC_SUBST(VERSION, [0.1.0]) + +AC_INIT([Baltisot], [0.1.0], [pixel@nobis-crew.org]) +AC_CONFIG_SRCDIR(src/Main.cc) +AM_CONFIG_HEADER(config.h) + +AM_MAINTAINER_MODE + +# Checks for programs. +AC_PROG_CXX +AC_PROG_CC +AC_PROG_CPP +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET +AC_PROG_RANLIB +AC_PROG_YACC +AM_PROG_LIBTOOL +AC_ARG_PROGRAM + +# Checks for libraries. +AC_CHECK_LIB([c], [printf]) + +# Checks for header files. +AC_FUNC_ALLOCA +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS([argz.h fcntl.h inttypes.h langinfo.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdio_ext.h stdlib.h string.h strings.h sys/param.h sys/socket.h sys/time.h unistd.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_C_CONST +AC_C_INLINE +AC_TYPE_OFF_T +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_HEADER_TIME +AC_STRUCT_TM +AC_C_VOLATILE + +# Checks for library functions. +AM_GNU_GETTEXT() +AC_SUBST(USE_INCLUDED_LIBINTL) +ALL_LINGUAS="fr" +AC_FUNC_FORK +AC_FUNC_MALLOC +AC_FUNC_MMAP +AC_FUNC_REALLOC +AC_TYPE_SIGNAL +AC_FUNC_STRFTIME +AC_FUNC_VPRINTF +AC_CHECK_FUNCS([__argz_count __argz_next __argz_stringify getcwd gethostbyname memmove mempcpy memset munmap nl_langinfo regcomp setlocale socket stpcpy strcasecmp strchr strcspn strdup strerror strrchr strstr strtoul]) + +AC_SEARCH_LIBS(socket, socket) +AC_SEARCH_LIBS(gethostbyname, nsl) +AC_SEARCH_LIBS(deflate, z) + +if test x$ac_cv_search_deflate != xno ; then + AC_DEFINE([HAVE_ZLIB], 1, [Have the ZLIB]) + 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_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]) + ) + ) + CPPFLAGS=$OLDCPPFLAGS +fi + +AC_CACHE_CHECK([usable long long], ac_cv_use_longlong, + AC_TRY_COMPILE( + [], + [unsigned long long t;], + [AC_DEFINE([USE_LONG_LONG], 1, [Can use Long Long]) + ac_cv_use_longlong="yes"], + [ac_cv_use_longlong="no"] + ) +) + +AC_CHECK_FUNCS(gethostbyname) +AC_CHECK_FUNCS(regcomp) +AC_CHECK_FUNCS(socket) + +AC_PATH_PROG(gmakepath, gmake) +AC_PATH_PROG(unamepath, uname) +if test "x$unamepath" = x; then + system="unknown" +else + AC_MSG_CHECKING(system type) + system=`$unamepath -s` + AC_MSG_RESULT($system) +fi + + + +AC_CONFIG_FILES([Makefile + doc/Makefile + include/Makefile + intl/Makefile + lib/Makefile + m4/Makefile + po/Makefile.in + src/Makefile + src/datas/Makefile]) +AC_OUTPUT + + +echo +echo \-\-\= $PACKAGE $VERSION \=\-\- +echo + +echo Build System .................... : $system +echo Build Host ...................... : $host +echo Install Prefix .................. : $prefix +echo + +if test _"$gmakepath" = _; then + echo configure complete, now type \'make\' +else + echo configure complete, now type \'gmake\' +fi +
\ No newline at end of file |