Try to improve reliability of configuration process

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34076 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2011-10-27 07:43:49 +00:00
parent 5194c310bd
commit 11c746c467
4 changed files with 69 additions and 46 deletions

View file

@ -1,3 +1,12 @@
2011-10-27 Richard Frith-Macdonald <rfm@gnu.org>
* configure.ac: Do not redefine GNUSTEP_CONFIG_FILE in case it confuses
gnustep-config. Add check that gnustep-config returns something when
asked for the objc libraries.
* configure: Regenerate
* base.make.in: Add flag to tell compiler to use UTF-8 for literal
string constants.
2011-10-25 Richard Frith-Macdonald <rfm@gnu.org> 2011-10-25 Richard Frith-Macdonald <rfm@gnu.org>
* configure.ac: fix erroneous define of HAVE_GNUTLS to zero, and add * configure.ac: fix erroneous define of HAVE_GNUTLS to zero, and add

View file

@ -21,34 +21,38 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
ifeq ($(BASE_MAKE_LOADED),) ifeq ($(BASE_MAKE_LOADED),)
BASE_MAKE_LOADED=yes BASE_MAKE_LOADED=yes
ifeq ($(FOUNDATION_LIB),gnu) ifeq ($(FOUNDATION_LIB),gnu)
# #
# FIXME - macro names # FIXME - macro names
# #
AUXILIARY_OBJCFLAGS += @NX_CONST_STRING_OBJCFLAGS@ AUXILIARY_OBJCFLAGS += @NX_CONST_STRING_OBJCFLAGS@
ifeq ($(shared),no) ifeq ($(shared),no)
CONFIG_SYSTEM_LIBS += @LIBS@ CONFIG_SYSTEM_LIBS += @LIBS@
CONFIG_SYSTEM_LIB_DIR += @LDIR_FLAGS@ CONFIG_SYSTEM_LIB_DIR += @LDIR_FLAGS@
endif
GNUSTEP_BASE_VERSION = @VERSION@
GNUSTEP_BASE_MAJOR_VERSION = @MAJOR_VERSION@
GNUSTEP_BASE_MINOR_VERSION = @MINOR_VERSION@
GNUSTEP_BASE_SUBMINOR_VERSION = @SUBMINOR_VERSION@
FND_LDFLAGS =
FND_LIBS = -lgnustep-base
FND_DEFINE = -DGNUSTEP_BASE_LIBRARY=1
GNUSTEP_DEFINE = -DGNUSTEP
else
#
# Not using the GNUstep foundation ... must be Apple's
# So we need to use the base additions library.
#
FND_LIBS = -lgnustep-baseadd -framework Foundation
endif endif
GNUSTEP_BASE_VERSION = @VERSION@ # For literal string handling, base requires the compiler to store the
GNUSTEP_BASE_MAJOR_VERSION = @MAJOR_VERSION@ # string as UTF-8
GNUSTEP_BASE_MINOR_VERSION = @MINOR_VERSION@ AUXILIARY_OBJCFLAGS += -fexec-charset=UTF-8
GNUSTEP_BASE_SUBMINOR_VERSION = @SUBMINOR_VERSION@
FND_LDFLAGS =
FND_LIBS = -lgnustep-base
FND_DEFINE = -DGNUSTEP_BASE_LIBRARY=1
GNUSTEP_DEFINE = -DGNUSTEP
else
#
# Not using the GNUstep foundation ... must be Apple's
# So we need to use the base additions library.
#
FND_LIBS = -lgnustep-baseadd -framework Foundation
endif
GNUSTEP_BASE_HAVE_GNUTLS=@HAVE_GNUTLS@ GNUSTEP_BASE_HAVE_GNUTLS=@HAVE_GNUTLS@
GNUSTEP_BASE_HAVE_LIBXML=@HAVE_LIBXML@ GNUSTEP_BASE_HAVE_LIBXML=@HAVE_LIBXML@

28
configure vendored
View file

