Ignore:
Timestamp:
Jul 4, 2007, 8:37:52 PM (13 years ago)
Author:
landonf@…
Message:

Avoid modifying CPPFLAGS/LDFLAGS directly when checking for Foundation.
Submitted by: afb@…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/foundation.m4

    r26177 r26709  
    276276#       Defines one of the following preprocessor macros:
    277277#               APPLE_FOUNDATION GNUSTEP_FOUNDATION
     278#
     279#       Substitutes the following variables:
     280#               OBJC_FOUNDATION OBJC_FOUNDATION_LDFLAGS
     281#               OBJC_FOUNDATION_CPPFLAGS OBJC_FOUNDATION_LIBS
    278282#------------------------------------------------------------------------
    279283AC_DEFUN([MP_OBJC_FOUNDATION],[
     
    390394        if test x"${ac_cv_objc_foundation_apple}" == x"yes"; then
    391395                OBJC_FOUNDATION="Apple"
    392                 CPPFLAGS="${APPLE_FOUNDATION_CPPFLAGS} ${CPPFLAGS}"
    393                 LIBS="${APPLE_FOUNDATION_LIBS} ${LIBS}"
     396                OBJC_FOUNDATION_CPPFLAGS="${APPLE_FOUNDATION_CFLAGS}"
     397                OBJC_FOUNDATION_LIBS="${APPLE_FOUNDATION_LIBS}"
     398                OBJC_FOUNDATION_LDFLAGS=""
    394399                AC_DEFINE([APPLE_FOUNDATION], 1, [Define if using the Apple Foundation framework])
    395400                AC_MSG_NOTICE([Using Apple Foundation library])
    396401        elif test x"${ac_cv_objc_foundation_gnustep}" == x"yes"; then
    397402                OBJC_FOUNDATION="GNUstep"
    398                 CPPFLAGS="${GNUSTEP_CPPFLAGS} ${CPPFLAGS}"
    399                 LIBS="${GNUSTEP_LIBS} ${LIBS}"
    400                 LDFLAGS="${GNUSTEP_LDFLAGS} ${LDFLAGS}"
     403                OBJC_FOUNDATION_CPPFLAGS="${GNUSTEP_CPPFLAGS}"
     404                OBJC_FOUNDATION_LIBS="${GNUSTEP_LIBS}"
     405                OBJC_FOUNDATION_LDFLAGS="${GNUSTEP_LDFLAGS}"
    401406                AC_DEFINE([GNUSTEP_FOUNDATION], 1, [Define if using the GNUstep Foundation library])
    402407                AC_MSG_NOTICE([Using GNUstep Foundation library])
     
    405410        fi
    406411
     412        AC_SUBST([OBJC_FOUNDATION])
     413        AC_SUBST([OBJC_FOUNDATION_LDFLAGS])
     414        AC_SUBST([OBJC_FOUNDATION_CPPFLAGS])
     415        AC_SUBST([OBJC_FOUNDATION_LIBS])
     416
    407417        AC_LANG_POP([Objective C])
    408418])
Note: See TracChangeset for help on using the changeset viewer.