[vlc-commits] Check contribs after operating system (which sets SYS)

Rafaël Carré git at videolan.org
Sun Nov 20 23:00:25 CET 2011


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Sun Nov 20 16:58:10 2011 -0500| [9fc4ccebd9df60b4b7dc966268b42e1c7cc62d30] | committer: Rafaël Carré

Check contribs after operating system (which sets SYS)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9fc4ccebd9df60b4b7dc966268b42e1c7cc62d30
---

 configure.ac |  150 +++++++++++++++++++++++++++++-----------------------------
 1 files changed, 75 insertions(+), 75 deletions(-)

diff --git a/configure.ac b/configure.ac
index 864b46d..3984a3d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -97,81 +97,6 @@ AS_IF([test -n "${with_binary_version}"],[
 ])
 
 dnl
-dnl  Check for the contrib directory
-dnl
-AC_ARG_WITH(contrib,
-  [AS_HELP_STRING([--with-contrib[=DIR]],
-    [search for 3rd party libraries in DIR/include and DIR/lib])
-])
-AC_MSG_CHECKING([for 3rd party libraries path])
-AS_IF([test -z "${with_contrib}" || test "${with_contrib}" = "yes"], [
-  CONTRIB_DIR="${srcdir}/contrib/${host}"
-  AS_IF([test ! -d "${CONTRIB_DIR}"], [
-    echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
-    CONTRIB_DIR="${srcdir}/contrib/`$CC -dumpmachine`"
-    AS_IF([test ! -d "${CONTRIB_DIR}"], [
-      echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
-      CONTRIB_DIR="${srcdir}/extras/contrib/hosts/${host}"
-      AS_IF([test ! -d "${CONTRIB_DIR}"], [
-        echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
-        CONTRIB_DIR="${srcdir}/extras/contrib/hosts/`$CC -dumpmachine`"
-        AS_IF([test ! -d "${CONTRIB_DIR}"], [
-          echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
-          CONTRIB_DIR=""
-          AC_MSG_RESULT([not found])
-        ])
-      ])
-    ])
-  ])
-], [
-  AS_IF([test "${with_contrib}" != "no"], [
-    CONTRIB_DIR="${with_contrib}"
-  ], [
-    CONTRIB_DIR=""
-    AC_MSG_RESULT([disabled])
-  ])
-])
-AS_IF([test -n "${CONTRIB_DIR}"], [
-  AS_IF([test -d "${CONTRIB_DIR}/lib"],[
-    CONTRIB_DIR=`cd "${CONTRIB_DIR}" && pwd`
-  ], [
-    echo "${CONTRIB_DIR}/lib not found" >&AS_MESSAGE_LOG_FD
-    CONTRIB_DIR=""
-    AC_MSG_RESULT([not usable])
-  ])
-
-])
-AS_IF([test -n "${CONTRIB_DIR}"], [
-  AC_MSG_RESULT([${CONTRIB_DIR}])
-  export PATH=${CONTRIB_DIR}/bin:$PATH
-  CPPFLAGS="${CPPFLAGS} -I${CONTRIB_DIR}/include"
-  CPPFLAGS_save="${CPPFLAGS_save} -I${CONTRIB_DIR}/include"
-  CFLAGS="${CFLAGS} -I${CONTRIB_DIR}/include"
-  CFLAGS_save="${CFLAGS_save} -I${CONTRIB_DIR}/include"
-  CXXFLAGS="${CXXFLAGS} -I${CONTRIB_DIR}/include"
-  CXXFLAGS_save="${CXXFLAGS_save} -I${CONTRIB_DIR}/include"
-  OBJCFLAGS="${OBJCFLAGS} -I${CONTRIB_DIR}/include"
-  OBJCFLAGS_save="${OBJCFLAGS_save} -I${CONTRIB_DIR}/include"
-  AS_IF([test "$build" = "$host" -o "$PKG_CONFIG_LIBDIR"], [
-    export PKG_CONFIG_PATH="${CONTRIB_DIR}/lib/pkgconfig:$PKG_CONFIG_PATH"
-  ], [
-    export PKG_CONFIG_LIBDIR="${CONTRIB_DIR}/lib/pkgconfig"
-  ])
-  LDFLAGS="${LDFLAGS} -L${CONTRIB_DIR}/lib"
-  LDFLAGS_save="${LDFLAGS_save} -L${CONTRIB_DIR}/lib"
-
-  AS_IF([test "${SYS}" = "darwin"], [
-    export LD_LIBRARY_PATH="${CONTRIB_DIR}/lib:$LD_LIBRARY_PATH"
-    export DYLD_LIBRARY_PATH="${CONTRIB_DIR}/lib:$DYLD_LIBRARY_PATH"
-  ])
-], [
-  AS_IF([test -n "${with_contrib}" && test "${with_contrib}" != "no"], [
-    AC_MSG_ERROR([Third party libraries not found!])
-  ])
-])
-AC_SUBST(CONTRIB_DIR)
-
-dnl
 dnl  Check the operating system
 dnl
 HAVE_WIN64="0"
