X-Git-Url: http://git.asbjorn.biz/?p=debian%2Fdhcpd-pools.git;a=blobdiff_plain;f=configure.ac;h=eab7a1b21fd710d232834a78ed25207838f7b51a;hp=5a5efdba73e0a86d6dd9e66cb5073160d7c5fc17;hb=HEAD;hpb=17c626c013020fef085a4579d32c994c2f435c21 diff --git a/configure.ac b/configure.ac index 5a5efdb..eab7a1b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,21 +1,38 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_PREREQ(2.63) +AC_PREREQ(2.64) AC_CONFIG_MACRO_DIR([m4]) -AC_INIT([dhcpd-pools],[2.13],[kerolasa@iki.fi],,[http://dhcpd-pools.sourceforge.net/]) -AM_INIT_AUTOMAKE(dhcpd-pools, 2.13) -AC_CONFIG_SRCDIR([config.h.in]) +AC_INIT([dhcpd-pools], + m4_esyscmd([build-aux/git-version-gen .tarball-version]), + [kerolasa@iki.fi],,[http://dhcpd-pools.sourceforge.net/]) +AM_INIT_AUTOMAKE +AC_CONFIG_SRCDIR([src/dhcpd-pools.h]) AC_CONFIG_HEADERS([config.h]) -# Checks for programs. +AC_GNU_SOURCE + +# Checks for programs +AC_PROG_AWK AC_PROG_CC +AC_PROG_CXX +AC_PROG_MAKE_SET +AC_PROG_LIBTOOL # Checks for libraries. LT_INIT # Checks for header files. -AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h netinet/in.h stdlib.h string.h strings.h sys/socket.h unistd.h]) + +AC_CHECK_HEADERS([arpa/inet.h \ + fcntl.h \ + libintl.h \ + netinet/in.h \ + stdlib.h \ + string.h \ + strings.h \ + sys/socket.h \ + unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL @@ -23,16 +40,31 @@ AC_TYPE_SIZE_T # Checks for library functions. AC_FUNC_MALLOC -AC_CHECK_FUNCS([inet_ntoa memset strerror strstr]) +AC_CHECK_FUNCS([inet_ntoa memset strerror strstr strdup]) # GNU commandline parsing in getopt.h present? AC_CHECK_HEADERS(getopt.h, AC_DEFINE(HAVE_GETOPT_H), - import_sources="getopt.c getopt1.c $import_sources") + import_sources="getopt.c getopt1.c $import_sources") AC_CONFIG_FILES([Makefile - man/Makefile - src/Makefile - contrib/Makefile]) + man/Makefile + src/Makefile + contrib/Makefile]) + +AC_MSG_CHECKING(whether program_invocation_short_name is defined) +AC_TRY_COMPILE([#include ], + [program_invocation_short_name = "test";], + AC_DEFINE(HAVE_PROGRAM_INVOCATION_SHORT_NAME, 1, + [Define if program_invocation_short_name is defined]) + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no)) + +AC_MSG_CHECKING([whether __progname is defined]) +AC_LINK_IFELSE([AC_LANG_PROGRAM([extern char *__progname;], + [if (*__progname == 0) return;])], + AC_DEFINE(HAVE___PROGNAME, 1, [Define if __progname is defined]) + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no)) AC_ARG_WITH(dhcpd-conf, [AC_HELP_STRING([--with-dhcpd-conf], [default path of dhcpd.conf])],