about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--configure.in33
2 files changed, 30 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 2eddb2909a..a15f57e0e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 1999-10-04  Ulrich Drepper  <drepper@cygnus.com>
 
+	* configure.in: Add additional options --with-gd-include and
+	--with-gd-lib to help people with strange installations.
+
 	* malloc/Makefile: Add libdl dependency to libmemprof.so.
 	* malloc/Depend: New file.
 
diff --git a/configure.in b/configure.in
index 38900397ae..28290d8f3f 100644
--- a/configure.in
+++ b/configure.in
@@ -37,15 +37,36 @@ AC_ARG_WITH(gd, dnl
   --with-gd=DIR           find libgd include dir and library with prefix DIR,
 	    [dnl
 case "$with_gd" in
-yes|''|no) config_vars="$config_vars
-libgd-LDFLAGS =" ;;
-*) config_vars="$config_vars
-CFLAGS-memprofstat.c = -I$withval/include
-libgd-LDFLAGS = -L$withval/lib"
-   libgd_include="-I$withval/include"
+yes|''|no) ;;
+*) libgd_include="-I$withval/include"
    libgd_ldflags="-L$withval/lib" ;;
 esac
 ])
+AC_ARG_WITH(gd-include, dnl
+  --with-gd-include=DIR   find libgd include files in DIR,
+            [dnl
+case "$with_gd_include" in
+''|no) ;;
+*) libgd_include="-I$withval" ;;
+esac
+])
+AC_ARG_WITH(gd-lib, dnl
+  --with-gd-lib=DIR       find libgd library files in DIR,
+            [dnl
+case "$with_gd_lib" in
+''|no) ;;
+*) libgd_ldflags="-L$withval" ;;
+esac
+])
+
+if test -n "$libgd_include"; then
+  config_vars="$config_vars
+CFLAGS-memprofstat.c = $libgd_include"
+fi
+if test -n "$libgd_ldflags"; then
+  config_vars="$config_vars
+libgd-LDFLAGS = $libgd_ldflags"
+fi
 
 dnl Arguments to specify presence of other packages/features.
 AC_ARG_WITH(fp, dnl