Ticket #38582: patch-configure.ac.diff
File patch-configure.ac.diff, 9.4 KB (added by cooljeanius (Eric Gallager), 12 years ago) |
---|
-
configure.ac
old new 1 1 dnl Process this file with autoconf to produce a configure script. 2 2 dnl $Id: configure.ac 91520 2012-04-04 00:40:40Z jmr@macports.org $ 3 AC_PREREQ( 2.63)3 AC_PREREQ([2.63]) 4 4 AC_DEFUN([MACPORTS_VERSION_MACRO], [esyscmd(<config/macports_version tr -d '\n')]) 5 5 AC_INIT([MacPorts],MACPORTS_VERSION_MACRO,[macports-dev@lists.macosforge.org],[macports]) 6 6 AC_CONFIG_SRCDIR([src/pextlib1.0/Pextlib.c]) 7 AC_CONFIG_MACRO_DIR([m4]) 7 8 AC_CONFIG_HEADERS([src/config.h]) 8 9 9 10 AC_CANONICAL_TARGET 10 11 11 12 # Read in the MacPorts version from the base/config/macports_version file 12 AC_MSG_CHECKING( MacPorts version)13 AC_MSG_CHECKING([MacPorts version]) 13 14 MACPORTS_VERSION=MACPORTS_VERSION_MACRO 14 15 AC_MSG_RESULT([$MACPORTS_VERSION]) 15 16 AC_SUBST(MACPORTS_VERSION) … … 17 18 # Check user PATH for MP paths, and remove as necessary. 18 19 MP_PATH_SCAN 19 20 20 AC_PATH_PROG( SW_VERS, sw_vers)21 AC_PATH_PROG( DEFAULTS, defaults)22 AC_PATH_PROG( XCODE_SELECT, xcode-select)21 AC_PATH_PROG([SW_VERS], [sw_vers]) 22 AC_PATH_PROG([DEFAULTS], [defaults]) 23 AC_PATH_PROG([XCODE_SELECT], [xcode-select]) 23 24 24 25 if test "x$SW_VERS" != "x"; then 25 AC_MSG_CHECKING( Mac OS X version)26 AC_MSG_CHECKING([Mac OS X version]) 26 27 MACOSX_VERSION=`$SW_VERS -productVersion` 27 28 AC_MSG_RESULT([$MACOSX_VERSION]) 28 29 fi … … 45 46 46 47 # locate currently selected Xcode path 47 48 if test "x$XCODE_SELECT" != "x"; then 48 AC_MSG_CHECKING( Xcode location)49 AC_MSG_CHECKING([Xcode location]) 49 50 DEVELOPER_DIR=`$XCODE_SELECT -print-path` 50 51 fi 51 52 if test -z "$DEVELOPER_DIR" -o ! -d "$DEVELOPER_DIR" ; then … … 68 69 esac 69 70 XCODEPLIST=${XCODEPLIST_BASE}.plist 70 71 if test -r "$XCODEPLIST"; then 71 AC_MSG_CHECKING( Xcode version)72 AC_MSG_CHECKING([Xcode version]) 72 73 if test "x$DEFAULTS" != "x"; then 73 74 XCODE_VERSION=`$DEFAULTS read $XCODEPLIST_BASE CFBundleShortVersionString` 74 75 else … … 94 95 esac 95 96 96 97 # Checks for programs. 98 AC_PROG_AWK 97 99 AC_PROG_CC 98 100 AC_PROG_INSTALL 99 101 AC_PROG_LN_S 100 102 AC_PROG_MAKE_SET 101 103 AC_PROG_OBJC 104 AC_PROG_RANLIB 102 105 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])106 AC_PATH_PROGS([BSDMAKE], [bsdmake pmake], []) 107 AC_PATH_PROG([BZIP2], [bzip2], []) 108 AC_PATH_PROG([BZR], [bzr], []) 109 AC_PATH_PROG([CHOWN], [chown], [], [$PATH:/usr/sbin]) 110 AC_PATH_PROG([CP], [cp], []) 111 AC_PATH_PROG([CPIO], [cpio], []) 112 AC_PATH_PROG([CVS], [cvs], []) 113 AC_PATH_PROG([DIFF], [diff], []) 114 AC_PATH_PROG([DSCL], [dscl], []) 115 AC_PATH_PROG([DSEDITGROUP], [dseditgroup], []) 116 AC_PATH_PROG([FILE], [file], []) 117 AC_PATH_PROG([GIT], [git], []) 118 AC_PATH_PROGS([GNUMAKE], [gnumake gmake], [], [$PATH:/usr/local/bin]) 119 AC_PATH_PROGS([GNUPATCH], [gnupatch gpatch], [], [$PATH:/usr/local/bin]) 120 AC_PATH_PROGS([GNUTAR], [gnutar gtar], [], [$PATH:/usr/local/bin]) 121 AC_PATH_PROG([GZIP], [gzip], []) 122 AC_PATH_PROG([HDIUTIL], [hdiutil], []) 123 AC_PATH_PROG([HG], [hg], []) 124 AC_PATH_PROG([LAUNCHCTL], [launchctl], []) 125 AC_PATH_PROG([LIPO], [lipo], []) 126 AC_PATH_PROG([LSBOM], [lsbom], []) 127 AC_PATH_PROG([LZMA], [lzma], []) 128 AC_PATH_PROG([MAKE], [make]) 129 AC_PATH_PROG([MDFIND], [mdfind], []) 130 AC_PATH_PROG([MDLS], [mdls], []) 131 AC_PATH_PROG([MKBOM], [mkbom], []) 132 AC_PATH_PROG([MTREE], [mtree], [], [$PATH:/usr/sbin]) 133 AC_PATH_PROG([OPEN], [open], []) 134 AC_PATH_PROG([OPENSSL], [openssl], []) 135 AC_PATH_PROG([PATCH], [patch], []) 136 AC_PATH_PROG([PAX], [pax], []) 137 AC_PATH_PROG([RMDIR], [rmdir], []) 138 AC_PATH_PROG([RSYNC], [rsync], []) 139 AC_PATH_PROG([SED], [sed]) 140 AC_PATH_PROG([SVN], [svn], []) 141 AC_PATH_PROG([SWIG], [swig], [], [$PATH:/usr/local/bin]) 142 AC_PATH_PROG([TAR], [tar]) 143 AC_PATH_PROG([UNZIP], [unzip]) 144 AC_PATH_PROG([XAR], [xar], []) 145 AC_PATH_PROG([XCODEBUILD], [xcodebuild], []) 146 AC_PATH_PROG([XCRUN], [xcrun], []) 147 AC_PATH_PROG([XZ], [xz], []) 148 AC_PATH_PROG([ZIP], [zip]) 146 149 147 AC_CHECK_PROG( HAVE_LAUNCHD, [launchd], [yes], [])150 AC_CHECK_PROG([HAVE_LAUNCHD], [launchd], [yes], []) 148 151 149 152 # 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])153 AC_ARG_VAR([BSDMAKE], [path to bsdmake/pmake command]) 154 AC_ARG_VAR([BZIP2], [path to bzip2 command]) 155 AC_ARG_VAR([CVS], [path to cvs command]) 156 AC_ARG_VAR([GNUMAKE], [path to gnumake command]) 157 AC_ARG_VAR([GNUTAR], [path to gnutar command]) 158 AC_ARG_VAR([LZMA], [path to lzma command]) 159 AC_ARG_VAR([MAKE], [path to make command]) 160 AC_ARG_VAR([MTREE], [path to mtree command]) 161 AC_ARG_VAR([OPEN], [path to open command]) 162 AC_ARG_VAR([OPENSSL], [path to openssl command]) 163 AC_ARG_VAR([RSYNC], [path to rsync command]) 164 AC_ARG_VAR([SED], [path to sed command]) 165 AC_ARG_VAR([SVN], [path to svn command]) 166 AC_ARG_VAR([SWIG], [path to swig command]) 167 AC_ARG_VAR([TAR], [path to tar command]) 168 AC_ARG_VAR([XAR], [path to xar command]) 169 AC_ARG_VAR([XZ], [path to xz command]) 167 170 168 171 if test "x$MTREE" = "x"; then 169 172 AC_MSG_ERROR([mtree not found]) … … 235 238 AC_HEADER_STDC 236 239 AC_HEADER_DIRENT 237 240 AC_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]) 241 AC_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]) 240 244 241 245 INCLUDES="-I.. -I. $INCLUDES" 242 246 247 # Checks for typedefs, structures, and compiler characteristics. 248 AC_CHECK_HEADER_STDBOOL 249 AC_TYPE_UID_T 250 AC_C_INLINE 251 AC_TYPE_MODE_T 252 AC_TYPE_OFF_T 253 AC_TYPE_PID_T 254 AC_TYPE_SIZE_T 255 AC_TYPE_SSIZE_T 256 AC_TYPE_UINT32_T 257 AC_TYPE_UINT8_T 258 243 259 # Checks for library functions. 244 AC_CHECK_FUNCS([bzero memset fgetln lockf flock setmode strcasecmp strncasecmp strlcpy copyfile clearenv sysctlbyname]) 260 AC_FUNC_CHOWN 261 AC_FUNC_FORK 262 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK 263 AC_FUNC_MALLOC 264 AC_FUNC_MMAP 265 AC_FUNC_REALLOC 266 AC_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]) 245 269 MP_CHECK_READLINK_IS_P1003_1A 246 270 247 271 # Check for md5 implementation 248 272 AC_CHECK_HEADER([CommonCrypto/CommonDigest.h], [AC_DEFINE([HAVE_COMMONCRYPTO_COMMONDIGEST_H], [1], [Define if CommonCrypto is available.])], [MP_LIB_MD5]) 249 273 250 274 # Check for readline 251 AC_ARG_ENABLE( readline, AS_HELP_STRING([--enable-readline],[Enable addition of readline support, if readline present.]),275 AC_ARG_ENABLE([readline], [AS_HELP_STRING([--enable-readline],[Enable addition of readline support, if readline present.])], 252 276 [ 253 277 AC_CHECK_LIB([readline], [readline], [ 254 278 READLINE_LIBS=-lreadline … … 302 326 303 327 ## Thread package. 304 328 AC_ARG_WITH( 305 included-tclthread,329 [included-tclthread], 306 330 AS_HELP_STRING([--with-included-tclthread], 307 331 [install included Thread package.]), 308 332 [with_included_tclthread=$withval], … … 328 352 329 353 AH_TEMPLATE([TRACE_SDK], [SDK for SDK redirect in tracelib]) 330 354 AC_ARG_WITH( 331 trace-sdk,355 [trace-sdk], 332 356 AS_HELP_STRING([--with-trace-sdk=SDK], 333 357 [SDK for redirection in trace lib (for example MacOSX10.4u.sdk)]), 334 358 [test -d ${DEVELOPER_DIR}/SDKs/$withval && AC_DEFINE_UNQUOTED([TRACE_SDK], "${withval}")], [])