Windows, FreeBSD patches

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@3408 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 1998-12-07 16:23:04 +00:00
parent a0806d1e2e
commit f6b9287d29
8 changed files with 112 additions and 48 deletions

View file

@ -1,3 +1,12 @@
Mon Dec 7 09:58:01 1998 Adam Fedor <fedor@ultra.doc.com>
* target.make: Add FreeBSD target for shared libs.
* config.make.in (EXEEXT): Set from program_suffix.
* openapp.in (EXEEXT): Likewise.
* debugapp.in (EXEEXT): Likewise.
* aggregate.make (internal-all): Break if subproject make fails.
Mon Dec 7 16:10:00 1998 Richard Frith-Macdonald <richard@brainstrom.co.uk>
* service.make: Applied patch supplied by <doko@cs.tu-berlin.de> to

View file

@ -41,8 +41,10 @@ internal-all internal-install internal-uninstall internal-clean \
internal-distclean internal-check::
@(target=`echo $@ | sed 's/internal-//'`; \
for f in $(SUBPROJECTS); do \
echo Making $$target in $$f...;\
(cd $$f; $(MAKE) -f $(MAKEFILE_NAME) --no-keep-going $$target); \
echo Making $$target in $$f...;\
if eval "(cd $$f; $(MAKE) -f $(MAKEFILE_NAME) --no-keep-going $$target)"; then \
:; else break; \
fi; \
done)
endif

View file

@ -26,7 +26,7 @@
#
CC = @CC@
EXEEXT =
EXEEXT = @program_suffix@
OEXT = .o
LIBEXT = .a
RESEXT = .res

91
configure vendored
View file

