summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Tkac <atkac@redhat.com>2009-03-30 13:16:58 +0200
committerMartin Nagy <mnagy@redhat.com>2009-03-30 15:13:29 +0200
commit1d9880f38526ea8e07457b08102b95ac50ab7d81 (patch)
tree71b42ca201b22e44c9bce3dca8cc7d83347200a7
parenta148a9f5f2659c60a534f82d0ec8736f90afa223 (diff)
downloadldap_driver_testing-1d9880f38526ea8e07457b08102b95ac50ab7d81.tar.gz
ldap_driver_testing-1d9880f38526ea8e07457b08102b95ac50ab7d81.tar.xz
ldap_driver_testing-1d9880f38526ea8e07457b08102b95ac50ab7d81.zip
Add configure.ac and Makefile.am.
-rw-r--r--Makefile.am1
-rw-r--r--configure.ac42
-rw-r--r--src/Makefile.am15
3 files changed, 58 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..af437a6
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = src
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
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..19892e6
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,15 @@
+lib_LTLIBRARIES = libdnsldap.la
+
+LIBMAJOR = 1
+LIBMINOR = 0
+
+HDRS = cache.h ldap_convert.h ldap_helper.h log.h rdlist.h semaphore.h \
+ settings.h str.h util.h zone_manager.h
+
+libdnsldap_la_SOURCES = $(HDRS) cache.c ldap_convert.c ldap_driver.c \
+ ldap_helper.c log.c rdlist.c semaphore.c settings.c str.c \
+ zone_manager.c
+
+libdnsldap_la_CFLAGS = -Wall -Wextra -pedantic -std=c99
+
+libdnsldap_la_LDFLAGS = -version-info $(LIBMAJOR):$(LIBMINOR):0