Commit d7c8326a authored by philburk's avatar philburk

Apply patch to configure to fix build on Mac Lion.

See ticket #216.


git-svn-id: https://subversion.assembla.com/svn/portaudio/portaudio/trunk@1864 0f58301d-fd10-0410-b4af-bbb618454e57
parent 027bf8f9
......@@ -15769,23 +15769,61 @@ case "${host_os}" in
LIBS="-framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon"
if test "x$enable_mac_universal" = "xyes" ; then
if [ -d /Developer/SDKs/MacOSX10.5.sdk ] ; then
mac_version_min="-mmacosx-version-min=10.3"
mac_arches="-arch i386 -arch ppc -arch x86_64 -arch ppc64"
mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
elif [ -d /Developer/SDKs/MacOSX10.6.sdk ] ; then
mac_version_min="-mmacosx-version-min=10.4"
mac_arches="-arch i386 -arch x86_64"
mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.6.sdk"
elif [ -d /Developer/SDKs/MacOSX10.7.sdk ] ; then
mac_version_min="-mmacosx-version-min=10.4"
mac_arches="-arch i386 -arch x86_64"
mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.7.sdk"
else
mac_version_min="-mmacosx-version-min=10.3"
mac_arches="-arch i386 -arch ppc"
mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
fi
case "xcodebuild -version | sed -n 's/Xcode \(.*\)/\1/p'" in
12*|3.0|3.1)
if [ -d /Developer/SDKs/MacOSX10.5.sdk ] ; then
mac_version_min="-mmacosx-version-min=10.3"
mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
else
mac_version_min="-mmacosx-version-min=10.3"
mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
fi
;;
*)
if xcodebuild -version -sdk macosx10.5 Path >/dev/null 2>&1 ; then
mac_version_min="-mmacosx-version-min=10.3"
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.5 Path`"
elif xcodebuild -version -sdk macosx10.6 Path >/dev/null 2>&1 ; then
mac_version_min="-mmacosx-version-min=10.4"
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.6 Path`"
elif xcodebuild -version -sdk macosx10.7 Path >/dev/null 2>&1 ; then
mac_version_min="-mmacosx-version-min=10.4"
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.7 Path`"
else
as_fn_error $? "Couldn't find 10.5, 10.6, or 10.7 SDK" "$LINENO" 5
fi
esac
mac_arches=""
for arch in i386 x86_64 ppc ppc64
do
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -arch $arch"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
return 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
if [ -z "$mac_arches" ] ; then
mac_arches="-arch $arch"
else
mac_arches="$mac_arches -arch $arch"
fi
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
done
else
mac_arches=""
mac_sysroot=""
......@@ -15820,13 +15858,15 @@ case "${host_os}" in
LIBS="${LIBS} -lwinmm -lm -lole32 -luuid"
DLL_LIBS="${DLL_LIBS} -lwinmm -lm -lole32 -luuid"
CFLAGS="$CFLAGS -ffast-math -fomit-frame-pointer -I\$(top_srcdir)/src/hostapi/asio -I$ASIODIR/host/pc -I$ASIODIR/common -I$ASIODIR/host -UPA_USE_ASIO -DPA_USE_ASIO=1 -DWINDOWS"
CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0501 -DWINVER=0x0501"
CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0501 -DWINVER=0x0501"
CXXFLAGS="$CFLAGS"
fi
if [ "x$with_wdmks" = "xyes" ]; then
DXDIR="$with_dxdir"
add_objects src/hostapi/wdmks/pa_win_wdmks.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_wdmks_utils.o src/common/pa_ringbuffer.o src/os/win/pa_win_waveformat.o
add_objects src/hostapi/wdmks/pa_win_wdmks.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_wdmks_util.o src/os/win/pa_win_waveformat.o
LIBS="${LIBS} -lwinmm -lm -luuid -lsetupapi -lole32"
DLL_LIBS="${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -luuid -lsetupapi -lole32"
#VC98="\"/c/Program Files/Microsoft Visual Studio/VC98/Include\""
......
......@@ -208,23 +208,63 @@ case "${host_os}" in
LIBS="-framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon"
if test "x$enable_mac_universal" = "xyes" ; then
if [[ -d /Developer/SDKs/MacOSX10.5.sdk ]] ; then
mac_version_min="-mmacosx-version-min=10.3"
mac_arches="-arch i386 -arch ppc -arch x86_64 -arch ppc64"
mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
elif [[ -d /Developer/SDKs/MacOSX10.6.sdk ]] ; then
mac_version_min="-mmacosx-version-min=10.4"
mac_arches="-arch i386 -arch x86_64"
mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.6.sdk"
elif [[ -d /Developer/SDKs/MacOSX10.7.sdk ]] ; then
mac_version_min="-mmacosx-version-min=10.4"
mac_arches="-arch i386 -arch x86_64"
mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.7.sdk"
else
mac_version_min="-mmacosx-version-min=10.3"
mac_arches="-arch i386 -arch ppc"
mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
fi
case "xcodebuild -version | sed -n 's/Xcode \(.*\)/\1/p'" in
[12]*|3.0|3.1)
dnl In pre-3.2 versions of Xcode, xcodebuild doesn't
dnl support -sdk, so we can't use that to look for
dnl SDKs. However, in those versions of Xcode, the
dnl SDKs are under /Developer/SDKs, so we can just look
dnl there. Also, we assume they had no SDKs later
dnl than 10.5, as 3.2 was the version that came with
dnl 10.6, at least if the Wikipedia page for Xcode
dnl is to be believed.
if [[ -d /Developer/SDKs/MacOSX10.5.sdk ]] ; then
mac_version_min="-mmacosx-version-min=10.3"
mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
else
mac_version_min="-mmacosx-version-min=10.3"
mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
fi
;;
*)
dnl In 3.2 and later, xcodebuild supports -sdk, and, in
dnl 4.3 and later, the SDKs aren't under /Developer/SDKs
dnl as there *is* no /Developer, so we use -sdk to check
dnl what SDKs are available and to get the full path of
dnl the SDKs.
if xcodebuild -version -sdk macosx10.5 Path >/dev/null 2>&1 ; then
mac_version_min="-mmacosx-version-min=10.3"
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.5 Path`"
elif xcodebuild -version -sdk macosx10.6 Path >/dev/null 2>&1 ; then
mac_version_min="-mmacosx-version-min=10.4"
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.6 Path`"
elif xcodebuild -version -sdk macosx10.7 Path >/dev/null 2>&1 ; then
mac_version_min="-mmacosx-version-min=10.4"
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.7 Path`"
else
AC_MSG_ERROR([Couldn't find 10.5, 10.6, or 10.7 SDK])
fi
esac
dnl Pick which architectures to build for based on what
dnl the compiler supports.
mac_arches=""
for arch in i386 x86_64 ppc ppc64
do
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -arch $arch"
AC_TRY_COMPILE([], [return 0;],
[
if [[ -z "$mac_arches" ]] ; then
mac_arches="-arch $arch"
else
mac_arches="$mac_arches -arch $arch"
fi
])
CFLAGS="$save_CFLAGS"
done
else
mac_arches=""
mac_sysroot=""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment