mirror of
https://github.com/gnustep/tools-make.git
synced 2025-05-06 11:50:42 +00:00
Moved determination of host, target system etc at the beginning. Minor
improvements in GNUSTEP_*_ROOT; simplified awk call; some comment tidiup git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@12326 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
27ddb70285
commit
aae3875261
1 changed files with 131 additions and 117 deletions
248
configure.in
248
configure.in
|
@ -22,118 +22,6 @@ AC_INIT(application.make)
|
|||
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# The GNUstep root directory.
|
||||
# The user should have the GNUSTEP_SYSTEM_ROOT environment variable
|
||||
# defined, but if not then we have a global default.
|
||||
# Also test for the C: directory, which means we're on Windows
|
||||
#--------------------------------------------------------------------
|
||||
AC_PREFIX_DEFAULT(`if test "x$GNUSTEP_SYSTEM_ROOT" = "x"; then
|
||||
if test -d C: ; then
|
||||
echo C:/GNUstep;
|
||||
else
|
||||
echo /usr/GNUstep ;
|
||||
fi
|
||||
else
|
||||
echo "$GNUSTEP_SYSTEM_ROOT" ;
|
||||
fi`)
|
||||
if test "x$prefix" = "xNONE"; then
|
||||
prefix="$ac_default_prefix" ;
|
||||
fi
|
||||
AC_ARG_WITH(system-root,
|
||||
[--without-system-root Don't use separate system root directory],
|
||||
ac_cv_system_root="$withval",
|
||||
ac_cv_system_root=yes)
|
||||
|
||||
GNUSTEP_ROOT="$prefix"
|
||||
root_prefix='${prefix}'
|
||||
if test $ac_cv_system_root = yes; then
|
||||
if test "x`basename $prefix`" = xSystem; then
|
||||
GNUSTEP_ROOT=`dirname $prefix`
|
||||
else
|
||||
if test "x$prefix" = "x/"; then
|
||||
prefix=/System
|
||||
else
|
||||
prefix="$prefix/System"
|
||||
fi
|
||||
fi
|
||||
root_prefix='${prefix}/..'
|
||||
fi
|
||||
AC_SUBST(GNUSTEP_ROOT)
|
||||
AC_SUBST(root_prefix)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Process --with-user-root, --with-local-root and --with-network-root
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
AC_ARG_WITH(local-root,
|
||||
[--with-local-root
|
||||
Set the GNUSTEP_LOCAL_ROOT directory. Use this option if you want
|
||||
to have the GNUSTEP_LOCAL_ROOT directory in a non-standard place. Example:
|
||||
--with-local-root=/usr/local/GNUstep/Local
|
||||
],
|
||||
GNUSTEP_LOCAL_ROOT="$withval",
|
||||
GNUSTEP_LOCAL_ROOT="$GNUSTEP_ROOT/Local"
|
||||
)
|
||||
|
||||
AC_ARG_WITH(network-root,
|
||||
[--with-network-root
|
||||
Set the GNUSTEP_NETWORK_ROOT directory. Use this option if you want
|
||||
to have the GNUSTEP_NETWORK_ROOT directory in a non-standard place. Example:
|
||||
--with-network-root=/usr/local/GNUstep/Network
|
||||
],
|
||||
GNUSTEP_NETWORK_ROOT="$withval",
|
||||
GNUSTEP_NETWORK_ROOT="$GNUSTEP_ROOT/Network"
|
||||
)
|
||||
|
||||
AC_ARG_WITH(user-root,
|
||||
[--with-user-root
|
||||
Set the GNUSTEP_USER_ROOT directory. Use this option if you want
|
||||
to have the GNUSTEP_USER_ROOT directory in a non-standard place. Example:
|
||||
--with-user-root=~/local/GNUstep
|
||||
],
|
||||
GNUSTEP_USER_ROOT="$withval",
|
||||
GNUSTEP_USER_ROOT=""
|
||||
)
|
||||
|
||||
AC_SUBST(GNUSTEP_LOCAL_ROOT)
|
||||
AC_SUBST(GNUSTEP_NETWORK_ROOT)
|
||||
AC_SUBST(GNUSTEP_USER_ROOT)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Is the system flattened?
|
||||
#--------------------------------------------------------------------
|
||||
AC_ARG_ENABLE(flattened,
|
||||
[--enable-flattened Use flattened directory structure],
|
||||
ac_cv_flattened=$enableval,
|
||||
ac_cv_flattened="undefined")
|
||||
|
||||
if test "$ac_cv_flattened" = "yes"; then
|
||||
GNUSTEP_FLATTENED=yes;
|
||||
else
|
||||
if test "$ac_cv_flattened" = "no"; then
|
||||
GNUSTEP_FLATTENED=;
|
||||
else
|
||||
GNUSTEP_FLATTENED=$GNUSTEP_FLATTENED;
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(GNUSTEP_FLATTENED)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Build backend bundles (on by default)
|
||||
#--------------------------------------------------------------------
|
||||
AC_ARG_ENABLE(backend-bundle, [
|
||||
--disable-backend-bundle Compile gui backend as a library],
|
||||
ac_cv_backend=$enableval,
|
||||
ac_cv_backend="yes")
|
||||
|
||||
if test "$ac_cv_backend" = "yes"; then
|
||||
BACKEND_BUNDLE=yes;
|
||||
else
|
||||
BACKEND_BUNDLE=;
|
||||
fi
|
||||
AC_SUBST(BACKEND_BUNDLE)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Setup the library combination
|
||||
#--------------------------------------------------------------------
|
||||
|
@ -158,7 +46,7 @@ if test "$ac_cv_library_combo" = ""; then
|
|||
fi
|
||||
AC_SUBST(ac_cv_library_combo)
|
||||
|
||||
OBJC_RUNTIME_LIB=`echo $ac_cv_library_combo | tr '-' ' ' | awk '{print $1}'`
|
||||
OBJC_RUNTIME_LIB=`echo $ac_cv_library_combo | awk -F- '{print $1}'`
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# specific target_os options
|
||||
|
@ -233,6 +121,135 @@ if test "$CHOWN" = "none"; then
|
|||
AC_MSG_ERROR("Could not find chown.");
|
||||
fi
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# GNUstep specific options follow
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# The GNUstep root directory.
|
||||
# The user should have the GNUSTEP_SYSTEM_ROOT environment variable
|
||||
# defined, but if not then we have a global default.
|
||||
# Also test for the C: directory, which means we're on Windows
|
||||
#--------------------------------------------------------------------
|
||||
AC_MSG_CHECKING(for GNUSTEP_SYSTEM_ROOT to use)
|
||||
AC_PREFIX_DEFAULT(`if test "x$GNUSTEP_SYSTEM_ROOT" = "x"; then
|
||||
if test -d C: ; then
|
||||
echo C:/GNUstep;
|
||||
else
|
||||
echo /usr/GNUstep ;
|
||||
fi
|
||||
else
|
||||
echo "$GNUSTEP_SYSTEM_ROOT" ;
|
||||
fi`)
|
||||
if test "x$prefix" = "xNONE"; then
|
||||
prefix="$ac_default_prefix" ;
|
||||
fi
|
||||
AC_ARG_WITH(system-root,
|
||||
[--without-system-root Don't use separate system root directory],
|
||||
ac_cv_system_root="$withval",
|
||||
ac_cv_system_root=yes)
|
||||
|
||||
GNUSTEP_ROOT="$prefix"
|
||||
root_prefix='${prefix}'
|
||||
if test $ac_cv_system_root = yes; then
|
||||
if test "x`basename $prefix`" = xSystem; then
|
||||
GNUSTEP_ROOT=`dirname $prefix`
|
||||
else
|
||||
if test "x$prefix" = "x/"; then
|
||||
prefix=/System
|
||||
else
|
||||
prefix="$prefix/System"
|
||||
fi
|
||||
fi
|
||||
root_prefix='${prefix}/..'
|
||||
fi
|
||||
AC_SUBST(GNUSTEP_ROOT)
|
||||
AC_SUBST(root_prefix)
|
||||
AC_MSG_RESULT($prefix)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Process --with-user-root, --with-local-root and --with-network-root
|
||||
#--------------------------------------------------------------------
|
||||
AC_MSG_CHECKING(for GNUSTEP_LOCAL_ROOT to use)
|
||||
AC_ARG_WITH(local-root,
|
||||
[--with-local-root
|
||||
Set the GNUSTEP_LOCAL_ROOT directory. Use this option if you want
|
||||
to have the GNUSTEP_LOCAL_ROOT directory in a non-standard place. Example:
|
||||
--with-local-root=/usr/local/GNUstep/Local
|
||||
],
|
||||
GNUSTEP_LOCAL_ROOT="$withval",
|
||||
GNUSTEP_LOCAL_ROOT="$GNUSTEP_ROOT/Local"
|
||||
)
|
||||
AC_MSG_RESULT($GNUSTEP_LOCAL_ROOT)
|
||||
|
||||
AC_MSG_CHECKING(for GNUSTEP_NETWORK_ROOT to use)
|
||||
AC_ARG_WITH(network-root,
|
||||
[--with-network-root
|
||||
Set the GNUSTEP_NETWORK_ROOT directory. Use this option if you want
|
||||
to have the GNUSTEP_NETWORK_ROOT directory in a non-standard place. Example:
|
||||
--with-network-root=/usr/local/GNUstep/Network
|
||||
],
|
||||
GNUSTEP_NETWORK_ROOT="$withval",
|
||||
GNUSTEP_NETWORK_ROOT="$GNUSTEP_ROOT/Network"
|
||||
)
|
||||
AC_MSG_RESULT($GNUSTEP_NETWORK_ROOT)
|
||||
|
||||
AC_MSG_CHECKING(for GNUSTEP_USER_ROOT to use)
|
||||
AC_ARG_WITH(user-root,
|
||||
[--with-user-root
|
||||
Set the GNUSTEP_USER_ROOT directory. Use this option if you want
|
||||
to have the GNUSTEP_USER_ROOT directory in a non-standard place. Example:
|
||||
--with-user-root=~/local/GNUstep
|
||||
],
|
||||
GNUSTEP_USER_ROOT="$withval",
|
||||
if test ! -z "$WINDIR"; then
|
||||
# Any \ is turned into a / inside GNUstep.sh. We can't do it here
|
||||
# because HOMEDRIVE and HOMEPATH are only expanded inside GNUstep.sh
|
||||
GNUSTEP_USER_ROOT='$HOMEDRIVE/$HOMEPATH/GNUstep'
|
||||
else
|
||||
GNUSTEP_USER_ROOT='~/GNUstep'
|
||||
fi
|
||||
)
|
||||
AC_MSG_RESULT($GNUSTEP_USER_ROOT)
|
||||
|
||||
AC_SUBST(GNUSTEP_LOCAL_ROOT)
|
||||
AC_SUBST(GNUSTEP_NETWORK_ROOT)
|
||||
AC_SUBST(GNUSTEP_USER_ROOT)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Is the system flattened?
|
||||
#--------------------------------------------------------------------
|
||||
AC_ARG_ENABLE(flattened,
|
||||
[--enable-flattened Use flattened directory structure],
|
||||
ac_cv_flattened=$enableval,
|
||||
ac_cv_flattened="undefined")
|
||||
|
||||
if test "$ac_cv_flattened" = "yes"; then
|
||||
GNUSTEP_FLATTENED=yes;
|
||||
else
|
||||
if test "$ac_cv_flattened" = "no"; then
|
||||
GNUSTEP_FLATTENED=;
|
||||
else
|
||||
GNUSTEP_FLATTENED=$GNUSTEP_FLATTENED;
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(GNUSTEP_FLATTENED)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Build backend bundles (on by default)
|
||||
#--------------------------------------------------------------------
|
||||
AC_ARG_ENABLE(backend-bundle, [
|
||||
--disable-backend-bundle Compile gui backend as a library],
|
||||
ac_cv_backend=$enableval,
|
||||
ac_cv_backend="yes")
|
||||
|
||||
if test "$ac_cv_backend" = "yes"; then
|
||||
BACKEND_BUNDLE=yes;
|
||||
else
|
||||
BACKEND_BUNDLE=;
|
||||
fi
|
||||
AC_SUBST(BACKEND_BUNDLE)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Miscellaneous flags and setup
|
||||
#--------------------------------------------------------------------
|
||||
|
@ -304,7 +321,7 @@ AC_SUBST(GCC_SO_DIR)
|
|||
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Miscellaneous headers (for make programs only)
|
||||
# Miscellaneous headers (only used for compiling which_lib.c)
|
||||
#--------------------------------------------------------------------
|
||||
AC_HEADER_DIRENT
|
||||
AC_HAVE_HEADERS(sys/param.h sys/file.h dir.h string.h stdlib.h sys/types.h dnl
|
||||
|
@ -423,13 +440,10 @@ AC_SUBST(AUTO_DEPENDENCIES)
|
|||
AC_MSG_CHECKING(for the version of gnustep-make we are compiling)
|
||||
. "$srcdir/Version"
|
||||
AC_MSG_RESULT($GNUSTEP_MAKE_VERSION)
|
||||
DATE=`date +"%Y%m%d"`
|
||||
AC_SUBST(GNUSTEP_MAKE_VERSION)
|
||||
AC_SUBST(GNUSTEP_MAKE_MAJOR_VERSION)
|
||||
AC_SUBST(GNUSTEP_MAKE_MINOR_VERSION)
|
||||
AC_SUBST(GNUSTEP_MAKE_SUBMINOR_VERSION)
|
||||
AC_SUBST(DATE)
|
||||
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Produce the output files
|
||||
|
|
Loading…
Reference in a new issue