summaryrefslogtreecommitdiff
path: root/sysutils/ups-nut-cgi
diff options
context:
space:
mode:
authordillo <dillo@pkgsrc.org>2002-10-02 23:36:06 +0000
committerdillo <dillo@pkgsrc.org>2002-10-02 23:36:06 +0000
commita13fbf89bda82bf85f8ed83065fd58b0abe757b3 (patch)
tree7fbedc484d2ec2e9eb3fd494b543afed4e614465 /sysutils/ups-nut-cgi
parentc026aa72ae9d540f90e6e7c8c59a8561203a92c9 (diff)
downloadpkgsrc-a13fbf89bda82bf85f8ed83065fd58b0abe757b3.tar.gz
get rid of autoconf build dependency by patching configure
Diffstat (limited to 'sysutils/ups-nut-cgi')
-rw-r--r--sysutils/ups-nut-cgi/Makefile6
-rw-r--r--sysutils/ups-nut-cgi/distinfo3
-rw-r--r--sysutils/ups-nut-cgi/patches/patch-af541
3 files changed, 544 insertions, 6 deletions
diff --git a/sysutils/ups-nut-cgi/Makefile b/sysutils/ups-nut-cgi/Makefile
index b1bd1254dc9..3a47c52d84f 100644
--- a/sysutils/ups-nut-cgi/Makefile
+++ b/sysutils/ups-nut-cgi/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2002/08/25 21:51:07 jlam Exp $
+# $NetBSD: Makefile,v 1.19 2002/10/02 23:36:06 dillo Exp $
DISTNAME= nut-0.50.0
PKGNAME= ups-nut-cgi-0.50.0
@@ -9,7 +9,6 @@ MAINTAINER= lukem@netbsd.org
HOMEPAGE= http://www.exploits.org/nut/
COMMENT= Network UPS Tools CGI scripts
-BUILD_DEPENDS+= autoconf>=2.13:../../devel/autoconf
DEPENDS+= ups-nut-0.*:../../sysutils/ups-nut
ALL_TARGET= cgi
@@ -28,8 +27,5 @@ CONFIGURE_ARGS+= --sysconfdir=${NUT_CONFDIR} \
--with-cgipath=${NUT_CGIDIR} \
--with-graphics=${LOCALBASE}
-pre-configure:
- cd ${WRKSRC}; ${LOCALBASE}/bin/autoreconf --force
-
.include "../../graphics/gd/buildlink2.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/ups-nut-cgi/distinfo b/sysutils/ups-nut-cgi/distinfo
index 6e8ba20ce46..bddeffc2aed 100644
--- a/sysutils/ups-nut-cgi/distinfo
+++ b/sysutils/ups-nut-cgi/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.10 2002/08/25 21:51:07 jlam Exp $
+$NetBSD: distinfo,v 1.11 2002/10/02 23:36:06 dillo Exp $
SHA1 (nut-0.50.0.tar.gz) = b8826f2e7301e5c753ac946574a53d651faf69c3
Size (nut-0.50.0.tar.gz) = 382755 bytes
@@ -7,3 +7,4 @@ SHA1 (patch-ab) = dfc1663368b670b84b1545c388bcd5f8703c08e3
SHA1 (patch-ac) = ded33bbc4c78b2b7c53230c0d4ab3c663104582f
SHA1 (patch-ad) = 3620c734b396a2de657b6dceb7d5ba3cc821250b
SHA1 (patch-ae) = 6cff43dc5ed449a8f3c9b1e4864a47336b69fb30
+SHA1 (patch-af) = 803005e807fa6cee7ef9c4b3006ae23b51cb1a2c
diff --git a/sysutils/ups-nut-cgi/patches/patch-af b/sysutils/ups-nut-cgi/patches/patch-af
new file mode 100644
index 00000000000..78cb19ffd65
--- /dev/null
+++ b/sysutils/ups-nut-cgi/patches/patch-af
@@ -0,0 +1,541 @@
+$NetBSD: patch-af,v 1.1 2002/10/02 23:36:07 dillo Exp $
+
+--- configure.orig Thu Oct 3 01:28:43 2002
++++ configure
+@@ -12,6 +12,8 @@ ac_help=
+ ac_default_prefix=/usr/local
+ # Any additions from configure.in:
+ ac_help="$ac_help
++ --with-graphics=PATH Path for graphics library files"
++ac_help="$ac_help
+ --with-linux-hiddev=PATH Path to Linux hiddev.h kernel headers"
+ ac_help="$ac_help
+ --with-statepath=PATH Path for ups state files"
+@@ -666,6 +668,7 @@ test "$host_alias" != "$target_alias" &&
+ STATEPATH="/var/state/ups"
+ MODELPATH="$prefix/bin"
+ CGIPATH="$prefix/cgi-bin"
++GRAPHLIB_PATH="/usr/local"
+ RUN_AS_USER="nobody"
+ RUN_AS_GROUP="nogroup"
+ PIDPATH="/var/run"
+@@ -1763,99 +1766,46 @@ fi
+
+ fi
+
+-echo $ac_n "checking for TT_New_Glyph in -lttf""... $ac_c" 1>&6
+-echo "configure:1768: checking for TT_New_Glyph in -lttf" >&5
+-ac_lib_var=`echo ttf'_'TT_New_Glyph | sed 'y%./+-%__p_%'`
+-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
+-else
+- ac_save_LIBS="$LIBS"
+-LIBS="-lttf $LIBS"
+-cat > conftest.$ac_ext <<EOF
+-#line 1776 "configure"
+-#include "confdefs.h"
+-/* Override any gcc2 internal prototype to avoid an error. */
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+-char TT_New_Glyph();
+-
+-int main() {
+-TT_New_Glyph()
+-; return 0; }
++echo $ac_n "checking graphics library file path""... $ac_c" 1>&6
++echo "configure:1771: checking graphics library file path" >&5
++# Check whether --with-graphics or --without-graphics was given.
++if test "${with_graphics+set}" = set; then
++ withval="$with_graphics"
++ case "$withval" in
++ yes|no)
++ echo "$ac_t""using default: $GRAPHLIB_PATH" 1>&6
++ ;;
++ *)
++ echo "$ac_t""$withval" 1>&6
++ cat >> confdefs.h <<EOF
++#define GRAPHLIB_PATH "$withval"
+ EOF
+-if { (eval echo configure:1787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+- rm -rf conftest*
+- eval "ac_cv_lib_$ac_lib_var=yes"
+-else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- eval "ac_cv_lib_$ac_lib_var=no"
+-fi
+-rm -f conftest*
+-LIBS="$ac_save_LIBS"
+
+-fi
+-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+- echo "$ac_t""yes" 1>&6
+- LIBTTF="-lttf"
+-else
+- echo "$ac_t""no" 1>&6
+- LIBTTF=""
+-fi
+-
+-
+-echo $ac_n "checking for XBell in -lX11""... $ac_c" 1>&6
+-echo "configure:1810: checking for XBell in -lX11" >&5
+-ac_lib_var=`echo X11'_'XBell | sed 'y%./+-%__p_%'`
+-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++ GRAPHLIB_PATH=$withval
++ ;;
++ esac
+ else
+- ac_save_LIBS="$LIBS"
+-LIBS="-lX11 $LIBS"
+-cat > conftest.$ac_ext <<EOF
+-#line 1818 "configure"
+-#include "confdefs.h"
+-/* Override any gcc2 internal prototype to avoid an error. */
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+-char XBell();
++ echo "$ac_t""using default: $GRAPHLIB_PATH" 1>&6
+
+-int main() {
+-XBell()
+-; return 0; }
+-EOF
+-if { (eval echo configure:1829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+- rm -rf conftest*
+- eval "ac_cv_lib_$ac_lib_var=yes"
+-else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- eval "ac_cv_lib_$ac_lib_var=no"
+ fi
+-rm -f conftest*
+-LIBS="$ac_save_LIBS"
+
+-fi
+-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+- echo "$ac_t""yes" 1>&6
+- LIBX="-lX11"
+-else
+- echo "$ac_t""no" 1>&6
++GRAPHICS_LIBS="-R$GRAPHLIB_PATH/lib -L$GRAPHLIB_PATH/lib"
++GRAPHICS_INCLUDES="-I$GRAPHLIB_PATH/include"
++CFLAGS_save=$CFLAGS
++CPPFLAGS_save=$CPPFLAGS
++CFLAGS="$CFLAGS_save $GRAPHICS_LIBS"
++CPPFLAGS="$CPPFLAGS_save $GRAPHICS_INCLUDES"
+
+- echo "Retrying with -L /usr/X11R6/lib"
+- unset ac_cv_lib_X11_XBell
+- echo $ac_n "checking for XBell in -lX11""... $ac_c" 1>&6
+-echo "configure:1851: checking for XBell in -lX11" >&5
+-ac_lib_var=`echo X11'_'XBell | sed 'y%./+-%__p_%'`
++echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
++echo "configure:1801: checking for gettext in -lintl" >&5
++ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ ac_save_LIBS="$LIBS"
+-LIBS="-lX11 -lX11 -L/usr/X11R6/lib $LIBS"
++LIBS="-lintl $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 1859 "configure"
++#line 1809 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error. */
+ /* We use char because int might match the return type of a gcc2
+@@ -1860,13 +1810,13 @@ cat > conftest.$ac_ext <<EOF
+ /* Override any gcc2 internal prototype to avoid an error. */
+ /* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+-char XBell();
++char gettext();
+
+ int main() {
+-XBell()
++gettext()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:1870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:1820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+@@ -1881,30 +1831,25 @@ LIBS="$ac_save_LIBS"
+ fi
+ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+- LIBX="-lX11 -L/usr/X11R6/lib"
++ LIBINTL="-lintl"
+ else
+ echo "$ac_t""no" 1>&6
+- LIBX=""
+-fi
+-
+-
++ LIBINTL=""
+ fi
+
++GRAPHICS_LIBS="$GRAPHICS_LIBS $LIBINTL"
++CFLAGS="$CFLAGS_save $GRAPHICS_LIBS"
+
+-
+-if test "$LIBX" != ""
+-then
+-
+- echo $ac_n "checking for XpmReadFileToXpmImage in -lXpm""... $ac_c" 1>&6
+-echo "configure:1900: checking for XpmReadFileToXpmImage in -lXpm" >&5
+-ac_lib_var=`echo Xpm'_'XpmReadFileToXpmImage | sed 'y%./+-%__p_%'`
++echo $ac_n "checking for TT_New_Glyph in -lttf""... $ac_c" 1>&6
++echo "configure:1845: checking for TT_New_Glyph in -lttf" >&5
++ac_lib_var=`echo ttf'_'TT_New_Glyph | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ ac_save_LIBS="$LIBS"
+-LIBS="-lXpm -lXpm $LIBS"
++LIBS="-lttf $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 1908 "configure"
++#line 1853 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error. */
+ /* We use char because int might match the return type of a gcc2
+@@ -1909,13 +1854,13 @@ cat > conftest.$ac_ext <<EOF
+ /* Override any gcc2 internal prototype to avoid an error. */
+ /* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+-char XpmReadFileToXpmImage();
++char TT_New_Glyph();
+
+ int main() {
+-XpmReadFileToXpmImage()
++TT_New_Glyph()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:1919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:1864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+@@ -1930,22 +1875,25 @@ LIBS="$ac_save_LIBS"
+ fi
+ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+- LIBXPM="-lXpm"
++ LIBTTF="-lttf"
+ else
+ echo "$ac_t""no" 1>&6
+-
+- echo "Retrying with $LIBX"
+- unset ac_cv_lib_Xpm_XpmReadFileToXpmImage
+- echo $ac_n "checking for XpmReadFileToXpmImage in -lXpm""... $ac_c" 1>&6
+-echo "configure:1941: checking for XpmReadFileToXpmImage in -lXpm" >&5
+-ac_lib_var=`echo Xpm'_'XpmReadFileToXpmImage | sed 'y%./+-%__p_%'`
++ LIBTTF=""
++fi
++
++GRAPHICS_LIBS="$GRAPHICS_LIBS $LIBTTF"
++CFLAGS="$CFLAGS_save $GRAPHICS_LIBS"
++
++echo $ac_n "checking for jpeg_abort in -ljpeg""... $ac_c" 1>&6
++echo "configure:1889: checking for jpeg_abort in -ljpeg" >&5
++ac_lib_var=`echo jpeg'_'jpeg_abort | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ ac_save_LIBS="$LIBS"
+-LIBS="-lXpm -lXpm $LIBX $LIBS"
++LIBS="-ljpeg $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 1949 "configure"
++#line 1897 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error. */
+ /* We use char because int might match the return type of a gcc2
+@@ -1950,13 +1898,13 @@ cat > conftest.$ac_ext <<EOF
+ /* Override any gcc2 internal prototype to avoid an error. */
+ /* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+-char XpmReadFileToXpmImage();
++char jpeg_abort();
+
+ int main() {
+-XpmReadFileToXpmImage()
++jpeg_abort()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:1960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:1908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+@@ -1971,27 +1919,23 @@ LIBS="$ac_save_LIBS"
+ fi
+ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+- LIBXPM="-lXpm $LIBX"
++ LIBJPEG="-ljpeg"
+ else
+ echo "$ac_t""no" 1>&6
+- LIBXPM=""
+-fi
+-
+-
++ LIBJPEG=""
+ fi
+
+-fi
+
+-echo $ac_n "checking for gdImagePng in -lgd""... $ac_c" 1>&6
+-echo "configure:1987: checking for gdImagePng in -lgd" >&5
+-ac_lib_var=`echo gd'_'gdImagePng | sed 'y%./+-%__p_%'`
++echo $ac_n "checking for XBell in -lX11""... $ac_c" 1>&6
++echo "configure:1931: checking for XBell in -lX11" >&5
++ac_lib_var=`echo X11'_'XBell | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ ac_save_LIBS="$LIBS"
+-LIBS="-lgd -lm -lpng -lz $LIBS"
++LIBS="-lX11 $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 1995 "configure"
++#line 1939 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error. */
+ /* We use char because int might match the return type of a gcc2
+@@ -1996,13 +1940,13 @@ cat > conftest.$ac_ext <<EOF
+ /* Override any gcc2 internal prototype to avoid an error. */
+ /* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+-char gdImagePng();
++char XBell();
+
+ int main() {
+-gdImagePng()
++XBell()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:2006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:1950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+@@ -2017,25 +1961,22 @@ LIBS="$ac_save_LIBS"
+ fi
+ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+-
+- GFXLIBS="-lgd -lpng -lz"
+-
++ LIBX="-lX11"
+ else
+ echo "$ac_t""no" 1>&6
+
+- echo "Trying again - using -L/usr/local/lib -I/usr/local/include..."
+- unset ac_cv_lib_gd_gdImagePng
+- CPPFLAGS="$CPPFLAGS -L/usr/local/lib -I/usr/local/include"
+- echo $ac_n "checking for gdImagePng in -lgd""... $ac_c" 1>&6
+-echo "configure:2031: checking for gdImagePng in -lgd" >&5
+-ac_lib_var=`echo gd'_'gdImagePng | sed 'y%./+-%__p_%'`
++ echo "Retrying with -L /usr/X11R6/lib"
++ unset ac_cv_lib_X11_XBell
++ echo $ac_n "checking for XBell in -lX11""... $ac_c" 1>&6
++echo "configure:1972: checking for XBell in -lX11" >&5
++ac_lib_var=`echo X11'_'XBell | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ ac_save_LIBS="$LIBS"
+-LIBS="-lgd -lm -lpng -lz $LIBS"
++LIBS="-lX11 -L/usr/X11R6/lib -lX11 $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 2039 "configure"
++#line 1980 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error. */
+ /* We use char because int might match the return type of a gcc2
+@@ -2040,13 +1981,13 @@ cat > conftest.$ac_ext <<EOF
+ /* Override any gcc2 internal prototype to avoid an error. */
+ /* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+-char gdImagePng();
++char XBell();
+
+ int main() {
+-gdImagePng()
++XBell()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:2050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:1991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+@@ -2061,33 +2002,33 @@ LIBS="$ac_save_LIBS"
+ fi
+ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+-
+- GFXLIBS="-lgd -lpng -lz -L/usr/local/lib -I/usr/local/include"
+-
++ LIBX="-R/usr/X11R6/lib -L/usr/X11R6/lib -lX11"
+ else
+ echo "$ac_t""no" 1>&6
++ LIBX=""
+ fi
+
+-
++
+ fi
+
+
+-if test "$LIBTTF" != ""
++GRAPHICS_LIBS="$GRAPHICS_LIBS $LIBJPEG"
++CFLAGS="$CFLAGS_save $GRAPHICS_LIBS"
++
++
++if test "$LIBX" != ""
+ then
+
+- if test "$GFXLIBS" = "" ; then
+- echo "Trying again - using $LIBTTF"
+- unset ac_cv_lib_gd_gdImagePng
+- echo $ac_n "checking for gdImagePng in -lgd""... $ac_c" 1>&6
+-echo "configure:2083: checking for gdImagePng in -lgd" >&5
+-ac_lib_var=`echo gd'_'gdImagePng | sed 'y%./+-%__p_%'`
++ echo $ac_n "checking for XpmReadFileToXpmImage in -lXpm""... $ac_c" 1>&6
++echo "configure:2024: checking for XpmReadFileToXpmImage in -lXpm" >&5
++ac_lib_var=`echo Xpm'_'XpmReadFileToXpmImage | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ ac_save_LIBS="$LIBS"
+-LIBS="-lgd -lm -lpng -lz $LIBTTF $LIBS"
++LIBS="-lXpm -lXpm $LIBX $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 2091 "configure"
++#line 2032 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error. */
+ /* We use char because int might match the return type of a gcc2
+@@ -2092,13 +2033,13 @@ cat > conftest.$ac_ext <<EOF
+ /* Override any gcc2 internal prototype to avoid an error. */
+ /* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+-char gdImagePng();
++char XpmReadFileToXpmImage();
+
+ int main() {
+-gdImagePng()
++XpmReadFileToXpmImage()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:2102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:2043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+@@ -2113,28 +2054,27 @@ LIBS="$ac_save_LIBS"
+ fi
+ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+-
+- GFXLIBS="-lgd -lpng -lz $LIBTTF"
+-
++ LIBXPM="-lXpm $LIBX"
+ else
+ echo "$ac_t""no" 1>&6
++ LIBXPM=""
+ fi
+
+- fi
+
+- if test "$GFXLIBS" = "" ; then
+- echo "Trying again - using $LIBTTF $LIBXPM"
+- unset ac_cv_lib_gd_gdImagePng
+- echo $ac_n "checking for gdImagePng in -lgd""... $ac_c" 1>&6
+-echo "configure:2130: checking for gdImagePng in -lgd" >&5
++ GRAPHICS_LIBS="$GRAPHICS_LIBS $LIBXPM"
++ CFLAGS="$CFLAGS_save $GRAPHICS_LIBS"
++fi
++
++echo $ac_n "checking for gdImagePng in -lgd""... $ac_c" 1>&6
++echo "configure:2070: checking for gdImagePng in -lgd" >&5
+ ac_lib_var=`echo gd'_'gdImagePng | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ ac_save_LIBS="$LIBS"
+-LIBS="-lgd -lm -lpng -lz $LIBTTF $LIBXPM $LIBS"
++LIBS="-lgd $GRAPHICS_LIBS -lm -lpng -lz $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 2138 "configure"
++#line 2078 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error. */
+ /* We use char because int might match the return type of a gcc2
+@@ -2161,18 +2101,20 @@ fi
+ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+
+- GFXLIBS="-lgd -lpng -lz $LIBTTF $LIBXPM"
+-
++ LIBGD="$GRAPHICS_LIBS -lgd -lpng -lz"
++
+ else
+ echo "$ac_t""no" 1>&6
+-fi
+
+- fi
++ echo "$ac_t""** You will not be able to build the CGI programs without gd.
++**
++** To get it" 1>&6
++
+ fi
+
+-test "$GFXLIBS" = "" && echo "** You will not be able to build the CGI programs without gd."
+-test "$GFXLIBS" = "" && echo "** "
+-test "$GFXLIBS" = "" && echo "** To get it, visit http://www.boutell.com/gd/"
++
++GRAPHICS_LIBS="$LIBGD"
++CFLAGS="$CFLAGS_save $GRAPHICS_LIBS"
+
+ for ac_hdr in gd.h gd/gd.h sys/modem.h stdarg.h varargs.h sys/shm.h
+ do
+@@ -2214,9 +2156,11 @@ else
+ fi
+ done
+
++CFLAGS=$CFLAGS_save
++CPPFLAGS=$CPPFLAGS_save
+
+ echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
+-echo "configure:2220: checking whether time.h and sys/time.h may both be included" >&5
++echo "configure:2164: checking whether time.h and sys/time.h may both be included" >&5
+ if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -2363,7 +2307,7 @@ LIBS="$ac_save_LIBS"
+ fi
+ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+- GFXLIBS="-R${lib} $GFXLIBS"
++ GRAPHICS_LIBS="-R${lib} $GRAPHICS_LIBS"
+
+ else
+ echo "$ac_t""no" 1>&6
+@@ -3242,7 +3187,8 @@ s%@DRIVER_INSTALL_TARGET@%$DRIVER_INSTAL
+ s%@LIBOBJ@%$LIBOBJ%g
+ s%@BUILDOBJ@%$BUILDOBJ%g
+ s%@NETLIBS@%$NETLIBS%g
+-s%@GFXLIBS@%$GFXLIBS%g
++s%@GRAPHICS_LIBS@%$GRAPHICS_LIBS%g
++s%@GRAPHICS_INCLUDES@%$GRAPHICS_INCLUDES%g
+ s%@SERLIBS@%$SERLIBS%g
+ s%@STATEPATH@%$STATEPATH%g
+ s%@MODELPATH@%$MODELPATH%g