]> arthur.barton.de Git - netatalk.git/commitdiff
--with-libevent-header|lib requires a path
authorFrank Lahm <franklahm@googlemail.com>
Wed, 24 Oct 2012 10:18:43 +0000 (12:18 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Wed, 24 Oct 2012 10:18:43 +0000 (12:18 +0200)
Throw an error if any either configure option is passed without a path.

Add libevent to library configure summary.

macros/netatalk.m4
macros/summary.m4

index 7040eb0462a69526baabec134ebb1dc8cf6707fb..51dbdcab882c17394a0b8bcdae010dc19fe2b2ee 100644 (file)
@@ -15,24 +15,28 @@ AC_DEFUN([AC_DEVELOPER], [
 
 dnl Whether to disable bundled libevent
 AC_DEFUN([AC_NETATALK_LIBEVENT], [
-    use_bundled_libevent=no
-    AC_MSG_CHECKING([whether to use bundled or installed libevent])
+    AC_MSG_CHECKING([whether to use bundled libevent])
+    AC_ARG_WITH(
+        libevent,
+        [AS_HELP_STRING([--with-libevent],[whether to use the bundled libevent (default: yes)])],
+        use_bundled_libevent=$withval,
+        use_bundled_libevent=yes
+    )
     AC_ARG_WITH(
         libevent-header,
         [AS_HELP_STRING([--with-libevent-header],[path to libevent header files])],
-        LIBEVENT_CFLAGS=-I$withval,
-        use_bundled_libevent=yes
+        [use_bundled_libevent=no; LIBEVENT_CFLAGS=-I$withval]
     )
     AC_ARG_WITH(
         libevent-lib,
-        [AS_HELP_STRING([--with-libevent-lib],[path to libevent header library])],
-        LIBEVENT_LDFLAGS=-L$withval,
-        use_bundled_libevent=yes
+        [AS_HELP_STRING([--with-libevent-lib],[path to libevent library])],
+        [use_bundled_libevent=no; LIBEVENT_LDFLAGS=-L$withval]
     )
-    AC_MSG_RESULT([$use_bundled_libevent])
-    if test x"$use_bundled_libevent" = x"yes" ; then
-        AC_CONFIG_SUBDIRS([libevent])
+    if test x"$LIBEVENT_CFLAGS" = x"-Iyes" -o x"$LIBEVENT_LDFLAGS" = x"-Lyes" ; then
+        AC_MSG_ERROR([--with-libevent requires a path])
     fi
+    AC_MSG_RESULT([$use_bundled_libevent])
+    AC_CONFIG_SUBDIRS([libevent])
     AC_SUBST(LIBEVENT_CFLAGS)
     AC_SUBST(LIBEVENT_LDFLAGS)
     AM_CONDITIONAL(USE_BUILTIN_LIBEVENT, test x"$use_bundled_libevent" = x"yes")
index 94e84ac94ce565f2d103d882c6f1cbc7397ea3e5..8d9abc50fc0e0901a7b5bcf4e52fac82a4cc7524 100644 (file)
@@ -116,4 +116,11 @@ AC_DEFUN([AC_NETATALK_LIBS_SUMMARY], [
                AC_MSG_RESULT([        LIBS   = $LDAP_LDLFLAGS $LDAP_LIBS])
                AC_MSG_RESULT([        CFLAGS = $LDAP_CFLAGS])
        fi
+    AC_MSG_RESULT([    LIBEVENT:])
+    if test x"$use_bundled_libevent" = x"yes"; then
+               AC_MSG_RESULT([        bundled])
+    else
+               AC_MSG_RESULT([        LIBS   = $LIBEVENT_CFLAGS])
+               AC_MSG_RESULT([        CFLAGS = $LIBEVENT_LDFLAGS])
+    fi
 ])