diff --git a/ChangeLog b/ChangeLog index b55b2c2a..3a4d65e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2001-07-09 Adam Fedor + + + * aggregate.make: Propogate GNUSTEP_INSTALLTION_DIR to subprojects. + + * configure.in: Look for gcc's libobjc.so library. Use it to run + tests. + * GNUstep.sh.in (GCC_SO_DIR): Holds location of libobjc.so from gcc + (Need to pass this along so it is put in LD_LIBRARY_PATH). + Mon Jul 9 18:46:59 2001 Nicola Pero * rpm.make (.PHONY): Added. diff --git a/Documentation/gnustep-howto.texi b/Documentation/gnustep-howto.texi index bd36645c..e47590f8 100644 --- a/Documentation/gnustep-howto.texi +++ b/Documentation/gnustep-howto.texi @@ -164,7 +164,7 @@ may be removed in the future. @item gnustep-objc package (for gcc version < 3.0) This is a special version of the Objective-C runtime that include several -bug fixes and features that have not been officially released yet. +bug fixes and features that were not in gcc versions previous to 3.0. It is available at @url{ftp://ftp.gnustep.org/pub/gnustep/libs} which compiles using the GNUstep Makefile package (so you don't have to get the entire gcc dist). Make sure to set the THREADING variable in the GNUmakefile. diff --git a/GNUstep-HOWTO b/GNUstep-HOWTO index e057e38f..3bfb4416 100644 --- a/GNUstep-HOWTO +++ b/GNUstep-HOWTO @@ -1,7 +1,7 @@ GNUstep HOWTO ************* - Last Update: 29 May 2001 + Last Update: 16 June 2001 This document explains how to build the different components of the GNUstep core libraries and GNUstep Launchpad. @@ -99,8 +99,11 @@ depending on the type of system you are using, include: `openssl' The openssl library is used to provide support for https - connections by the NSURL and HSURLHandle classes. It is - recommended but not currently required. + connections by the NSURL and HSURLHandle classes. To enable this + option you need to have the openssl libraries installed and add + the option `--enable-openssl' when running the `configure' script. + Note that the OpenSSL license is not compatible with GPL, so do + not use this option if you want your programs to be GPL compatible. `libiconv' Unicode support functions (iconv) come with glibc version 2.1 or @@ -115,7 +118,7 @@ depending on the type of system you are using, include: The previous builtin method for stack frame handling is no longer supported and may be removed in the future. -`gnustep-objc package (for gcc version <= 3.0)' +`gnustep-objc package (for gcc version < 3.0)' This is a special version of the Objective-C runtime that include several bug fixes and features that have not been officially released yet. It is available at @@ -766,10 +769,17 @@ Windows with CYGWIN (_Unstable!_) Objective-C library DLL () for shared libs. It's a good idea to remove the libobjc.a that comes with gcc (gcc -v for location) so that it isn't accidentally - found. Ffcall is not ported to cygwin so don't try to use it (some - invocation and DO stuff will not work). + found. For ffcall, you should get version 1.8b or above (the + earlier ones don't compile). There are still some problems with + structure passing, but that is generally not supportred on any + architecture. `Special Instructions' + On later versions of Cygwin you may be required to include the + win32api directory in CPPFLAGS when configuring: + + CPPFLAGS=-I/usr/include/win32api ./configure + For shared libs, make sure to specify SHARED=YES explicitly when building: diff --git a/GNUstep.sh.in b/GNUstep.sh.in index 1b6715d1..88111092 100755 --- a/GNUstep.sh.in +++ b/GNUstep.sh.in @@ -95,6 +95,7 @@ else fi export PATH +GCC_SO_DIR=@GCC_SO_DIR@ . $GNUSTEP_MAKEFILES/ld_lib_path.sh gnustep_class_path="$GNUSTEP_USER_ROOT/Libraries/Java:$GNUSTEP_LOCAL_ROOT/Libraries/Java:$GNUSTEP_NETWORK_ROOT/Libraries/Java:$GNUSTEP_SYSTEM_ROOT/Libraries/Java" diff --git a/aggregate.make b/aggregate.make index 72e5d9e4..9866dc12 100644 --- a/aggregate.make +++ b/aggregate.make @@ -49,7 +49,9 @@ internal-all internal-install internal-uninstall internal-clean \ mf=Makefile; \ echo "WARNING: No $(MAKEFILE_NAME) found for subproject $$f; using 'Makefile'"; \ fi; \ - if $(MAKE) -C $$f -f $$mf --no-keep-going $$target; then \ + if $(MAKE) -C $$f -f $$mf --no-keep-going \ + GNUSTEP_INSTALLATION_DIR="$(GNUSTEP_INSTALLATION_DIR)" \ + $$target; then \ :; else exit $$?; \ fi; \ fi; \ diff --git a/configure b/configure index 5aa3bba9..c84e3d43 100755 --- a/configure +++ b/configure @@ -1673,8 +1673,8 @@ fi # Check to see if the libobjc library is in our GNUSTEP_SYSTEM_ROOT. # If so, there are probably other libraries that we want there also, so # leave the proper includes in CPPFLAGS and LDFLAGS -echo $ac_n "checking for alternate objc library""... $ac_c" 1>&6 -echo "configure:1678: checking for alternate objc library" >&5 +echo $ac_n "checking for shared objc library""... $ac_c" 1>&6 +echo "configure:1678: checking for shared objc library" >&5 if eval "test \"`echo '$''{'gs_cv_objc_libdir'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1686,6 +1686,10 @@ if test -f $GNUSTEP_HDIR/objc/objc.h; then gs_cv_objc_libdir=NONE fi fi +gcc_shared_libobjc=`gcc -print-file-name=libobjc.so` +if test -f $gcc_shared_libobjc; then + gs_cv_objc_libdir=`dirname $gcc_shared_libobjc` +fi fi @@ -1695,19 +1699,26 @@ echo "$ac_t""$gs_cv_objc_libdir" 1>&6 # needs to be installed before other libraries, but if so, then # we will end up not including these dirs. For now, just include them # all the time: +GCC_SO_DIR=NONE #if test "$gs_cv_objc_libdir" != "NONE"; then # The following are needed to compile the test programs - CPPFLAGS="$CPPFLAGS -I$prefix/Headers" - LDFLAGS="$LDFLAGS -L$GNUSTEP_LDIR" + if test "$gs_cv_objc_libdir" = "$GNUSTEP_LDIR"; then + CPPFLAGS="$CPPFLAGS -I$prefix/Headers" + else + GCC_SO_DIR=$gs_cv_objc_libdir + fi + LDFLAGS="$LDFLAGS -L$gs_cv_objc_libdir" # And the following to execute them - LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$GNUSTEP_LDIR" + LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gs_cv_objc_libdir" export LD_LIBRARY_PATH #fi + + #-------------------------------------------------------------------- # Miscellaneous headers (for make programs only) #-------------------------------------------------------------------- @@ -1716,12 +1727,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:1720: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1731: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1729,7 +1740,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1754,7 +1765,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:1758: checking for opendir in -ldir" >&5 +echo "configure:1769: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1762,7 +1773,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1788: \"$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 @@ -1795,7 +1806,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1799: checking for opendir in -lx" >&5 +echo "configure:1810: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1803,7 +1814,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +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 @@ -1840,17 +1851,17 @@ for ac_hdr in sys/param.h sys/file.h dir.h string.h stdlib.h sys/types.h sys/s do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1844: checking for $ac_hdr" >&5 +echo "configure:1855: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1893,7 +1904,7 @@ fi echo $ac_n "checking whether objc has thread support""... $ac_c" 1>&6 -echo "configure:1897: checking whether objc has thread support" >&5 +echo "configure:1908: checking whether objc has thread support" >&5 extra_LIBS="" case "${target_os}" in solaris*) @@ -1912,11 +1923,11 @@ if test "$OBJC_THREAD" != ""; then objc_threaded="" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then objc_threaded="$OBJC_THREAD $extra_LIBS" else @@ -1934,11 +1945,11 @@ elif test "$host_os" = linux-gnu; then objc_threaded="-lpthread" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then objc_threaded="-lpthread" else @@ -1956,11 +1967,11 @@ elif test "`echo $host_os|sed 's/[0-9].*//'|sed s/elf//`" = freebsd; then objc_threaded="-pthread" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then objc_threaded="-pthread" else @@ -1978,11 +1989,11 @@ fi objc_threaded="-lpthread" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then objc_threaded="-lpthread" else @@ -2001,11 +2012,11 @@ fi objc_threaded="-lpcthread" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then objc_threaded="-lpcthread" else @@ -2025,11 +2036,11 @@ elif test "$MINGW32" = yes; then objc_threaded="works" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then objc_threaded="works" else @@ -2047,11 +2058,11 @@ else objc_threaded="" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then objc_threaded="-lthread $extra_LIBS" else @@ -2268,6 +2279,7 @@ s%@HOST_INSTALL@%$HOST_INSTALL%g s%@LN_S@%$LN_S%g s%@TAR@%$TAR%g s%@FORCE_CPPFLAGS@%$FORCE_CPPFLAGS%g +s%@GCC_SO_DIR@%$GCC_SO_DIR%g s%@objc_threaded@%$objc_threaded%g s%@ac_cv_objc_threaded@%$ac_cv_objc_threaded%g s%@GNUSTEP_MAKE_VERSION@%$GNUSTEP_MAKE_VERSION%g diff --git a/configure.in b/configure.in index bef993b8..e1bf3ea0 100644 --- a/configure.in +++ b/configure.in @@ -239,7 +239,7 @@ fi # Check to see if the libobjc library is in our GNUSTEP_SYSTEM_ROOT. # If so, there are probably other libraries that we want there also, so # leave the proper includes in CPPFLAGS and LDFLAGS -AC_MSG_CHECKING(for alternate objc library) +AC_MSG_CHECKING(for shared objc library) AC_CACHE_VAL(gs_cv_objc_libdir, [dnl gs_cv_objc_libdir=NONE @@ -250,6 +250,10 @@ if test -f $GNUSTEP_HDIR/objc/objc.h; then gs_cv_objc_libdir=NONE fi fi +gcc_shared_libobjc=`gcc -print-file-name=libobjc.so` +if test -f $gcc_shared_libobjc; then + gs_cv_objc_libdir=`dirname $gcc_shared_libobjc` +fi ]) AC_MSG_RESULT($gs_cv_objc_libdir) @@ -257,18 +261,25 @@ AC_MSG_RESULT($gs_cv_objc_libdir) # needs to be installed before other libraries, but if so, then # we will end up not including these dirs. For now, just include them # all the time: +GCC_SO_DIR=NONE #if test "$gs_cv_objc_libdir" != "NONE"; then # The following are needed to compile the test programs - CPPFLAGS="$CPPFLAGS -I$prefix/Headers" - LDFLAGS="$LDFLAGS -L$GNUSTEP_LDIR" + if test "$gs_cv_objc_libdir" = "$GNUSTEP_LDIR"; then + CPPFLAGS="$CPPFLAGS -I$prefix/Headers" + else + GCC_SO_DIR=$gs_cv_objc_libdir + fi + LDFLAGS="$LDFLAGS -L$gs_cv_objc_libdir" # And the following to execute them - LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$GNUSTEP_LDIR" + LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gs_cv_objc_libdir" export LD_LIBRARY_PATH #fi +AC_SUBST(GCC_SO_DIR) + #-------------------------------------------------------------------- # Miscellaneous headers (for make programs only)