@ -676,13 +676,15 @@ test "$host_alias" != "$target_alias" &&
program_prefix=${target_alias}-
#--------------------------------------------------------------------
# Find the binary and compile tools
#--------------------------------------------------------------------
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:686: checking for $ac_word" >&5
echo "configure:688: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -711,7 +713,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:715: checking for $ac_word" >&5
echo "configure:717: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -759,7 +761,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:763: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
echo "configure:765: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@ -769,11 +771,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
#line 773 "configure"
#line 775 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@ -793,12 +795,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:797: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "configure:799: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:802: checking whether we are using GNU C" >&5
echo "configure:804: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -807,7 +809,7 @@ else
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@ -822,7 +824,7 @@ if test $ac_cv_prog_gcc = yes; then
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:826: checking whether ${CC-cc} accepts -g" >&5
echo "configure:828: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -850,7 +852,7 @@ else
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:854: checking how to run the C preprocessor" >&5
echo "configure:856: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@ -865,13 +867,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 869 "configure"
#line 871 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@ -882,13 +884,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 886 "configure"
#line 888 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@ -913,7 +915,7 @@ echo "$ac_t""$CPP" 1>&6
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:917: checking for $ac_word" >&5
echo "configure:919: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -951,7 +953,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:955: checking for a BSD compatible install" >&5
echo "configure:957: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1011,7 +1013,7 @@ else
fi
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
echo "configure:1015: checking whether ln -s works" >&5
echo "configure:1017: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1040,7 +1042,7 @@ fi
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
echo "configure:1044: checking for X" >&5
echo "configure:1046: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@ -1102,12 +1104,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
#line 1106 "configure"
#line 1108 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -1176,14 +1178,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1180 "configure"
#line 1182 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
if { (eval echo configure:1187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:1189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
@ -1289,12 +1291,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:1293: checking for $ac_hdr that defines DIR" >&5
echo "configure:1295: 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 <<EOF
#line 1298 "configure"
#line 1300 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@ -1302,7 +1304,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
if { (eval echo configure:1306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@ -1327,7 +1329,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:1331: checking for opendir in -ldir" >&5
echo "configure:1333: 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
@ -1335,7 +1337,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1339 "configure"
#line 1341 "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
@ -1346,7 +1348,7 @@ int main() {
opendir()
; return 0; }
EOF
if { (eval echo configure:1350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:1352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -1368,7 +1370,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
echo "configure:1372: checking for opendir in -lx" >&5
echo "configure:1374: 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
@ -1376,7 +1378,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1380 "configure"
#line 1382 "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
@ -1387,7 +1389,7 @@ int main() {
opendir()
; return 0; }
EOF
if { (eval echo configure:1391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:1393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -1413,17 +1415,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:1417: checking for $ac_hdr" >&5
echo "configure:1419: 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
#line 1422 "configure"
#line 1424 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -1487,17 +1489,17 @@ for ac_hdr in DPS/dpsclient.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1491: checking for $ac_hdr" >&5
echo "configure:1493: 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
#line 1496 "configure"
#line 1498 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1501: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -1556,7 +1558,7 @@ fi
# Check if libobjc was compiled with thread support.
#--------------------------------------------------------------------
echo $ac_n "checking whether objc has thread support""... $ac_c" 1>&6
echo "configure:1560: checking whether objc has thread support" >&5
echo "configure:1562: checking whether objc has thread support" >&5
saved_LIBS="$LIBS"
objc_thread_lib=""
if test $host_os = linux-gnu; then
@ -1565,11 +1567,11 @@ if test $host_os = linux-gnu; then
objc_threaded="-lpthread"
else
cat > conftest.$ac_ext <<EOF
#line 1569 "configure"
#line 1571 "configure"
#include "confdefs.h"
#include "config_thread.m"
EOF
if { (eval echo configure:1573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:1575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
objc_threaded="-lpthread"
else
@ -1587,11 +1589,11 @@ fi
objc_threaded="-lpcthread"
else
cat > conftest.$ac_ext <<EOF
#line 1591 "configure"
#line 1593 "configure"
#include "confdefs.h"
#include "config_thread.m"
EOF
if { (eval echo configure:1595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:1597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
objc_threaded="-lpcthread"
else
@ -1610,11 +1612,11 @@ else
objc_threaded="-lthread"
else
cat > conftest.$ac_ext <<EOF
#line 1614 "configure"
#line 1616 "configure"
#include "confdefs.h"
#include "config_thread.m"
EOF
if { (eval echo configure:1618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:1620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
objc_threaded="-lthread"
else
@ -1785,6 +1787,7 @@ s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
s%@program_suffix@%$program_suffix%g
s%@CC@%$CC%g
s%@CPP@%$CPP%g
s%@RANLIB@%$RANLIB%g

View file

@ -38,6 +38,8 @@ fi`)
#--------------------------------------------------------------------
AC_CANONICAL_SYSTEM
AC_SUBST(program_suffix)
#--------------------------------------------------------------------
# Find the binary and compile tools
#--------------------------------------------------------------------

View file

@ -27,6 +27,9 @@ if [ -z "$1" ]; then
exit 1
fi
if [ -z "$EXEEXT" ]; then
EXEEXT=@program_suffix@
fi
if [ -z "$LIBRARY_COMBO" ]; then
LIBRARY_COMBO=@ac_cv_library_combo@
fi
@ -59,6 +62,10 @@ fi
# Remove leading slashes at the end of the application name
app=`echo $app | sed 's%/*$%%'`
if [ -z "$EXEEXT" ]; then
app=$app$EXEEXT
fi
case $app in
/*) # An absolute path.
full_appname=$app;;

View file

@ -27,6 +27,9 @@ if [ -z "$1" ]; then
exit 1
fi
if [ -z "$EXEEXT" ]; then
EXEEXT=@program_suffix@
fi
if [ -z "$LIBRARY_COMBO" ]; then
LIBRARY_COMBO=@ac_cv_library_combo@
fi
@ -60,6 +63,10 @@ export LIBRARY_COMBO
# Remove leading slashes at the end of the application name
app=`echo $app | sed 's%/*$%%'`
if [ -z "$EXEEXT" ]; then
app=$app$EXEEXT
fi
case $app in
/*) # An absolute path.
full_appname=$app;;

View file

@ -63,6 +63,9 @@ endif
ifeq ($(findstring aix4.1, $(GNUSTEP_TARGET_OS)), aix4.1)
TARGET_SYSTEM_LIBS := $(CONFIG_SYSTEM_LIBS) -lm
endif
ifeq ($(findstring freebsd3.0, $(GNUSTEP_TARGET_OS)), freebsd3.0)
TARGET_SYSTEM_LIBS := $(CONFIG_SYSTEM_LIBS) -lm
endif
#
# Specific settings for building shared libraries, static libraries,
@ -259,12 +262,43 @@ endif
#
####################################################
####################################################
#
# FreeBSD
#
ifeq ($(GNUSTEP_TARGET_OS), freebsd3.0)
HAVE_SHARED_LIBS = yes
SHARED_LIB_LINK_CMD = \
$(CC) -shared -Wl,-soname,$(VERSION_LIBRARY_FILE) \
-o $(GNUSTEP_OBJ_DIR)/$(VERSION_LIBRARY_FILE) $^ ;\
(cd $(GNUSTEP_OBJ_DIR); \
rm -f $(LIBRARY_FILE); \
$(LN_S) $(VERSION_LIBRARY_FILE) $(LIBRARY_FILE))
SHARED_CFLAGS += -fPIC
SHARED_LIBEXT = .so
HAVE_BUNDLES = yes
BUNDLE_LD = $(CC)
BUNDLE_CFLAGS += -fPIC
BUNDLE_LDFLAGS += -shared
ADDITIONAL_LDFLAGS += -rdynamic
endif
#
# end FreeBSD
#
####################################################
####################################################
#
# NetBSD
#
ifeq ($(findstring netbsd, $(GNUSTEP_TARGET_OS)), netbsd)
HAVE_SHARED_LIBS = yes
# This is disabled temporarily, because I don't know exactly how
# to link shared libs. Everything seems to link correctly now but
# constructor functions in the shared lib failed to get called
# when the lib is loaded in. I don't know why. ASF.
HAVE_SHARED_LIBS = no
SHARED_LD = ld
SHARED_LIB_LINK_CMD = \
$(SHARED_LD) -x -Bshareable -Bforcearchive \