Minor tweaks and define USE_ARC if the compiler supports it

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@39751 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2016-05-13 09:53:44 +00:00
parent 58213890ad
commit 6163268a27
8 changed files with 281 additions and 87 deletions

View file

@ -1,3 +1,14 @@
2016-05-13 Richard Frith-Macdonald <rfm@gnu.org>
* GNUmakefile.in:
* TestFramework/gnustep-tests.in:
* config.make.in:
* common.make:
* library-combo.make:
* configure.ac:
* configure:
Minor tweaks... use ARC by default if ng runtime is specified
2016-03-25 Richard Frith-Macdonald <rfm@gnu.org>
* common.make:

View file

@ -88,10 +88,12 @@ ifeq ($(GNUSTEP_IS_FLATTENED), no)
override GNUSTEP_TARGET_DIR = $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)
override GNUSTEP_TARGET_LDIR = $(GNUSTEP_TARGET_DIR)/$(GNUSTEP_LIB_COMBO)
override MAYBE_LIBRARY_COMBO = $(GNUSTEP_LIB_COMBO)
override MAKE_CONFIG_DIR = $(GNUSTEP_TARGET_LDIR)
else
override GNUSTEP_TARGET_DIR = .
override GNUSTEP_TARGET_LDIR = .
override MAYBE_LIBRARY_COMBO = .
override MAKE_CONFIG_DIR = $(GNUSTEP_LIB_COMBO)
endif
export GNUSTEP_TARGET_DIR
@ -193,6 +195,7 @@ install: generated-files
"$(makedir)/$(GNUSTEP_TARGET_CPU)" \
"$(makedir)/$(GNUSTEP_TARGET_DIR)" \
"$(makedir)/$(GNUSTEP_TARGET_LDIR)" \
"$(makedir)/$(GNUSTEP_LIB_COMBO)" \
"$(makedir)/Additional" \
"$(makedir)/Auxiliary" \
"$(makedir)/Master" \
@ -246,7 +249,7 @@ install: generated-files
$(INSTALL_DATA) -m 755 "$(srcdir)/bake_debian_files.sh" "$(makedir)"; \
$(INSTALL_DATA) config-noarch.make "$(makedir)"; \
$(INSTALL_DATA) filesystem.make "$(makedir)"; \
$(INSTALL_DATA) config.make "$(makedir)/$(GNUSTEP_TARGET_LDIR)")
$(INSTALL_DATA) config.make "$(makedir)/$(MAKE_CONFIG_DIR)")
$(EC)(echo "Installing Test Framework scripts"; \
$(INSTALL_PROGRAM) -m 755 TestFramework/gnustep-tests "$(tooldir)"; \
$(INSTALL_PROGRAM) -m 755 $(srcdir)/TestFramework/Summary.sh "$(testdir)")
@ -258,19 +261,19 @@ install: generated-files
"$(srcdir)/mkinstalldirs" "$(mandir)/man1" \
"$(mandir)/man7"; \
$(INSTALL_DATA) "$(srcdir)/Documentation/debugapp.1" "$(mandir)/man1"; \
which gzip > /dev/null 2>&1 && rm -f "$(mandir)/man1/debugapp.1.gz" && gzip -9 "$(mandir)/man1/debugapp.1"; \
which gzip > /dev/null 2>&1 && rm -f "$(mandir)/man1/debugapp.1.gz" && gzip -9 -n "$(mandir)/man1/debugapp.1"; \
$(INSTALL_DATA) "$(srcdir)/Documentation/gnustep-config.1" "$(mandir)/man1"; \
which gzip > /dev/null 2>&1 && rm -f "$(mandir)/man1/gnustep-config.1.gz" && gzip -9 "$(mandir)/man1/gnustep-config.1"; \
which gzip > /dev/null 2>&1 && rm -f "$(mandir)/man1/gnustep-config.1.gz" && gzip -9 -n "$(mandir)/man1/gnustep-config.1"; \
$(INSTALL_DATA) "$(srcdir)/Documentation/gnustep-tests.1" "$(mandir)/man1"; \
which gzip > /dev/null 2>&1 && rm -f "$(mandir)/man1/gnustep-tests.1.gz" && gzip -9 "$(mandir)/man1/gnustep-tests.1"; \
which gzip > /dev/null 2>&1 && rm -f "$(mandir)/man1/gnustep-tests.1.gz" && gzip -9 -n "$(mandir)/man1/gnustep-tests.1"; \
$(INSTALL_DATA) "$(srcdir)/Documentation/openapp.1" "$(mandir)/man1"; \
which gzip > /dev/null 2>&1 && rm -f "$(mandir)/man1/openapp.1.gz" && gzip -9 "$(mandir)/man1/openapp.1"; \
which gzip > /dev/null 2>&1 && rm -f "$(mandir)/man1/openapp.1.gz" && gzip -9 -n "$(mandir)/man1/openapp.1"; \
$(INSTALL_DATA) "$(srcdir)/Documentation/opentool.1" "$(mandir)/man1"; \
which gzip > /dev/null 2>&1 && rm -f "$(mandir)/man1/opentool.1.gz" && gzip -9 "$(mandir)/man1/opentool.1"; \
which gzip > /dev/null 2>&1 && rm -f "$(mandir)/man1/opentool.1.gz" && gzip -9 -n "$(mandir)/man1/opentool.1"; \
$(INSTALL_DATA) "$(srcdir)/Documentation/GNUstep.7" "$(mandir)/man7"; \
which gzip > /dev/null 2>&1 && rm -f "$(mandir)/man7/GNUstep.7.gz" && gzip -9 "$(mandir)/man7/GNUstep.7"; \
which gzip > /dev/null 2>&1 && rm -f "$(mandir)/man7/GNUstep.7.gz" && gzip -9 -n "$(mandir)/man7/GNUstep.7"; \
$(INSTALL_DATA) "$(srcdir)/Documentation/library-combo.7" "$(mandir)/man7"; \
which gzip > /dev/null 2>&1 && rm -f "$(mandir)/man7/library-combo.7.gz" && gzip -9 "$(mandir)/man7/library-combo.7")
which gzip > /dev/null 2>&1 && rm -f "$(mandir)/man7/library-combo.7.gz" && gzip -9 -n "$(mandir)/man7/library-combo.7")
$(EC)(if [ "@GNUSTEP_STRIP_MAKEFILES@" = "strip" ]; then \
echo "Stripping makefiles and shell scripts..."; \
cd "$(makedir)"; ./strip_makefiles.sh; \
@ -334,7 +337,7 @@ uninstall:
rm -f "$(GNUSTEP_SYSTEM_ROOT)/share/config.site"
rm -f "$(makedir)/config-noarch.make"
rm -f "$(makedir)/filesystem.make"
rm -f "$(makedir)/$(GNUSTEP_TARGET_LDIR)/config.make"
rm -f "$(makedir)/$(MAKE_CONFIG_DIR)/config.make"
rm -f "$(GNUSTEP_CONFIG_FILE)"
-rmdir "$(GNUSTEP_CONFIG_FILE_DIR)"
-rmdir "$(testdir)"
@ -347,6 +350,7 @@ uninstall:
-rmdir "$(makedir)/$(GNUSTEP_TARGET_LDIR)"
-rmdir "$(makedir)/$(GNUSTEP_TARGET_DIR)"
-rmdir "$(makedir)/$(GNUSTEP_TARGET_CPU)"
-rmdir "$(makedir)/$(GNUSTEP_LIB_COMBO)"
-rmdir "$(makedir)"
-rmdir "$(tooldir)"

View file

@ -611,7 +611,7 @@ do
NEEDBUILD=yes
if test x"$TEMPLATE" = x
then
rm -rf core obj GNUmakefile gdb.cmds
rm -rf core core.* *.core obj GNUmakefile gdb.cmds
else
TESTNAMES=
TESTRULES=
@ -730,7 +730,7 @@ fi
if test "$GSTESTMODE" = "clean"
then
rm -rf core obj GNUmakefile.tmp gdb.cmds tests.tmp tests.sum.tmp tests.log.tmp tests.log tests.sum oldtests.log oldtests.sum
rm -rf core core.* *.core obj GNUmakefile.tmp gdb.cmds tests.tmp tests.sum.tmp tests.log.tmp tests.log tests.sum oldtests.log oldtests.sum
else
# Make some stats.
if test -r tests.sum

View file

@ -78,6 +78,70 @@ REL_PATH_SCRIPT = $(GNUSTEP_MAKEFILES)/relative_path.sh
#
include $(GNUSTEP_MAKEFILES)/names.make
# Get library_combo from LIBRARY_COMBO or default_library_combo (or
# from the command line if the user defined it on the command line by
# invoking `make library_combo=gnu-gnu-gnu'; command line
# automatically takes the precedence over makefile definitions, so
# setting library_combo here has no effect if the user already defined
# it on the command line).
ifdef LIBRARY_COMBO
library_combo := $(LIBRARY_COMBO)
else
library_combo := $(default_library_combo)
endif
# Handle abbreviations for library combinations.
the_library_combo = $(library_combo)
ifeq ($(the_library_combo), nx)
the_library_combo = nx-nx-nx
endif
ifeq ($(the_library_combo), apple)
the_library_combo = apple-apple-apple
endif
ifeq ($(the_library_combo), gnu)
the_library_combo = gnu-gnu-gnu
endif
ifeq ($(the_library_combo), ng)
the_library_combo = ng-gnu-gnu
endif
ifeq ($(the_library_combo), fd)
the_library_combo = gnu-fd-gnu
endif
# Strip out the individual libraries from the library_combo string
combo_list = $(subst -, ,$(the_library_combo))
# NB: The user can always specify any of the OBJC_RUNTIME_LIB, the
# FOUNDATION_LIB and the GUI_LIB variable manually overriding our
# determination.
ifeq ($(OBJC_RUNTIME_LIB),)
OBJC_RUNTIME_LIB = $(word 1,$(combo_list))
endif
ifeq ($(FOUNDATION_LIB),)
FOUNDATION_LIB = $(word 2,$(combo_list))
endif
ifeq ($(GUI_LIB),)
GUI_LIB = $(word 3,$(combo_list))
endif
# Now build and export the final LIBRARY_COMBO variable, which is the
# only variable (together with OBJC_RUNTIME_LIB, FOUNDATION_LIB and
# GUI_LIB) the other makefiles need to know about. This LIBRARY_COMBO
# might be different from the original one, because we might have
# replaced it with a library_combo provided on the command line, or we
# might have fixed up parts of it in accordance to some custom
# OBJC_RUNTIME_LIB, FOUNDATION_LIB and/or GUI_LIB !
export LIBRARY_COMBO = $(OBJC_RUNTIME_LIB)-$(FOUNDATION_LIB)-$(GUI_LIB)
ifeq ($(GNUSTEP_IS_FLATTENED), no)
GNUSTEP_HOST_DIR = $(GNUSTEP_HOST_CPU)/$(GNUSTEP_HOST_OS)
GNUSTEP_TARGET_DIR = $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)
@ -90,14 +154,18 @@ else
GNUSTEP_TARGET_LDIR = .
endif
# Then, work out precisely library combos etc
include $(GNUSTEP_MAKEFILES)/library-combo.make
#
# Get the config information (host/target/library-combo specific),
# this includes CC, OPTFLAG etc.
#
include $(GNUSTEP_MAKEFILES)/$(GNUSTEP_TARGET_LDIR)/config.make
ifeq ($(GNUSTEP_IS_FLATTENED),yes)
include $(GNUSTEP_MAKEFILES)/$(LIBRARY_COMBO)/config.make
else
include $(GNUSTEP_MAKEFILES)/$(GNUSTEP_TARGET_LDIR)/config.make
endif
# Then, work out precisely library combos etc
include $(GNUSTEP_MAKEFILES)/library-combo.make
# GNUSTEP_BUILD_DIR is the directory in which anything generated
# during the build will be placed. '.' means it's the same as the
@ -350,8 +418,8 @@ endif
# So all instances of INSTALL_ROOT_DIR in user's makefiles should be
# replaced with DESTDIR.
#
# Anyway, until all makefiles have been updated, we set INSTALL_ROOT_DIR for backwards
# compatibility.
# Anyway, until all makefiles have been updated, we set INSTALL_ROOT_DIR
# for backwards compatibility.
#
ifeq ($(GNUSTEP_MAKE_STRICT_V2_MODE),yes)
ifneq ($(INSTALL_ROOT_DIR),)
@ -414,6 +482,10 @@ endif
# First, we add paths based in the USER domain.
# But don't add GNUSTEP_USER_ROOT paths if being built by dpkg-buildpackage;
# this is a Debian-specific convenience for package builders.
ifndef DEB_BUILD_ARCH
# Please note that the following causes GS_HEADER_PATH to be evaluated
# with the variable domain equal to USER, which gives the effect we
# wanted.
@ -421,6 +493,8 @@ GNUSTEP_HEADERS_DIRS = $(foreach domain,USER,$(GS_HEADER_PATH))
GNUSTEP_LIBRARIES_DIRS = $(foreach domain,USER,$(GS_LIBRARY_PATH))
GNUSTEP_FRAMEWORKS_DIRS = $(foreach domain,USER,$(GS_FRAMEWORK_PATH))
endif
# Second, if LOCAL flags are different from USER flags (which have
# already been added), we add the LOCAL flags too.
ifneq ($(GNUSTEP_LOCAL_HEADERS), $(GNUSTEP_USER_HEADERS))

