X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=macros%2Fnetatalk.m4;h=51dbdcab882c17394a0b8bcdae010dc19fe2b2ee;hb=d4fdc0119a3fd21571e27aad6c3e6ff5c56ac880;hp=3e57077827de55f35b726b83318ff9b1dd2131ff;hpb=6b91cd3e2a098c7dc7efc049f23d26d4c91caaf3;p=netatalk.git diff --git a/macros/netatalk.m4 b/macros/netatalk.m4 index 3e570778..51dbdcab 100644 --- a/macros/netatalk.m4 +++ b/macros/netatalk.m4 @@ -15,18 +15,30 @@ 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, + 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 ) - - if test x"$use_bundled_libevent" = x"yes" ; then - AC_CONFIG_SUBDIRS([libevent]) + AC_ARG_WITH( + libevent-header, + [AS_HELP_STRING([--with-libevent-header],[path to libevent header files])], + [use_bundled_libevent=no; LIBEVENT_CFLAGS=-I$withval] + ) + AC_ARG_WITH( + libevent-lib, + [AS_HELP_STRING([--with-libevent-lib],[path to libevent library])], + [use_bundled_libevent=no; LIBEVENT_LDFLAGS=-L$withval] + ) + 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") ])