From 1bee0e49f40cf2e5b0e11a3c0929766028fa28b1 Mon Sep 17 00:00:00 2001
From: Andrea Zagli <azagli@libero.it>
Date: Mon, 31 May 2010 17:39:58 +0200
Subject: [PATCH] Changes to autotools to compile on windows.

---
 config.h.in     | 68 +++++++++++++++++++++++++++++++++++++++++++++++++
 configure.ac    |  4 +++
 src/Makefile.am |  2 ++
 3 files changed, 74 insertions(+)
 create mode 100644 config.h.in

diff --git a/config.h.in b/config.h.in
new file mode 100644
index 0000000..147079b
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,68 @@
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#undef LT_OBJDIR
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+#undef TM_IN_SYS_TIME
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
diff --git a/configure.ac b/configure.ac
index 2fcc9a2..75cff57 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,11 +4,15 @@
 AC_PREREQ(2.59)
 AC_INIT([libaudit], [0.0.1], [azagli@libero.it])
 AC_CONFIG_SRCDIR([src/audit.c])
+AC_CONFIG_HEADER([config.h])
 
 AM_INIT_AUTOMAKE
 
 AM_MAINTAINER_MODE
 
+AC_CANONICAL_SYSTEM
+AC_LIBTOOL_WIN32_DLL
+
 # Checks for programs.
 AC_PROG_CC
 AC_PROG_LIBTOOL
diff --git a/src/Makefile.am b/src/Makefile.am
index f13a0b1..1453091 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -9,5 +9,7 @@ lib_LTLIBRARIES = libaudit.la
 libaudit_la_SOURCES = \
         audit.c
 
+libaudit_la_LDFLAGS = -no-undefined
+
 include_HEADERS = \
         libaudit.h
-- 
2.49.0