diff configure.in @ 95:ff1743cbe4aa

initial attempt at building a shared library
author Carl Byington <carl@five-ten-sg.com>
date Sat, 13 Sep 2008 20:15:40 -0700
parents cb14583c119a
children 2e3ec9511166
line wrap: on
line diff
--- a/configure.in	Tue Sep 09 11:11:56 2008 -0700
+++ b/configure.in	Sat Sep 13 20:15:40 2008 -0700
@@ -20,6 +20,7 @@
 AC_PROG_CPP
 AC_PROG_INSTALL
 AC_PROG_LN_S
+AC_PROG_LIBTOOL
 AC_PROG_MAKE_SET
 AC_PROG_RANLIB
 
@@ -80,17 +81,41 @@
       )
 
 
+# The following lines adds the --enable-libpst-shared option to configure:
+#
+# Give the user the choice to enter one of these:
+# --enable-libpst-shared
+# --enable-libpst-shared=yes
+# --enable-libpst-shared=no
+#
+AC_MSG_CHECKING([whether we are building libpst shared object])
+AC_ARG_ENABLE(libpst-shared,
+      AC_HELP_STRING([--enable-libpst-shared], [build libpst shared object]),
+      [if test "${enable_libpst_shared}" = "no" ; then
+          AC_MSG_RESULT([no])
+          AM_CONDITIONAL(BUILD_LIBPST_SHARED, test 0 = 1)
+      else
+          AC_MSG_RESULT([yes])
+          AM_CONDITIONAL(BUILD_LIBPST_SHARED, test 1 = 1)
+      fi],
+      # Default value for configure
+      [AC_MSG_RESULT([no])
+       AM_CONDITIONAL(BUILD_LIBPST_SHARED, test 0 = 1)]
+      )
+
+
 AC_OUTPUT(                  \
     Makefile                \
     debian/changelog        \
     debian/Makefile         \
     libpst.spec             \
+    libpst.pc               \
     html/Makefile           \
     info/Makefile           \
     man/Makefile            \
     src/Makefile            \
     src/version.h           \
-    src/pst2dii.cpp 	    \
+    src/pst2dii.cpp         \
     xml/Makefile            \
     xml/libpst              \
     )