use gnustep-config, where available

git-svn-id: https://svn.macports.org/repository/macports/trunk/base@33734 d073be05-634f-4543-b044-5fe20cf6d1d6
This commit is contained in:
Anders F. Björklund
2008-02-04 11:46:28 +00:00
parent 5d8e20995d
commit a1339f846f
+8 -1
View File
@@ -341,7 +341,8 @@ AC_DEFUN([MP_OBJC_FOUNDATION],[
fi
if test x"${with_objc_foundation}" == x || test x${with_objc_foundation} == x"GNUstep"; then
if test x"${GNUSTEP_SYSTEM_ROOT}" == x; then
GNUSTEP_CONFIG=/usr/bin/gnustep-config
if test ! -x "${GNUSTEP_CONFIG}" -a x"${GNUSTEP_SYSTEM_ROOT}" == x; then
if test x"${with_objc_foundation}" == x"GNUstep"; then
AC_MSG_ERROR([GNUSTEP_SYSTEM_ROOT is not defined in your environment, preventing the use of GNUstep's Foundation library])
else
@@ -352,9 +353,15 @@ AC_DEFUN([MP_OBJC_FOUNDATION],[
AC_MSG_CHECKING([for GNUstep Foundation library])
# Set GNUstep LDFLAGS, CPPFLAGS, and LIBS
if test -x ${GNUSTEP_CONFIG}; then
GNUSTEP_LDFLAGS="`${GNUSTEP_CONFIG} --objc-libs`"
GNUSTEP_CPPFLAGS="`${GNUSTEP_CONFIG} --objc-flags`"
GNUSTEP_LIBS="`${GNUSTEP_CONFIG} --base-libs`"
else
GNUSTEP_LDFLAGS="-L${GNUSTEP_SYSTEM_ROOT}/Library/Libraries/"
GNUSTEP_CPPFLAGS="-I${GNUSTEP_SYSTEM_ROOT}/Library/Headers/"
GNUSTEP_LIBS="-lgnustep-base"
fi
AC_CACHE_VAL(ac_cv_objc_foundation_gnustep, [
# Save old LDFLAGS, CPPFLAGS, and LIBS