[vlc-commits] Fix configure logic and improve it (autodetection)
Jean-Baptiste Kempf
git at videolan.org
Wed Dec 21 12:54:08 CET 2011
npapi-vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Dec 21 12:51:49 2011 +0100| [c2d71323423cfef60b22f0407b12f3d7bd7e8e4c] | committer: Jean-Baptiste Kempf
Fix configure logic and improve it (autodetection)
> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=c2d71323423cfef60b22f0407b12f3d7bd7e8e4c
---
configure.ac | 50 +++++++++++++++++++++++++++++---------------------
1 files changed, 29 insertions(+), 21 deletions(-)
diff --git a/configure.ac b/configure.ac
index 0374d24..7b108a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -180,33 +180,41 @@ test "$found" = 0 && AC_MSG_RESULT([no])
CPPFLAGS="${CPPFLAGS} ${MOZILLA_CFLAGS}"
-AC_ARG_WITH([gtk], AS_HELP_STRING([--with-gtk], [Build the GTK+ interface [default=yes]]),, [with_gtk=yes])
-AM_CONDITIONAL(USE_GTK, [ test "x$with_gtk" = "xyes" ])
AC_CHECK_HEADERS(npapi.h)
AC_CHECK_HEADERS(npruntime.h, [
- dnl if found
- AS_IF([ test "${SYS}" != "mingw32" -a "${SYS}" != "darwin" ], [
- AM_COND_IF(USE_GTK,
- [
- PKG_CHECK_MODULES(GTK, [gtk+-2.0],, [
- AC_MSG_ERROR([GTK+ >=2 not found. Re-run configure with --without-gtk.])
- ])
- ], [
- PKG_CHECK_MODULES(XPM, [xpm xt],, [
- AC_MSG_ERROR([Please install the libXpm and libXt development files, or re-run configure with --with-gtk])
- ])
- ])
- ])],[
- dnl if not found
- AC_MSG_ERROR([Please install the Mozilla development tools, required headers were not found.])
+ dnl if found
+ ],[
+ dnl if not found
+ AC_MSG_ERROR([Please install the Mozilla development tools, required headers were not found.])
], [
- #include <stdint.h>
- #if HAVE_NPAPI_H
- #include <npapi.h>
- #endif
+ #include <stdint.h>
+ #if HAVE_NPAPI_H
+ #include <npapi.h>
+ #endif
]
)
+AC_ARG_WITH([gtk], AS_HELP_STRING([--with-gtk], [Build the GTK+ interface [default=auto]]),, [with_gtk=yes])
+gtk_found=no
+AS_IF([ test "${SYS}" != "mingw32" -a "${SYS}" != "darwin" ], [
+ AS_IF([ test "x$with_gtk" != "xno" ],
+ [
+ PKG_CHECK_MODULES(GTK, [gtk+-2.0],
+ [gtk_found=yes],
+ [
+ AC_MSG_WARN([GTK+ >=2 not found. Re-run configure with --without-gtk.])
+ PKG_CHECK_MODULES(XPM, [xpm],, [
+ AC_MSG_ERROR([Please install the libXpm development files, or re-run configure with --with-gtk])
+ ])
+ ])
+ ], [
+ PKG_CHECK_MODULES(XPM, [xpm],, [
+ AC_MSG_ERROR([Please install the libXpm development files, or re-run configure with --with-gtk])
+ ])
+ ])
+])
+AM_CONDITIONAL(USE_GTK, [ test "x$gtk_found" = "xyes" ])
+
AC_MSG_CHECKING([if NPP_GetMIMEDescription() returns const])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#ifdef WIN32
More information about the vlc-commits
mailing list