libevent configure args to pick up installed version
authorFrank Lahm <franklahm@googlemail.com>
Mon, 27 Aug 2012 08:27:50 +0000 (10:27 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Mon, 27 Aug 2012 08:27:50 +0000 (10:27 +0200)
Remove configure argument --disable-libevent.
Add configure args --with-libevent-header|lib.

NEWS
etc/netatalk/Makefile.am
macros/netatalk.m4

diff --git a/NEWS b/NEWS
index e3b577b0c10e69908dde252a366269d39f3b42ac..e73877ea6231653ce9312cbcd69b1ef5dae710e7 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,9 @@ Changes in 3.0.1
 * FIX: handling of '/' and ':' in volume name
 * UPD: Install relevant includes necessary for building programs with
        installed headers and shared lib libatalk
+* UPD: libevent configure args to pick up installed version. Removed
+       configure arg --disable-libevent, added configure args
+       --with-libevent-header|lib.
 * REM: Remove --with-smbsharemodes configure option, it was an
        empty stub not yet implemented
 
index 10f90cefedad7c9de980f5ada4a04cdbc800af73..06e5a8c359134f366f170ae4258dab02f94ed0bb 100644 (file)
@@ -13,6 +13,8 @@ netatalk_CFLAGS = \
 netatalk_LDADD = \
        $(top_builddir)/libatalk/libatalk.la
 
+netatalk_LDFLAGS =
+
 if USE_BUILTIN_LIBEVENT
 netatalk_CFLAGS += \
        -I$(top_srcdir)/libevent/include \
@@ -20,4 +22,7 @@ netatalk_CFLAGS += \
 
 netatalk_LDADD += \
        $(top_builddir)/libevent/libevent.la
-endif
\ No newline at end of file
+else
+netatalk_CFLAGS += @LIBEVENT_CFLAGS@
+netatalk_LDFLAGS += @LIBEVENT_LDFLAGS@ -levent
+endif
index 3e57077827de55f35b726b83318ff9b1dd2131ff..7040eb0462a69526baabec134ebb1dc8cf6707fb 100644 (file)
@@ -15,18 +15,26 @@ AC_DEFUN([AC_DEVELOPER], [
 
 dnl Whether to disable bundled libevent
 AC_DEFUN([AC_NETATALK_LIBEVENT], [
-    AC_MSG_CHECKING([whether to disable bundled libevent (define CPPFLAGS and LDFLAGS otherwise appropiately to pick up installed version)])
-    AC_ARG_ENABLE(
-        bundled-libevent,
-        [AS_HELP_STRING([--disable-bundled-libevent],[whether the bundled version of libevent shall not be used (define CPPFLAGS and LDFLAGS otherwise appropiately to pick up installed version)
-        ])],
-        use_bundled_libevent=$enableval,
+    use_bundled_libevent=no
+    AC_MSG_CHECKING([whether to use bundled or installed libevent])
+    AC_ARG_WITH(
+        libevent-header,
+        [AS_HELP_STRING([--with-libevent-header],[path to libevent header files])],
+        LIBEVENT_CFLAGS=-I$withval,
         use_bundled_libevent=yes
     )
-
+    AC_ARG_WITH(
+        libevent-lib,
+        [AS_HELP_STRING([--with-libevent-lib],[path to libevent header library])],
+        LIBEVENT_LDFLAGS=-L$withval,
+        use_bundled_libevent=yes
+    )
+    AC_MSG_RESULT([$use_bundled_libevent])
     if test x"$use_bundled_libevent" = x"yes" ; then
         AC_CONFIG_SUBDIRS([libevent])
     fi
+    AC_SUBST(LIBEVENT_CFLAGS)
+    AC_SUBST(LIBEVENT_LDFLAGS)
     AM_CONDITIONAL(USE_BUILTIN_LIBEVENT, test x"$use_bundled_libevent" = x"yes")
 ])