View file

@ -211,6 +211,11 @@ USE_OBJC_EXCEPTIONS = @USE_OBJC_EXCEPTIONS@
#
USE_NONFRAGILE_ABI = @USE_NONFRAGILE_ABI@
#
# Whether the ObjC compiler supports -fobjc-arc
#
USE_ARC = @USE_ARC@
#
# Whether the compiler is GCC with precompiled header support
#

105
configure vendored
View file

@ -610,6 +610,7 @@ AUTO_DEPENDENCIES
USE_OBJC_EXCEPTIONS
CLANG_CC
OBJ_MERGE_CMD_FLAG
USE_ARC
USE_NONFRAGILE_ABI
OBJCXX
ac_cv_objc_threaded
@ -778,6 +779,7 @@ enable_install_ld_so_conf
with_objc_lib_flag
with_thread_lib
enable_objc_nonfragile_abi
enable_objc_arc
enable_native_objc_exceptions
enable_debug_by_default
enable_strip_makefiles
@ -1498,6 +1500,11 @@ Optional Features:
to use non-fragile instance variables provided by clang and libobjc2.
--enable-objc-arc
Use automatic retain counts for Objective-C. Use this option if you want
to use the ARC mechanism of the Objective-C compiler and runtime.
--disable-native-objc-exceptions
Disable native Objective-C exception support (@try / @catch /
@finally / @synchronized). If unspecified, Objective-C exception
@ -2443,6 +2450,7 @@ OBJC_RUNTIME_LIB=`echo $ac_cv_library_combo | awk -F- '{print $1}'`
# The ng runtime library setting requires clang rather than gcc
if test "$OBJC_RUNTIME_LIB" = "ng"; then
defaultng=yes;
if test "$OBJCC" = ""; then
OBJCC=clang
fi
@ -2455,6 +2463,8 @@ if test "$OBJC_RUNTIME_LIB" = "ng"; then
if test "$CXX" = ""; then
CXX=clang++
fi
else
defaultng=no;
fi
ac_ext=c
@ -5917,16 +5927,16 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test "$OBJC_RUNTIME_LIB" != ng; then
#--------------------------------------------------------------------
# Check if GCC supports -fobjc-nonfragile-abi, and if so, turn it on!
# Check if compiler supports -fobjc-nonfragile-abi, and if so, turn it on!
#--------------------------------------------------------------------
# TODO: Enable it by default if the compiler supports it :-)
# Check whether --enable-objc-nonfragile-abi was given.
if test "${enable_objc_nonfragile_abi+set}" = set; then :
enableval=$enable_objc_nonfragile_abi; USE_NONFRAGILE_ABI=$enableval
else
USE_NONFRAGILE_ABI=unset
USE_NONFRAGILE_ABI=notset
fi
@ -6002,6 +6012,92 @@ $as_echo "yes (compiler default)" >&6; }
$as_echo "not requested by user" >&6; }
fi
fi
fi
#--------------------------------------------------------------------
# Check if compiler supports -fobjc-arc, and if so, turn it on!
#--------------------------------------------------------------------
# Check whether --enable-objc-arc was given.
if test "${enable_objc_arc+set}" = set; then :
enableval=$enable_objc_arc; USE_ARC=$enableval
else
USE_ARC=$defaultng
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should use ARC" >&5
$as_echo_n "checking whether we should use ARC... " >&6; }
if test x"$USE_ARC" = x"yes"; then
# What we want to do: set USE_ARC to yes if we can compile
# something with -fobjc-arc.
CFLAGS_no_arc="$CFLAGS"
CFLAGS="$CFLAGS -fobjc-runtime=gnustep-1.8 -fobjc-arc"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Note that we never execute this code so it does not really matter
what it is. We are testing that the compiler accepts the
'-fobjc-arc' flag. */
int
main()
{
#ifndef __has_feature
#define __has_feature(x) 0
#endif
return __has_feature(objc_arc) ? 0 : 1;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
USE_ARC=yes
else
USE_ARC=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_ARC" >&5
$as_echo "$USE_ARC" >&6; }
CFLAGS="$CFLAGS_no_arc"
if test x"$USE_ARC" = x"no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Building ARC code was requested, but the compiler" >&5
$as_echo "$as_me: Building ARC code was requested, but the compiler" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: doesn't support it." >&5
$as_echo "$as_me: doesn't support it." >&6;}
as_fn_error $? "compiler doesn't support ARC" "$LINENO" 5
fi
else
if test x"$USE_ARC" != x"no"; then
saved_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -x objective-c"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifndef __has_feature
#define __has_feature(x) 0
#endif
__has_feature(objc_arc)
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "^1$" >/dev/null 2>&1; then :
USE_ARC=yes
else
USE_ARC=no
fi
rm -f conftest*
CPPFLAGS=$saved_CPPFLAGS
fi
if test x"$USE_ARC" = x"yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (compiler default)" >&5
$as_echo "yes (compiler default)" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not requested by user" >&5
$as_echo "not requested by user" >&6; }
fi
fi
@ -6669,6 +6765,8 @@ fi
#--------------------------------------------------------------------
ac_config_files="$ac_config_files config-noarch.make config.make openapp opentool executable.template GNUmakefile GNUstep.conf GNUstep-strict-v2.conf GNUstep.sh GNUstep.csh fixpath.sh gnustep-make.spec gnustep-config TestFramework/gnustep-tests filesystem.make filesystem.sh filesystem.csh gnustep-make-ld.so.conf"
ac_config_files="$ac_config_files runtime/$OBJC_RUNTIME_LIB.make:config.make.in"
ac_config_commands="$ac_config_commands default"
cat >confcache <<\_ACEOF
@ -7404,6 +7502,7 @@ do
"filesystem.sh") CONFIG_FILES="$CONFIG_FILES filesystem.sh" ;;
"filesystem.csh") CONFIG_FILES="$CONFIG_FILES filesystem.csh" ;;
"gnustep-make-ld.so.conf") CONFIG_FILES="$CONFIG_FILES gnustep-make-ld.so.conf" ;;
"runtime/$OBJC_RUNTIME_LIB.make") CONFIG_FILES="$CONFIG_FILES runtime/$OBJC_RUNTIME_LIB.make:config.make.in" ;;
"default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;