@ -1553,8 +1553,8 @@ Optional Packages:
provide default values for the base library provide default values for the base library
to use at runtime if no GNUstep config file to use at runtime if no GNUstep config file
is found at runtime. If this is not specified is found at runtime. If this is not specified
then the path from --with-config-file or from then the path from the gnustep-make package
the gnustep-make package is used. is used.
--with-installation-domain=DOMAIN --with-installation-domain=DOMAIN
Specify the domain (SYSTEM, LOCAL, Specify the domain (SYSTEM, LOCAL,
NETWORK or USER) into which NETWORK or USER) into which
@ -2275,18 +2275,18 @@ fi
if test "$result" != "no" if test "$result" != "no"
then then
GNUSTEP_CONFIG_FILE="$result" GNUSTEP_TARGET_CONFIG_FILE="$result"
fi fi
if test x"$GNUSTEP_CONFIG_FILE" = x""; then if test x"$GNUSTEP_TARGET_CONFIG_FILE" = x""; then
case "$target_os" in case "$target_os" in
mingw*) mingw*)
GNUSTEP_CONFIG_FILE=./GNUstep.conf ;; GNUSTEP_TARGET_CONFIG_FILE=./GNUstep.conf ;;
*) *)
GNUSTEP_CONFIG_FILE="$GNUSTEP_MAKE_CONFIG" ;; GNUSTEP_TARGET_CONFIG_FILE="$GNUSTEP_MAKE_CONFIG" ;;
esac esac
fi fi
{ $as_echo "$as_me:$LINENO: result: $GNUSTEP_CONFIG_FILE" >&5 { $as_echo "$as_me:$LINENO: result: $GNUSTEP_TARGET_CONFIG_FILE" >&5
$as_echo "$GNUSTEP_CONFIG_FILE" >&6; } $as_echo "$GNUSTEP_TARGET_CONFIG_FILE" >&6; }
#----------------------------------------------------------------- #-----------------------------------------------------------------
# Whether the GNUstep.conf file path can be set in the environment # Whether the GNUstep.conf file path can be set in the environment
@ -2328,7 +2328,7 @@ $as_echo "no: disabled from the command-line" >&6; }
fi fi
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# We are not trying to determine the default GNUstep paths to be # We are now trying to determine the default GNUstep paths to be
# used at runtime. So all GNUSTEP_xxx variables from now on are to be # used at runtime. So all GNUSTEP_xxx variables from now on are to be
# considered as 'runtime' ones. They refer to paths that might not # considered as 'runtime' ones. They refer to paths that might not
# make any sense now, but might make sense once gnustep-base is # make any sense now, but might make sense once gnustep-base is
@ -2909,10 +2909,10 @@ cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_USER_CONFIG_FILE "$GNUSTEP_USER_CONFIG_FILE" #define GNUSTEP_TARGET_USER_CONFIG_FILE "$GNUSTEP_USER_CONFIG_FILE"
_ACEOF _ACEOF
GNUSTEP_CONFIG_FILE=`echo $GNUSTEP_CONFIG_FILE|sed -e 's/\\\\/\\\\\\\\/g'` GNUSTEP_TARGET_CONFIG_FILE=`echo $GNUSTEP_TARGET_CONFIG_FILE|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_CONFIG_FILE "$GNUSTEP_CONFIG_FILE" #define GNUSTEP_TARGET_CONFIG_FILE "$GNUSTEP_TARGET_CONFIG_FILE"
_ACEOF _ACEOF
@ -5476,6 +5476,12 @@ $as_echo "GNU" >&6; }
OBJCFLAGS="$OBJCFLAGS -fgnu-runtime" OBJCFLAGS="$OBJCFLAGS -fgnu-runtime"
fi fi
LIBOBJC=`gnustep-config --objc-libs` LIBOBJC=`gnustep-config --objc-libs`
if test "$LIBOBJC" = ""; then
{ { $as_echo "$as_me:$LINENO: error: The command 'gnustep-config --objc-libs' (provided by the gnustep-make package) returned no Objective-C library. Unable to continue configuring without Objective-C support." >&5
$as_echo "$as_me: error: The command 'gnustep-config --objc-libs' (provided by the gnustep-make package) returned no Objective-C library. Unable to continue configuring without Objective-C support." >&2;}
{ (exit 1); exit 1; }; }
exit 1
fi
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Miscellaneous flags # Miscellaneous flags

View file

@ -170,17 +170,17 @@ AC_ARG_WITH(config-file,
) )
if test "$result" != "no" if test "$result" != "no"
then then
GNUSTEP_CONFIG_FILE="$result" GNUSTEP_TARGET_CONFIG_FILE="$result"
fi fi
if test x"$GNUSTEP_CONFIG_FILE" = x""; then if test x"$GNUSTEP_TARGET_CONFIG_FILE" = x""; then
case "$target_os" in case "$target_os" in
mingw*) mingw*)
GNUSTEP_CONFIG_FILE=./GNUstep.conf ;; GNUSTEP_TARGET_CONFIG_FILE=./GNUstep.conf ;;
*) *)
GNUSTEP_CONFIG_FILE="$GNUSTEP_MAKE_CONFIG" ;; GNUSTEP_TARGET_CONFIG_FILE="$GNUSTEP_MAKE_CONFIG" ;;
esac esac
fi fi
AC_MSG_RESULT($GNUSTEP_CONFIG_FILE) AC_MSG_RESULT($GNUSTEP_TARGET_CONFIG_FILE)
#----------------------------------------------------------------- #-----------------------------------------------------------------
# Whether the GNUstep.conf file path can be set in the environment # Whether the GNUstep.conf file path can be set in the environment
@ -226,7 +226,7 @@ else
fi fi
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# We are not trying to determine the default GNUstep paths to be # We are now trying to determine the default GNUstep paths to be
# used at runtime. So all GNUSTEP_xxx variables from now on are to be # used at runtime. So all GNUSTEP_xxx variables from now on are to be
# considered as 'runtime' ones. They refer to paths that might not # considered as 'runtime' ones. They refer to paths that might not
# make any sense now, but might make sense once gnustep-base is # make any sense now, but might make sense once gnustep-base is
@ -278,8 +278,8 @@ then
provide default values for the base library provide default values for the base library
to use at runtime if no GNUstep config file to use at runtime if no GNUstep config file
is found at runtime. If this is not specified is found at runtime. If this is not specified
then the path from --with-config-file or from then the path from the gnustep-make package
the gnustep-make package is used.], is used.],
result="$withval", result="$withval",
result="no" result="no"
) )
@ -686,9 +686,9 @@ GNUSTEP_USER_CONFIG_FILE=`echo $GNUSTEP_USER_CONFIG_FILE|sed -e 's/\\\\/\\\\\\\\
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_USER_CONFIG_FILE, AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_USER_CONFIG_FILE,
"$GNUSTEP_USER_CONFIG_FILE", "$GNUSTEP_USER_CONFIG_FILE",
[Built in default value for GNUstep user config file]) [Built in default value for GNUstep user config file])
GNUSTEP_CONFIG_FILE=`echo $GNUSTEP_CONFIG_FILE|sed -e 's/\\\\/\\\\\\\\/g'` GNUSTEP_TARGET_CONFIG_FILE=`echo $GNUSTEP_TARGET_CONFIG_FILE|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_CONFIG_FILE, AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_CONFIG_FILE,
"$GNUSTEP_CONFIG_FILE", "$GNUSTEP_TARGET_CONFIG_FILE",
[Built in default value for GNUstep config file]) [Built in default value for GNUstep config file])
# #
@ -1131,6 +1131,10 @@ else
OBJCFLAGS="$OBJCFLAGS -fgnu-runtime" OBJCFLAGS="$OBJCFLAGS -fgnu-runtime"
fi fi
LIBOBJC=`gnustep-config --objc-libs` LIBOBJC=`gnustep-config --objc-libs`
if test "$LIBOBJC" = ""; then
AC_MSG_ERROR([The command 'gnustep-config --objc-libs' (provided by the gnustep-make package) returned no Objective-C library. Unable to continue configuring without Objective-C support.])
exit 1
fi
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Miscellaneous flags # Miscellaneous flags