diff options
author | Adam Tkac <atkac@redhat.com> | 2009-03-30 13:16:58 +0200 |
---|---|---|
committer | Martin Nagy <mnagy@redhat.com> | 2009-03-30 15:13:29 +0200 |
commit | 1d9880f38526ea8e07457b08102b95ac50ab7d81 (patch) | |
tree | 71b42ca201b22e44c9bce3dca8cc7d83347200a7 /configure.ac | |
parent | a148a9f5f2659c60a534f82d0ec8736f90afa223 (diff) | |
download | ldap_driver-1d9880f38526ea8e07457b08102b95ac50ab7d81.tar.gz ldap_driver-1d9880f38526ea8e07457b08102b95ac50ab7d81.tar.xz ldap_driver-1d9880f38526ea8e07457b08102b95ac50ab7d81.zip |
Add configure.ac and Makefile.am.
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 |