Ticket #38582: patch-configure.ac.diff

File patch-configure.ac.diff, 9.4 KB (added by cooljeanius (Eric Gallager), 12 years ago)

patch to apply to the configure.ac file in base (after that, regenerate the build system with aclocal -I m4, autoheader, and autoconf)

  • configure.ac

    old new  
    11dnl Process this file with autoconf to produce a configure script.
    22dnl $Id: configure.ac 91520 2012-04-04 00:40:40Z jmr@macports.org $
    3 AC_PREREQ(2.63)
     3AC_PREREQ([2.63])
    44AC_DEFUN([MACPORTS_VERSION_MACRO], [esyscmd(<config/macports_version tr -d '\n')])
    55AC_INIT([MacPorts],MACPORTS_VERSION_MACRO,[macports-dev@lists.macosforge.org],[macports])
    66AC_CONFIG_SRCDIR([src/pextlib1.0/Pextlib.c])
     7AC_CONFIG_MACRO_DIR([m4])
    78AC_CONFIG_HEADERS([src/config.h])
    89
    910AC_CANONICAL_TARGET
    1011
    1112# Read in the MacPorts version from the base/config/macports_version file
    12 AC_MSG_CHECKING(MacPorts version)
     13AC_MSG_CHECKING([MacPorts version])
    1314MACPORTS_VERSION=MACPORTS_VERSION_MACRO
    1415AC_MSG_RESULT([$MACPORTS_VERSION])
    1516AC_SUBST(MACPORTS_VERSION)
     
    1718# Check user PATH for MP paths, and remove as necessary.
    1819MP_PATH_SCAN
    1920
    20 AC_PATH_PROG(SW_VERS, sw_vers)
    21 AC_PATH_PROG(DEFAULTS, defaults)
    22 AC_PATH_PROG(XCODE_SELECT, xcode-select)
     21AC_PATH_PROG([SW_VERS], [sw_vers])
     22AC_PATH_PROG([DEFAULTS], [defaults])
     23AC_PATH_PROG([XCODE_SELECT], [xcode-select])
    2324
    2425if test "x$SW_VERS" != "x"; then
    25   AC_MSG_CHECKING(Mac OS X version)
     26  AC_MSG_CHECKING([Mac OS X version])
    2627  MACOSX_VERSION=`$SW_VERS -productVersion`
    2728  AC_MSG_RESULT([$MACOSX_VERSION])
    2829fi
     
    4546
    4647# locate currently selected Xcode path
    4748if test "x$XCODE_SELECT" != "x"; then
    48   AC_MSG_CHECKING(Xcode location)
     49  AC_MSG_CHECKING([Xcode location])
    4950  DEVELOPER_DIR=`$XCODE_SELECT -print-path`
    5051fi
    5152if test -z "$DEVELOPER_DIR" -o ! -d "$DEVELOPER_DIR" ; then
     
    6869esac
    6970XCODEPLIST=${XCODEPLIST_BASE}.plist
    7071if test -r "$XCODEPLIST"; then
    71   AC_MSG_CHECKING(Xcode version)
     72  AC_MSG_CHECKING([Xcode version])
    7273  if test "x$DEFAULTS" != "x"; then
    7374    XCODE_VERSION=`$DEFAULTS read $XCODEPLIST_BASE CFBundleShortVersionString`
    7475  else
     
    9495esac
    9596
    9697# Checks for programs.
     98AC_PROG_AWK
    9799AC_PROG_CC
    98100AC_PROG_INSTALL
    99101AC_PROG_LN_S
    100102AC_PROG_MAKE_SET
    101103AC_PROG_OBJC
     104AC_PROG_RANLIB
    102105
    103 AC_PATH_PROGS(BSDMAKE, [bsdmake pmake], [])
    104 AC_PATH_PROG(BZIP2, [bzip2], [])
    105 AC_PATH_PROG(BZR, [bzr], [])
    106 AC_PATH_PROG(CHOWN, [chown], [], [$PATH:/usr/sbin])
    107 AC_PATH_PROG(CP, [cp], [])
    108 AC_PATH_PROG(CPIO, [cpio], [])
    109 AC_PATH_PROG(CVS, [cvs], [])
    110 AC_PATH_PROG(DIFF, [diff], [])
    111 AC_PATH_PROG(DSCL, [dscl], [])
    112 AC_PATH_PROG(DSEDITGROUP, [dseditgroup], [])
    113 AC_PATH_PROG(FILE, [file], [])
    114 AC_PATH_PROG(GIT, [git], [])
    115 AC_PATH_PROGS(GNUMAKE, [gnumake gmake], [], [$PATH:/usr/local/bin])
    116 AC_PATH_PROGS(GNUPATCH, [gnupatch gpatch], [], [$PATH:/usr/local/bin])
    117 AC_PATH_PROGS(GNUTAR, [gnutar gtar], [], [$PATH:/usr/local/bin])
    118 AC_PATH_PROG(GZIP, [gzip], [])
    119 AC_PATH_PROG(HDIUTIL, [hdiutil], [])
    120 AC_PATH_PROG(HG, [hg], [])
    121 AC_PATH_PROG(LAUNCHCTL, [launchctl], [])
    122 AC_PATH_PROG(LIPO, [lipo], [])
    123 AC_PATH_PROG(LSBOM, [lsbom], [])
    124 AC_PATH_PROG(LZMA, [lzma], [])
    125 AC_PATH_PROG(MAKE, [make])
    126 AC_PATH_PROG(MDFIND, [mdfind], [])
    127 AC_PATH_PROG(MDLS, [mdls], [])
    128 AC_PATH_PROG(MKBOM, [mkbom], [])
    129 AC_PATH_PROG(MTREE, [mtree], [], [$PATH:/usr/sbin])
    130 AC_PATH_PROG(OPEN, [open], [])
    131 AC_PATH_PROG(OPENSSL, [openssl], [])
    132 AC_PATH_PROG(PATCH, [patch], [])
    133 AC_PATH_PROG(PAX, [pax], [])
    134 AC_PATH_PROG(RMDIR, [rmdir], [])
    135 AC_PATH_PROG(RSYNC, [rsync], [])
    136 AC_PATH_PROG(SED, [sed])
    137 AC_PATH_PROG(SVN, [svn], [])
    138 AC_PATH_PROG(SWIG, [swig], [], [$PATH:/usr/local/bin])
    139 AC_PATH_PROG(TAR, [tar])
    140 AC_PATH_PROG(UNZIP, [unzip])
    141 AC_PATH_PROG(XAR, [xar], [])
    142 AC_PATH_PROG(XCODEBUILD, [xcodebuild], [])
    143 AC_PATH_PROG(XCRUN, [xcrun], [])
    144 AC_PATH_PROG(XZ, [xz], [])
    145 AC_PATH_PROG(ZIP, [zip])
     106AC_PATH_PROGS([BSDMAKE], [bsdmake pmake], [])
     107AC_PATH_PROG([BZIP2], [bzip2], [])
     108AC_PATH_PROG([BZR], [bzr], [])
     109AC_PATH_PROG([CHOWN], [chown], [], [$PATH:/usr/sbin])
     110AC_PATH_PROG([CP], [cp], [])
     111AC_PATH_PROG([CPIO], [cpio], [])
     112AC_PATH_PROG([CVS], [cvs], [])
     113AC_PATH_PROG([DIFF], [diff], [])
     114AC_PATH_PROG([DSCL], [dscl], [])
     115AC_PATH_PROG([DSEDITGROUP], [dseditgroup], [])
     116AC_PATH_PROG([FILE], [file], [])
     117AC_PATH_PROG([GIT], [git], [])
     118AC_PATH_PROGS([GNUMAKE], [gnumake gmake], [], [$PATH:/usr/local/bin])
     119AC_PATH_PROGS([GNUPATCH], [gnupatch gpatch], [], [$PATH:/usr/local/bin])
     120AC_PATH_PROGS([GNUTAR], [gnutar gtar], [], [$PATH:/usr/local/bin])
     121AC_PATH_PROG([GZIP], [gzip], [])
     122AC_PATH_PROG([HDIUTIL], [hdiutil], [])
     123AC_PATH_PROG([HG], [hg], [])
     124AC_PATH_PROG([LAUNCHCTL], [launchctl], [])
     125AC_PATH_PROG([LIPO], [lipo], [])
     126AC_PATH_PROG([LSBOM], [lsbom], [])
     127AC_PATH_PROG([LZMA], [lzma], [])
     128AC_PATH_PROG([MAKE], [make])
     129AC_PATH_PROG([MDFIND], [mdfind], [])
     130AC_PATH_PROG([MDLS], [mdls], [])
     131AC_PATH_PROG([MKBOM], [mkbom], [])
     132AC_PATH_PROG([MTREE], [mtree], [], [$PATH:/usr/sbin])
     133AC_PATH_PROG([OPEN], [open], [])
     134AC_PATH_PROG([OPENSSL], [openssl], [])
     135AC_PATH_PROG([PATCH], [patch], [])
     136AC_PATH_PROG([PAX], [pax], [])
     137AC_PATH_PROG([RMDIR], [rmdir], [])
     138AC_PATH_PROG([RSYNC], [rsync], [])
     139AC_PATH_PROG([SED], [sed])
     140AC_PATH_PROG([SVN], [svn], [])
     141AC_PATH_PROG([SWIG], [swig], [], [$PATH:/usr/local/bin])
     142AC_PATH_PROG([TAR], [tar])
     143AC_PATH_PROG([UNZIP], [unzip])
     144AC_PATH_PROG([XAR], [xar], [])
     145AC_PATH_PROG([XCODEBUILD], [xcodebuild], [])
     146AC_PATH_PROG([XCRUN], [xcrun], [])
     147AC_PATH_PROG([XZ], [xz], [])
     148AC_PATH_PROG([ZIP], [zip])
    146149
    147 AC_CHECK_PROG(HAVE_LAUNCHD, [launchd], [yes], [])
     150AC_CHECK_PROG([HAVE_LAUNCHD], [launchd], [yes], [])
    148151
    149152# Define some precious variables allowing user to override PATH for some programs
    150 AC_ARG_VAR(BSDMAKE, [path to bsdmake/pmake command])
    151 AC_ARG_VAR(BZIP2, [path to bzip2 command])
    152 AC_ARG_VAR(CVS, [path to cvs command])
    153 AC_ARG_VAR(GNUMAKE, [path to gnumake command])
    154 AC_ARG_VAR(GNUTAR, [path to gnutar command])
    155 AC_ARG_VAR(LZMA, [path to lzma command])
    156 AC_ARG_VAR(MAKE, [path to make command])
    157 AC_ARG_VAR(MTREE, [path to mtree command])
    158 AC_ARG_VAR(OPEN, [path to open command])
    159 AC_ARG_VAR(OPENSSL, [path to openssl command])
    160 AC_ARG_VAR(RSYNC, [path to rsync command])
    161 AC_ARG_VAR(SED, [path to sed command])
    162 AC_ARG_VAR(SVN, [path to svn command])
    163 AC_ARG_VAR(SWIG, [path to swig command])
    164 AC_ARG_VAR(TAR, [path to tar command])
    165 AC_ARG_VAR(XAR, [path to xar command])
    166 AC_ARG_VAR(XZ, [path to xz command])
     153AC_ARG_VAR([BSDMAKE], [path to bsdmake/pmake command])
     154AC_ARG_VAR([BZIP2], [path to bzip2 command])
     155AC_ARG_VAR([CVS], [path to cvs command])
     156AC_ARG_VAR([GNUMAKE], [path to gnumake command])
     157AC_ARG_VAR([GNUTAR], [path to gnutar command])
     158AC_ARG_VAR([LZMA], [path to lzma command])
     159AC_ARG_VAR([MAKE], [path to make command])
     160AC_ARG_VAR([MTREE], [path to mtree command])
     161AC_ARG_VAR([OPEN], [path to open command])
     162AC_ARG_VAR([OPENSSL], [path to openssl command])
     163AC_ARG_VAR([RSYNC], [path to rsync command])
     164AC_ARG_VAR([SED], [path to sed command])
     165AC_ARG_VAR([SVN], [path to svn command])
     166AC_ARG_VAR([SWIG], [path to swig command])
     167AC_ARG_VAR([TAR], [path to tar command])
     168AC_ARG_VAR([XAR], [path to xar command])
     169AC_ARG_VAR([XZ], [path to xz command])
    167170
    168171if test "x$MTREE" = "x"; then
    169172    AC_MSG_ERROR([mtree not found])
     
    235238AC_HEADER_STDC
    236239AC_HEADER_DIRENT
    237240AC_HEADER_SYS_WAIT
    238 AC_CHECK_HEADERS([limits.h paths.h sys/file.h crt_externs.h fcntl.h sys/fcntl.h sys/cdefs.h err.h sys/socket.h \
    239         sys/sysctl.h readline/readline.h readline/history.h pwd.h sys/paths.h utime.h])
     241AC_CHECK_HEADERS([crt_externs.h err.h fcntl.h limits.h mach/mach.h paths.h pwd.h readline/history.h readline/readline.h \
     242        sys/cdefs.h sys/file.h sys/fcntl.h sys/ioctl.h sys/mount.h sys/param.h sys/paths.h sys/socket.h sys/sysctl.h sys/time.h \
     243        utime.h])
    240244
    241245INCLUDES="-I.. -I. $INCLUDES"
    242246
     247# Checks for typedefs, structures, and compiler characteristics.
     248AC_CHECK_HEADER_STDBOOL
     249AC_TYPE_UID_T
     250AC_C_INLINE
     251AC_TYPE_MODE_T
     252AC_TYPE_OFF_T
     253AC_TYPE_PID_T
     254AC_TYPE_SIZE_T
     255AC_TYPE_SSIZE_T
     256AC_TYPE_UINT32_T
     257AC_TYPE_UINT8_T
     258
    243259# Checks for library functions.
    244 AC_CHECK_FUNCS([bzero memset fgetln lockf flock setmode strcasecmp strncasecmp strlcpy copyfile clearenv sysctlbyname])
     260AC_FUNC_CHOWN
     261AC_FUNC_FORK
     262AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
     263AC_FUNC_MALLOC
     264AC_FUNC_MMAP
     265AC_FUNC_REALLOC
     266AC_CHECK_FUNCS([bzero clearenv copyfile dup2 fgetln flock getcwd lchown localtime_r lockf memmove memset mkdir munmap realpath regcomp \
     267        rmdir select setenv setmode socket strcasecmp strchr strdup strerror strlcpy strncasecmp strrchr strstr strtol strtoul \
     268        sysctlbyname utime])
    245269MP_CHECK_READLINK_IS_P1003_1A
    246270
    247271# Check for md5 implementation
    248272AC_CHECK_HEADER([CommonCrypto/CommonDigest.h], [AC_DEFINE([HAVE_COMMONCRYPTO_COMMONDIGEST_H], [1], [Define if CommonCrypto is available.])], [MP_LIB_MD5])
    249273
    250274# Check for readline
    251 AC_ARG_ENABLE(readline, AS_HELP_STRING([--enable-readline],[Enable addition of readline support, if readline present.]),
     275AC_ARG_ENABLE([readline], [AS_HELP_STRING([--enable-readline],[Enable addition of readline support, if readline present.])],
    252276[
    253277        AC_CHECK_LIB([readline], [readline], [
    254278                                  READLINE_LIBS=-lreadline
     
    302326
    303327## Thread package.
    304328AC_ARG_WITH(
    305                 included-tclthread,
     329                [included-tclthread],
    306330                AS_HELP_STRING([--with-included-tclthread],
    307331                        [install included Thread package.]),
    308332                [with_included_tclthread=$withval],
     
    328352
    329353AH_TEMPLATE([TRACE_SDK], [SDK for SDK redirect in tracelib])
    330354AC_ARG_WITH(
    331         trace-sdk,
     355        [trace-sdk],
    332356        AS_HELP_STRING([--with-trace-sdk=SDK],
    333357                [SDK for redirection in trace lib (for example MacOSX10.4u.sdk)]),
    334358        [test -d ${DEVELOPER_DIR}/SDKs/$withval && AC_DEFINE_UNQUOTED([TRACE_SDK], "${withval}")], [])