diff --git a/ChangeLog b/ChangeLog index 77dd25dad..f5b858504 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-02-15 Nicola Pero + + * configure.ac: Source GNUstep.sh then use GNUSTEP_SYSTEM_HEADERS + and GNUSTEP_SYSTEM_LIBRARIES if available rather than using + hardcoded paths. + * configure: Regenerated. + 2007-02-14 Nicola Pero * Source/GNUmakefile (libgui-resources_INSTALL_DIR): New variable diff --git a/configure b/configure index 08ef53a2f..3918a4020 100755 --- a/configure +++ b/configure @@ -2715,7 +2715,7 @@ ac_x_header_dirs=' /usr/openwin/share/include' if test "$ac_x_includes" = no; then - # Guess where to find include files, by looking for Intrinsic.h. + # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2723,7 +2723,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 @@ -2750,7 +2750,7 @@ else sed 's/^/| /' conftest.$ac_ext >&5 for ac_dir in $ac_x_header_dirs; do - if test -r "$ac_dir/X11/Intrinsic.h"; then + if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi @@ -2764,18 +2764,18 @@ if test "$ac_x_libraries" = no; then # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS - LIBS="-lXt $LIBS" + LIBS="-lX11 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include int main () { -XtMalloc (0) +XrmInitialize () ; return 0; } @@ -2861,17 +2861,39 @@ fi # The following is so that headers and custom libraries # in the GNUstep root are used before the standard ones #-------------------------------------------------------------------- -# Set location of GNUstep dirs for later use -GNUSTEP_HDIR=$GNUSTEP_SYSTEM_ROOT/Library/Headers + +# +# It looks like we ought to source the whole GNUstep.sh here, and even +# ask it to output all variables! That way we have access to (eg) +# GNUSTEP_SYSTEM_HEADERS below. +# +GNUSTEP_SH_EXPORT_ALL_VARIABLES=yes +. "$GNUSTEP_MAKEFILES/GNUstep.sh" +unset GNUSTEP_SH_EXPORT_ALL_VARIABLES + +# For backwards compatibility, define GNUSTEP_SYSTEM_HEADERS from +# GNUSTEP_SYSTEM_ROOT if not set yet. +if test x"$GNUSTEP_SYSTEM_HEADERS" = x""; then + if test x"$GNUSTEP_IS_FLATTENED" = x""; then + GNUSTEP_SYSTEM_HEADERS="$GNUSTEP_SYSTEM_ROOT/Library/Headers" + else + GNUSTEP_SYSTEM_HEADERS="$GNUSTEP_SYSTEM_ROOT/Library/Headers/$LIBRARY_COMBO" + fi +fi + +if test x"$GNUSTEP_SYSTEM_LIBRARIES" = x""; then + GNUSTEP_SYSTEM_LIBRARIES="$GNUSTEP_SYSTEM_ROOT/Library/Libraries" +fi + if test "$GNUSTEP_IS_FLATTENED" = no; then clean_target_os=`$GNUSTEP_MAKEFILES/clean_os.sh $target_os` clean_target_cpu=`$GNUSTEP_MAKEFILES/clean_cpu.sh $target_cpu` obj_dir=$clean_target_cpu/$clean_target_os - GNUSTEP_LDIR=$GNUSTEP_SYSTEM_ROOT/Library/Libraries/$obj_dir + GNUSTEP_LDIR=$GNUSTEP_SYSTEM_LIBRARIES/$obj_dir else - GNUSTEP_LDIR=$GNUSTEP_SYSTEM_ROOT/Library/Libraries + GNUSTEP_LDIR=$GNUSTEP_SYSTEM_LIBRARIES fi -CPPFLAGS="$CPPFLAGS -I$GNUSTEP_HDIR" +CPPFLAGS="$CPPFLAGS -I$GNUSTEP_SYSTEM_HEADERS" LDFLAGS="$LDFLAGS -L$GNUSTEP_LDIR/$LIBRARY_COMBO -L$GNUSTEP_LDIR" #-------------------------------------------------------------------- @@ -8305,8 +8327,3 @@ if test "$no_create" != yes; then $ac_cs_success || { (exit 1); exit 1; } fi - - - - - diff --git a/configure.ac b/configure.ac index 585abebff..ae0720829 100644 --- a/configure.ac +++ b/configure.ac @@ -62,17 +62,39 @@ AC_PATH_X # Added for checking the existence of ungif. Note that # The following is so that headers and custom libraries # in the GNUstep root are used before the standard ones #-------------------------------------------------------------------- -# Set location of GNUstep dirs for later use -GNUSTEP_HDIR=$GNUSTEP_SYSTEM_ROOT/Library/Headers + +# +# It looks like we ought to source the whole GNUstep.sh here, and even +# ask it to output all variables! That way we have access to (eg) +# GNUSTEP_SYSTEM_HEADERS below. +# +GNUSTEP_SH_EXPORT_ALL_VARIABLES=yes +. "$GNUSTEP_MAKEFILES/GNUstep.sh" +unset GNUSTEP_SH_EXPORT_ALL_VARIABLES + +# For backwards compatibility, define GNUSTEP_SYSTEM_HEADERS from +# GNUSTEP_SYSTEM_ROOT if not set yet. +if test x"$GNUSTEP_SYSTEM_HEADERS" = x""; then + if test x"$GNUSTEP_IS_FLATTENED" = x""; then + GNUSTEP_SYSTEM_HEADERS="$GNUSTEP_SYSTEM_ROOT/Library/Headers" + else + GNUSTEP_SYSTEM_HEADERS="$GNUSTEP_SYSTEM_ROOT/Library/Headers/$LIBRARY_COMBO" + fi +fi + +if test x"$GNUSTEP_SYSTEM_LIBRARIES" = x""; then + GNUSTEP_SYSTEM_LIBRARIES="$GNUSTEP_SYSTEM_ROOT/Library/Libraries" +fi + if test "$GNUSTEP_IS_FLATTENED" = no; then clean_target_os=`$GNUSTEP_MAKEFILES/clean_os.sh $target_os` clean_target_cpu=`$GNUSTEP_MAKEFILES/clean_cpu.sh $target_cpu` obj_dir=$clean_target_cpu/$clean_target_os - GNUSTEP_LDIR=$GNUSTEP_SYSTEM_ROOT/Library/Libraries/$obj_dir + GNUSTEP_LDIR=$GNUSTEP_SYSTEM_LIBRARIES/$obj_dir else - GNUSTEP_LDIR=$GNUSTEP_SYSTEM_ROOT/Library/Libraries + GNUSTEP_LDIR=$GNUSTEP_SYSTEM_LIBRARIES fi -CPPFLAGS="$CPPFLAGS -I$GNUSTEP_HDIR" +CPPFLAGS="$CPPFLAGS -I$GNUSTEP_SYSTEM_HEADERS" LDFLAGS="$LDFLAGS -L$GNUSTEP_LDIR/$LIBRARY_COMBO -L$GNUSTEP_LDIR" #-------------------------------------------------------------------- @@ -442,8 +464,3 @@ static double rint(double a) \ AC_CONFIG_FILES([config.make gui.make Headers/Additions/GNUstepGUI/GSVersion.h]) AC_OUTPUT - - - - -