Complete.Org: Mailing Lists: Archives: freeciv-dev: November 1998:
[Freeciv-Dev] ./configure --with-xpm=path
Home

[Freeciv-Dev] ./configure --with-xpm=path

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] ./configure --with-xpm=path
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Mon, 30 Nov 1998 21:15:23 +1100

This patch should make specifying the Xpm paths to configure easier.
I can now configure on Solaris with Solaris cc with the simple:
  ./configure --with-xpm=/usr/local
(and the normal X libs in /usr/openwin are found automatically).
That works if the lib and include paths are based on the same prefix
with PREFIX/lib/libXpm.* and PREFIX/include/X11/xpm.h
If not, you can use, eg
  ./configure --with-xpm-lib=/usr/local/lib --with-xpm-include=/some/path
or individually, or in various other combinations...

-- David
diff -u -r --exclude-from exclude_auto fc-adv/configure.in 
freeciv-mod/configure.in
--- fc-adv/configure.in Mon Nov 30 18:54:49 1998
+++ freeciv-mod/configure.in    Mon Nov 30 19:32:21 1998
@@ -70,6 +70,29 @@
 esac], [server=true])
 AM_CONDITIONAL(SERVER, test x$server = xtrue)
 
+dnl General Xpm prefix:
+dnl "no" means no prefix is required
+AC_ARG_WITH(xpm,
+       [  --with-xpm=PREFIX       Xpm files are in PREFIX/lib and 
PREFIX/include],
+       xpm_prefix="$withval", 
+       xpm_prefix="no"
+)
+if test "$xpm_prefix" = "no"; then
+    xpm_libdir="no"
+    xpm_incdir="no"
+else
+    xpm_libdir="$xpm_prefix/lib"
+    xpm_incdir="$xpm_prefix/include"
+fi
+dnl May override general Xpm prefix with explicit individual paths:
+AC_ARG_WITH(xpm-lib,
+       [  --with-xpm-lib=DIR      Xpm library is in DIR],
+       xpm_libdir="$withval" 
+)
+AC_ARG_WITH(xpm-include,
+       [  --with-xpm-include=DIR  Xpm header file X11/xpm.h is in DIR],
+       xpm_incdir="$withval" 
+)
 
 dnl Checks for programs.
 AC_PROG_AWK
@@ -86,7 +109,18 @@
 if test x$client = xtrue; then
     dnl Checks for X:
     AC_PATH_XTRA
-    dnl CFLAGS="$CFLAGS $X_CFLAGS"
+    if test "$xpm_incdir" != "no"; then
+        X_CFLAGS="$X_CFLAGS -I$xpm_incdir"
+    fi
+    if test "$xpm_libdir" != "no"; then
+        X_LIBS="$X_LIBS -L$xpm_libdir"
+       dnl Try using R values set in AC_PATH_XTRA:
+        if test "$ac_R_nospace" = "yes"; then
+            X_LIBS="$X_LIBS -R$xpm_libdir"
+        elif test "$ac_R_space" = "yes"; then
+            X_LIBS="$X_LIBS -R $xpm_libdir"
+        fi
+    fi
     X_LIBS="$X_LIBS $X_PRE_LIBS"
 
     dnl Checks for X libs:

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] ./configure --with-xpm=path, David Pfitzner <=