Bug 798476 - Fallback to --with-system-libevent=/usr when system libevent doesn't have a pkgconfig file. r=ted,f=jbeich
authorMike Hommey <mh+mozilla@glandium.org>
Sat, 06 Oct 2012 10:40:46 +0200
changeset 109520 1b3d773f582f2c88b28705bd25803195ddc8ea95
parent 109519 fea97483dacd986f4fa1de6687c56f772fd3bfd6
child 109521 4ff2eb1a97cdd6d98072d126d42692f67aab7e3b
push id23630
push useremorley@mozilla.com
push dateSat, 06 Oct 2012 19:35:27 +0000
treeherdermozilla-central@9f677c2bb33d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs798476
milestone18.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 798476 - Fallback to --with-system-libevent=/usr when system libevent doesn't have a pkgconfig file. r=ted,f=jbeich
configure.in
--- a/configure.in
+++ b/configure.in
@@ -3950,23 +3950,24 @@ dnl ====================================
 MOZ_ARG_WITH_STRING(system-libevent,
 [  --with-system-libevent[=PFX]
                           Use system libevent [installed at prefix PFX]],
     LIBEVENT_DIR=$withval)
 
 _SAVE_CFLAGS=$CFLAGS
 _SAVE_LDFLAGS=$LDFLAGS
 _SAVE_LIBS=$LIBS
+if test "$LIBEVENT_DIR" = yes; then
+    PKG_CHECK_MODULES(MOZ_LIBEVENT, libevent,
+        MOZ_NATIVE_LIBEVENT=1,
+        LIBEVENT_DIR=/usr)
+fi
 if test -z "$LIBEVENT_DIR" -o "$LIBEVENT_DIR" = no; then
     MOZ_NATIVE_LIBEVENT=
-elif test "$LIBEVENT_DIR" = yes; then
-    PKG_CHECK_MODULES(MOZ_LIBEVENT, libevent,
-        MOZ_NATIVE_LIBEVENT=1,
-        AC_MSG_ERROR([--with-system-libevent requested but libevent package not found]))
-else
+elif test -z "$MOZ_NATIVE_LIBEVENT"; then
     CFLAGS="-I${LIBEVENT_DIR}/include $CFLAGS"
     LDFLAGS="-L${LIBEVENT_DIR}/lib $LDFLAGS"
     MOZ_CHECK_HEADER(event.h,
         [if test ! -f "${LIBEVENT_DIR}/include/event.h"; then
              AC_MSG_ERROR([event.h found, but is not in ${LIBEVENT_DIR}/include])
          fi],
         AC_MSG_ERROR([--with-system-libevent requested but event.h not found]))
     AC_CHECK_LIB(event, event_init,