@@ -393,6 +318,81 @@ AM_CONDITIONAL(HAVE_WINCE,   test "${SYS}" = "mingwce")
 AM_CONDITIONAL(HAVE_SYMBIAN, test "${SYS}" = "symbian")
 
 dnl
+dnl  Check for the contrib directory
+dnl
+AC_ARG_WITH(contrib,
+  [AS_HELP_STRING([--with-contrib[=DIR]],
+    [search for 3rd party libraries in DIR/include and DIR/lib])
+])
+AC_MSG_CHECKING([for 3rd party libraries path])
+AS_IF([test -z "${with_contrib}" || test "${with_contrib}" = "yes"], [
+  CONTRIB_DIR="${srcdir}/contrib/${host}"
+  AS_IF([test ! -d "${CONTRIB_DIR}"], [
+    echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
+    CONTRIB_DIR="${srcdir}/contrib/`$CC -dumpmachine`"
+    AS_IF([test ! -d "${CONTRIB_DIR}"], [
+      echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
+      CONTRIB_DIR="${srcdir}/extras/contrib/hosts/${host}"
+      AS_IF([test ! -d "${CONTRIB_DIR}"], [
+        echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
+        CONTRIB_DIR="${srcdir}/extras/contrib/hosts/`$CC -dumpmachine`"
+        AS_IF([test ! -d "${CONTRIB_DIR}"], [
+          echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
+          CONTRIB_DIR=""
+          AC_MSG_RESULT([not found])
+        ])
+      ])
+    ])
+  ])
+], [
+  AS_IF([test "${with_contrib}" != "no"], [
+    CONTRIB_DIR="${with_contrib}"
+  ], [
+    CONTRIB_DIR=""
+    AC_MSG_RESULT([disabled])
+  ])
+])
+AS_IF([test -n "${CONTRIB_DIR}"], [
+  AS_IF([test -d "${CONTRIB_DIR}/lib"],[
+    CONTRIB_DIR=`cd "${CONTRIB_DIR}" && pwd`
+  ], [
+    echo "${CONTRIB_DIR}/lib not found" >&AS_MESSAGE_LOG_FD
+    CONTRIB_DIR=""
+    AC_MSG_RESULT([not usable])
+  ])
+
+])
+AS_IF([test -n "${CONTRIB_DIR}"], [
+  AC_MSG_RESULT([${CONTRIB_DIR}])
+  export PATH=${CONTRIB_DIR}/bin:$PATH
+  CPPFLAGS="${CPPFLAGS} -I${CONTRIB_DIR}/include"
+  CPPFLAGS_save="${CPPFLAGS_save} -I${CONTRIB_DIR}/include"
+  CFLAGS="${CFLAGS} -I${CONTRIB_DIR}/include"
+  CFLAGS_save="${CFLAGS_save} -I${CONTRIB_DIR}/include"
+  CXXFLAGS="${CXXFLAGS} -I${CONTRIB_DIR}/include"
+  CXXFLAGS_save="${CXXFLAGS_save} -I${CONTRIB_DIR}/include"
+  OBJCFLAGS="${OBJCFLAGS} -I${CONTRIB_DIR}/include"
+  OBJCFLAGS_save="${OBJCFLAGS_save} -I${CONTRIB_DIR}/include"
+  AS_IF([test "$build" = "$host" -o "$PKG_CONFIG_LIBDIR"], [
+    export PKG_CONFIG_PATH="${CONTRIB_DIR}/lib/pkgconfig:$PKG_CONFIG_PATH"
+  ], [
+    export PKG_CONFIG_LIBDIR="${CONTRIB_DIR}/lib/pkgconfig"
+  ])
+  LDFLAGS="${LDFLAGS} -L${CONTRIB_DIR}/lib"
+  LDFLAGS_save="${LDFLAGS_save} -L${CONTRIB_DIR}/lib"
+
+  AS_IF([test "${SYS}" = "darwin"], [
+    export LD_LIBRARY_PATH="${CONTRIB_DIR}/lib:$LD_LIBRARY_PATH"
+    export DYLD_LIBRARY_PATH="${CONTRIB_DIR}/lib:$DYLD_LIBRARY_PATH"
+  ])
+], [
+  AS_IF([test -n "${with_contrib}" && test "${with_contrib}" != "no"], [
+    AC_MSG_ERROR([Third party libraries not found!])
+  ])
+])
+AC_SUBST(CONTRIB_DIR)
+
+dnl
 dnl Sadly autoconf does not think about testing foo.exe when ask to test
 dnl for program foo on win32
 



More information about the vlc-commits mailing list