improve control over constant string class.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30757 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2010-06-16 07:58:04 +00:00
parent e92abc1edc
commit 75d73f1e1c
3 changed files with 42 additions and 8 deletions

View file

@ -1,3 +1,10 @@
2010-06-16 Richard Frith-Macdonald <rfm@gnu.org>
* configure.ac: better control over constant string class
* configure: regenerate
Don't allow build if compiler doesn't let us set the constant string
class ... unless explicitly overridden (add warning).
2010-06-15 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSInvocation: For portability, use NSPageSize() to find

26
configure vendored
View file

@ -790,6 +790,7 @@ enable_environment_config_file
enable_importing_config_file
with_default_config
with_installation_domain
enable_nxconstantstring
enable_mixedabi
enable_bfd
enable_procfs
@ -1472,8 +1473,10 @@ Optional Features:
--disable-importing-config-file
Disable importing of an existing GNUstep config
file and use inbuilt defaults instead.
--enable-nxconstantstring
Enables the use of the NXConstantString class for old compilers.
--disable-mixedabi
Disables the cmbined use of fragile and nonfragile ABI so that base
Disables the combined use of fragile and nonfragile ABI so that base
can be built taking full advantage of the nonfragile ABI.
--enable-bfd
Enables the use of libbfd to provide symbolic stack traces.
@ -10259,7 +10262,7 @@ fi
# Don't revert any Objective-C flags as they are used in the next test
#---------------------------------------------------------------------
# Guess if we are using a compiler which allows us to change the class
# See if we are using a compiler which allows us to change the class
# to be used for constant strings by using the -fconstant-string-class
# option. If that is the case, we change it to NSConstantString.
#---------------------------------------------------------------------
@ -10326,10 +10329,25 @@ if test $objc_compiler_supports_constant_string_class = yes; then
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
else
NX_CONST_STRING_OBJCFLAGS=""
NX_CONST_STRING_CLASS=NXConstantString
{ $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
# Check whether --enable-nxconstantstring was given.
if test "${enable_nxconstantstring+set}" = set; then
enableval=$enable_nxconstantstring;
else
enable_nxconstantstring=no
fi
if test $enable_nxconstantstring = yes; then
NX_CONST_STRING_OBJCFLAGS=""
NX_CONST_STRING_CLASS=NXConstantString
{ $as_echo "$as_me:$LINENO: WARNING: You have enabled the use of NXConstantString as the string class in gnustep-base. The objective-c runtime library typically implements its own class of the same name, so you must either enforce a link order which ensures that the gnustep-base implementation is used, or (better) you must remove the class from the runtime library!" >&5
$as_echo "$as_me: WARNING: You have enabled the use of NXConstantString as the string class in gnustep-base. The objective-c runtime library typically implements its own class of the same name, so you must either enforce a link order which ensures that the gnustep-base implementation is used, or (better) you must remove the class from the runtime library!" >&2;}
else
{ { $as_echo "$as_me:$LINENO: error: Your compiler does not appear to implement the -fconstant-string-class option needed for support of strings. Please check for a more recent version or consider using --enable-nxconstantstring" >&5
$as_echo "$as_me: error: Your compiler does not appear to implement the -fconstant-string-class option needed for support of strings. Please check for a more recent version or consider using --enable-nxconstantstring" >&2;}
{ (exit 1); exit 1; }; }
fi
fi
CPPFLAGS="$strclass_CPPFLAGS"

View file

@ -1458,7 +1458,7 @@ fi
# Don't revert any Objective-C flags as they are used in the next test
#---------------------------------------------------------------------
# Guess if we are using a compiler which allows us to change the class
# See if we are using a compiler which allows us to change the class
# to be used for constant strings by using the -fconstant-string-class
# option. If that is the case, we change it to NSConstantString.
#---------------------------------------------------------------------
@ -1476,9 +1476,18 @@ if test $objc_compiler_supports_constant_string_class = yes; then
NX_CONST_STRING_CLASS=NSConstantString
AC_MSG_RESULT(yes)
else
NX_CONST_STRING_OBJCFLAGS=""
NX_CONST_STRING_CLASS=NXConstantString
AC_MSG_RESULT(no)
AC_ARG_ENABLE(nxconstantstring,
[ --enable-nxconstantstring
Enables the use of the NXConstantString class for old compilers.],,
enable_nxconstantstring=no)
if test $enable_nxconstantstring = yes; then
NX_CONST_STRING_OBJCFLAGS=""
NX_CONST_STRING_CLASS=NXConstantString
AC_MSG_WARN([You have enabled the use of NXConstantString as the string class in gnustep-base. The objective-c runtime library typically implements its own class of the same name, so you must either enforce a link order which ensures that the gnustep-base implementation is used, or (better) you must remove the class from the runtime library!])
else
AC_MSG_ERROR([Your compiler does not appear to implement the -fconstant-string-class option needed for support of strings. Please check for a more recent version or consider using --enable-nxconstantstring])
fi
fi
CPPFLAGS="$strclass_CPPFLAGS"
@ -1552,7 +1561,7 @@ if test "$nonfragile" = "yes"; then
GS_NONFRAGILE=1
AC_ARG_ENABLE(mixedabi,
[ --disable-mixedabi
Disables the cmbined use of fragile and nonfragile ABI so that base
Disables the combined use of fragile and nonfragile ABI so that base
can be built taking full advantage of the nonfragile ABI.],,
enable_mixedabi=yes)
if test $enable_mixedabi = yes; then