View file

@ -97,6 +97,7 @@ OBJC_RUNTIME_LIB=`echo $ac_cv_library_combo | awk -F- '{print $1}'`
# The ng runtime library setting requires clang rather than gcc
if test "$OBJC_RUNTIME_LIB" = "ng"; then
defaultng=yes;
if test "$OBJCC" = ""; then
OBJCC=clang
fi
@ -109,6 +110,8 @@ if test "$OBJC_RUNTIME_LIB" = "ng"; then
if test "$CXX" = ""; then
CXX=clang++
fi
else
defaultng=no;
fi
AC_PROG_CC
@ -1379,18 +1382,18 @@ CXXFLAGS="$CXXFLAGS_saved"
CXXPPFLAGS="$CXXPPFLAGS_saved"
AC_LANG_POP(C++)
if test "$OBJC_RUNTIME_LIB" != ng; then
#--------------------------------------------------------------------
# Check if GCC supports -fobjc-nonfragile-abi, and if so, turn it on!
# Check if compiler supports -fobjc-nonfragile-abi, and if so, turn it on!
#--------------------------------------------------------------------
# TODO: Enable it by default if the compiler supports it :-)
AC_ARG_ENABLE(objc-nonfragile-abi, [
--enable-objc-nonfragile-abi
Use the non-fragile ABI for Objective-C. Use this option if you want
to use non-fragile instance variables provided by clang and libobjc2.
],
USE_NONFRAGILE_ABI=$enableval,
USE_NONFRAGILE_ABI=unset)
USE_NONFRAGILE_ABI=notset)
AC_MSG_CHECKING(whether we should use the nonfragile ABI)
if test x"$USE_NONFRAGILE_ABI" = x"yes"; then
@ -1437,9 +1440,69 @@ __has_feature(objc_nonfragile_abi)
AC_MSG_RESULT(not requested by user)
fi
fi
fi
AC_SUBST(USE_NONFRAGILE_ABI)
#--------------------------------------------------------------------
# Check if compiler supports -fobjc-arc, and if so, turn it on!
#--------------------------------------------------------------------
AC_ARG_ENABLE(objc-arc, [
--enable-objc-arc
Use automatic retain counts for Objective-C. Use this option if you want
to use the ARC mechanism of the Objective-C compiler and runtime.
],
USE_ARC=$enableval,
USE_ARC=$defaultng)
AC_MSG_CHECKING(whether we should use ARC)
if test x"$USE_ARC" = x"yes"; then
# What we want to do: set USE_ARC to yes if we can compile
# something with -fobjc-arc.
CFLAGS_no_arc="$CFLAGS"
CFLAGS="$CFLAGS -fobjc-runtime=gnustep-1.8 -fobjc-arc"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
/* Note that we never execute this code so it does not really matter
what it is. We are testing that the compiler accepts the
'-fobjc-arc' flag. */
int
main()
{
#ifndef __has_feature
#define __has_feature(x) 0
#endif
return __has_feature(objc_arc) ? 0 : 1;
}
]])], USE_ARC=yes, USE_ARC=no)
AC_MSG_RESULT($USE_ARC)
CFLAGS="$CFLAGS_no_arc"
if test x"$USE_ARC" = x"no"; then
AC_MSG_NOTICE([Building ARC code was requested, but the compiler])
AC_MSG_NOTICE([doesn't support it.])
AC_MSG_ERROR([compiler doesn't support ARC])
fi
else
if test x"$USE_ARC" != x"no"; then
saved_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -x objective-c"
AC_EGREP_CPP([^1$], [
#ifndef __has_feature
#define __has_feature(x) 0
#endif
__has_feature(objc_arc)
], USE_ARC=yes, USE_ARC=no)
CPPFLAGS=$saved_CPPFLAGS
fi
if test x"$USE_ARC" = x"yes"; then
AC_MSG_RESULT([yes (compiler default)])
else
AC_MSG_RESULT(not requested by user)
fi
fi
AC_SUBST(USE_ARC)
# Keep LIBS and CFLAGS as they are for a while - we need them in
# the following Objective-C tests!
@ -1917,6 +1980,7 @@ executable.template GNUmakefile GNUstep.conf GNUstep-strict-v2.conf
GNUstep.sh GNUstep.csh fixpath.sh
gnustep-make.spec gnustep-config TestFramework/gnustep-tests
filesystem.make filesystem.sh filesystem.csh gnustep-make-ld.so.conf])
AC_CONFIG_FILES([runtime/$OBJC_RUNTIME_LIB.make:config.make.in])
AC_CONFIG_COMMANDS([default],
[[chmod a+x openapp opentool fixpath.sh executable.template]],
[[]])

View file

@ -20,69 +20,6 @@
# If not, write to the Free Software Foundation,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# Get library_combo from LIBRARY_COMBO or default_library_combo (or
# from the command line if the user defined it on the command line by
# invoking `make library_combo=gnu-gnu-gnu'; command line
# automatically takes the precedence over makefile definitions, so
# setting library_combo here has no effect if the user already defined
# it on the command line).
ifdef LIBRARY_COMBO
library_combo := $(LIBRARY_COMBO)
else
library_combo := $(default_library_combo)
endif
# Handle abbreviations for library combinations.
the_library_combo = $(library_combo)
ifeq ($(the_library_combo), nx)
the_library_combo = nx-nx-nx
endif
ifeq ($(the_library_combo), apple)
the_library_combo = apple-apple-apple
endif
ifeq ($(the_library_combo), gnu)
the_library_combo = gnu-gnu-gnu
endif
ifeq ($(the_library_combo), ng)
the_library_combo = ng-gnu-gnu
endif
ifeq ($(the_library_combo), fd)
the_library_combo = gnu-fd-gnu
endif
# Strip out the individual libraries from the library_combo string
combo_list = $(subst -, ,$(the_library_combo))
# NB: The user can always specify any of the OBJC_RUNTIME_LIB, the
# FOUNDATION_LIB and the GUI_LIB variable manually overriding our
# determination.
ifeq ($(OBJC_RUNTIME_LIB),)
OBJC_RUNTIME_LIB = $(word 1,$(combo_list))
endif
ifeq ($(FOUNDATION_LIB),)
FOUNDATION_LIB = $(word 2,$(combo_list))
endif
ifeq ($(GUI_LIB),)
GUI_LIB = $(word 3,$(combo_list))
endif
# Now build and export the final LIBRARY_COMBO variable, which is the
# only variable (together with OBJC_RUNTIME_LIB, FOUNDATION_LIB and
# GUI_LIB) the other makefiles need to know about. This LIBRARY_COMBO
# might be different from the original one, because we might have
# replaced it with a library_combo provided on the command line, or we
# might have fixed up parts of it in accordance to some custom
# OBJC_RUNTIME_LIB, FOUNDATION_LIB and/or GUI_LIB !
export LIBRARY_COMBO = $(OBJC_RUNTIME_LIB)-$(FOUNDATION_LIB)-$(GUI_LIB)
OBJC_LDFLAGS =
OBJC_LIBS =