summaryrefslogtreecommitdiff
path: root/src/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/configure.in')
-rw-r--r--src/configure.in24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/configure.in b/src/configure.in
index 177fa885c..b7ebe4493 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -116,6 +116,22 @@ if test "`(uname) 2>/dev/null`" = Darwin; then
MACARCH="$withval"; AC_MSG_RESULT($MACARCH),
MACARCH="current"; AC_MSG_RESULT(defaulting to $MACARCH))
+ AC_MSG_CHECKING(--with-developer-dir argument)
+ AC_ARG_WITH(developer-dir, [ --with-developer-dir=PATH use PATH as location for Xcode developer tools],
+ DEVELOPER_DIR="$withval"; AC_MSG_RESULT($DEVELOPER_DIR),
+ DEVELOPER_DIR=""; AC_MSG_RESULT(not present))
+
+ if test "x$DEVELOPER_DIR" = "x"; then
+ AC_PATH_PROG(XCODE_SELECT, xcode-select)
+ if test "x$XCODE_SELECT" != "x"; then
+ AC_MSG_CHECKING(for developer dir using xcode-select)
+ DEVELOPER_DIR=`$XCODE_SELECT -print-path`
+ AC_MSG_RESULT([$DEVELOPER_DIR])
+ else
+ DEVELOPER_DIR=/Developer
+ fi
+ fi
+
if test "x$MACARCH" = "xboth"; then
AC_MSG_CHECKING(for 10.4 universal SDK)
dnl There is a terrible inconsistency (but we appear to get away with it):
@@ -127,7 +143,7 @@ if test "`(uname) 2>/dev/null`" = Darwin; then
save_cppflags="$CPPFLAGS"
save_cflags="$CFLAGS"
save_ldflags="$LDFLAGS"
- CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
+ CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
AC_TRY_LINK([ ], [ ],
AC_MSG_RESULT(found, will make universal binary),
@@ -157,9 +173,9 @@ if test "`(uname) 2>/dev/null`" = Darwin; then
dnl TODO: use -arch i386 on Intel machines
CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
if test "x$MACARCH" = "xboth"; then
- CPPFLAGS="$CPPFLAGS -I/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
+ CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
else
- CPPFLAGS="$CPPFLAGS -I/Developer/Headers/FlatCarbon"
+ CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/Headers/FlatCarbon"
fi
dnl If Carbon is found, assume we don't want X11
@@ -3233,7 +3249,7 @@ if test "x$MACOSX" = "xyes" && test "x$CARBON" = "xyes" \
fi
fi
if test "x$MACARCH" = "xboth"; then
- LDFLAGS="$LDFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
+ LDFLAGS="$LDFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
fi
dnl gcc 3.1 changed the meaning of -MM. The only solution appears to be to