diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..7e69d05 --- /dev/null +++ b/configure.ac @@ -0,0 +1,42 @@ +AC_PREREQ([2.59]) +AC_INIT([libdnsldap], [0.1.0a1], [put_bugreport_address_here]) + +AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2]) + +AC_CONFIG_SRCDIR([src/zone_manager.h]) +AC_CONFIG_HEADERS([config.h]) + +# Checks for programs. +AC_PROG_CC +AC_PROG_LIBTOOL + +# Checks for libraries. +AC_CHECK_LIB([dns], [dns_name_init]) +AC_CHECK_LIB([ldap], [ldap_initialize]) + +# Checks for header files. +AC_CHECK_HEADERS([stddef.h stdlib.h string.h strings.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_TYPE_SIZE_T + +# Checks for library functions. +AC_CHECK_FUNCS([memset strcasecmp strncasecmp]) + +# Check version of libdns +AC_MSG_CHECKING([libdns version]) +AC_TRY_RUN([ +#include <stdio.h> +#include <dns/version.h> +int main(void) { + printf("%d\n", dns_libinterface); + return 0; +}],[LIBDNS_VERSION_MAJOR=`./conftest$ac_exeext` + AC_DEFINE_UNQUOTED([LIBDNS_VERSION_MAJOR], [$LIBDNS_VERSION_MAJOR], + [Define libdns version])], +[AC_MSG_ERROR([Can't obtain libdns version.])], +[AC_MSG_ERROR([Cross compilling is not supported.])] +) + +AC_CONFIG_FILES([Makefile src/Makefile]) +AC_OUTPUT |