[gimp] allow to disable libXpm



commit 5d8a9b156b7db2e486d9a9370ce3c303fdd9e23a
Author: Thorsten Vollmer <thorsten thvo de>
Date:   Sat May 29 22:16:08 2010 +0200

    allow to disable libXpm
    
     2 files changed, 10 insertions(+), 2 deletions(-)

 INSTALL      |    5 +++++
 configure.ac |    7 +++++--
 2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/INSTALL b/INSTALL
index d5f8f24..e74228d 100644
--- a/INSTALL
+++ b/INSTALL
@@ -162,6 +162,11 @@ These are:
   --without-aa.  The AA plug-in needs libaa and configure checks for
      its presense. Use --without-aa if you run into problems.
 
+  --without-libxpm.  The XPM plug-in needs libxpm and configure checks
+     for its presence. If for some reason you don't want to build the
+     XPM plug-in even though the library is installed, use
+     --without-libxpm to disable it explicitly.
+
   --without-mng.  The MNG plug-in needs libmng and configure checks
      for its presense. If for some reason you don't want to build the
      MNG plug-in even though the library is installed, use
diff --git a/configure.ac b/configure.ac
index edcf695..cf1af56 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1222,6 +1222,8 @@ AC_SUBST(AA_LIBS)
 # Check for libxpm
 ##################
 
+AC_ARG_WITH(libxpm,  [  --without-libxpm        build without XPM support])
+
 gimp_save_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS $X_CFLAGS"
 gimp_save_LDFLAGS="$LDFLAGS"
@@ -1229,8 +1231,9 @@ LDFLAGS="$LDFLAGS $X_LIBS"
 if test "$gdk_target" = x11; then
   lib_X11=-lX11
 fi
-have_libxpm=yes
-if test -z "$XPM_LIBS"; then
+have_libxpm=no
+if test "x$with_libxpm" != xno && test -z "$XPM_LIBS"; then
+  have_libxpm=yes
   AC_CHECK_LIB(Xpm, XpmReadFileToXpmImage,
     [AC_CHECK_HEADER(X11/xpm.h,
       FILE_XPM='file-xpm$(EXEEXT)'; XPM_LIBS="$X_LIBS $X_PRE_LIBS $lib_X11 -lXpm",



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]