[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xgps configure.in patch for wraster
From: |
Jeff Teunissen |
Subject: |
Re: xgps configure.in patch for wraster |
Date: |
Sat, 03 Mar 2001 02:26:49 -0500 |
Jeff Teunissen wrote:
>
> Seems a recent change to configure.in broke wraster support (causing
> font_cacher to fail the link with undefined reference to RLoadImage,
> because the X check is erasing GRAPHIC_xxx). Attached is a patch to fix
> this (I fixed it here by moving the X check to be done first).
Argh, I see that this patch returns configure.in to a broken state for people
like Juliusz Chroboczek. I'll work on making it all work right together. :)
The problem is that $x_includes and $x_libraries are _always_ set if X is
present, and --x-{includes,libraries} only have an effect on the only way to
tell the difference ($ac_x_* != $x_*) once.
e.g. the best that can be done (as far as I can think of) is:
./configure
[blindly accept wraster's word if present]
[if not clear them and use X]
[likewise, use libtiff and libjpeg if they are present but wraster isn't]
./configure --with-x=/usr/local/X11R6
[blindly accept wraster's word]
[oops, it's been changed from $ac...nuke wraster support]
[use libtiff and libjpeg if present]
The problem with this is that if you call configure a second time, with the
same options (or no options, assuming the cache will help you out), you're
back to the first case...because $x_* and $ac_x_* are again equal.
Ideally, the solution is to recompile wraster (or edit get-wraster-flags) with
the custom X includes, because this will propagate to GNUstep without trouble.
Anyway, here's a patch that creates a semblance of working behavior. I found
this problem because when X overrode libwraster, it did not erase its
SYSTEM_DEFS, which caused the source to use wraster.h but not be able to link
with the library. This bug is fixed.
--
| Jeff Teunissen - Pres., Dusk To Dawn Computing - deek at dusknet.dhs.org
| GPG: 1024D/9840105A 7102 808A 7733 C2F3 097B 161B 9222 DAB8 9840 105A
| Core developer, The QuakeForge Project http://www.quakeforge.net/
| Specializing in Debian GNU/Linux http://dusknet.dhs.org/~deek/
Index: configure.in
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/xgps/configure.in,v
retrieving revision 1.5
diff -u -r1.5 configure.in
--- configure.in 2001/03/01 03:44:31 1.5
+++ configure.in 2001/03/03 07:25:44
@@ -76,26 +76,26 @@
GRAPHIC_LFLAGS=
fi
-AC_SUBST(GRAPHIC_LIBS)
-AC_SUBST(GRAPHIC_CFLAGS)
-AC_SUBST(GRAPHIC_LFLAGS)
-AC_SUBST(SYSTEM_DEFS)
-
#--------------------------------------------------------------------
# Find for X windows
#--------------------------------------------------------------------
# If the user specifically set x_include/x_libs, then assume we're
# using a special X system and discard any previous GRAPHIC_flags
set_x_paths=no
-if test $gs_cv_have_wraster = no -o $x_includes != NONE; then
+
+if test "$x_includes" != "NONE" -a "$x_includes" != "$ac_x_includes"; then
+ set_x_paths=yes
+fi
+if test $gs_cv_have_wraster = no; then
set_x_paths=yes
fi
AC_PATH_XTRA
if test $set_x_paths = yes; then
+ SYSTEM_DEFS=`echo $SYSTEM_DEFS | sed s/-DHAVE_WRASTER_H//`
GRAPHIC_CFLAGS="$X_CFLAGS"
GRAPHIC_LFLAGS="$X_LIBS"
- GRAPHIC_LIBS="-lXext -lX11 $X_EXTRA_LIBS"
+ GRAPHIC_LIBS="-lX11 -lXext $X_EXTRA_LIBS"
lib_save_header=${CPPFLAGS}
lib_save_libs=${LIBS}
@@ -105,7 +105,7 @@
CPPFLAGS="${lib_save_header}"
LIBS="${lib_save_libs}"
if test $have_xmu = 1; then
- GRAPHIC_LIBS="-lXmu ${GRAPHIC_LIBS}"
+ GRAPHIC_LIBS="${GRAPHIC_LIBS} -lXmu"
fi
fi
if test -r $x_includes/X11/DPS; then
@@ -230,10 +230,15 @@
AC_CHECK_TIFFLIB(${with_tiff_library}, ${with_tiff_include})
fi
-
if test "$ac_x_includes" != ""; then
CPPFLAGS="$CPPFLAGS -I$ac_x_includes"
fi
+
+AC_SUBST(GRAPHIC_LIBS)
+AC_SUBST(GRAPHIC_CFLAGS)
+AC_SUBST(GRAPHIC_LFLAGS)
+AC_SUBST(SYSTEM_DEFS)
+
AC_CHECK_HEADER(X11/extensions/XShm.h, AC_DEFINE(XSHM))
AC_OUTPUT(config.h xgps.make)