Set the proper build flags for Darwin based on the CPU type instead of

assuming PowerPC.
This commit is contained in:
Alexandre Julliard 2005-09-15 09:48:18 +00:00
parent 41177ca0bd
commit 495bf51392
2 changed files with 35 additions and 20 deletions

25
configure vendored
View File

@ -311,7 +311,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS DLLDEFS build build_cpu build_vendor build_os host host_cpu host_vendor host_os WIN16_FILES WIN16_INSTALL SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPPBIN ac_ct_CPPBIN TOOLSDIR CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LEX LEXLIB LEX_OUTPUT_ROOT XLEX BISON AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP WINDRES ac_ct_WINDRES LN_S LN EGREP LDCONFIG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LINT LINTFLAGS FONTFORGE PKG_CONFIG PRELINK LIBPTHREAD XLIB XFILES OPENGLFILES GLU32FILES OPENGL_LIBS GLUT_LIBS GLUT32FILES NASLIBS XML2LIBS XML2INCL XSLTLIBS XSLTINCL CURSESLIBS sane_devel SANELIBS SANEINCL ICULIBS LCMSLIBS LDAPLIBS FREETYPELIBS FREETYPEINCL ft_devel ft_devel2 FONTSSUBDIRS ARTSCCONFIG ARTSLIBS ARTSINCL ESDCONFIG ESDLIBS ESDINCL ALSALIBS AUDIOIOLIBS EXTRACFLAGS BUILTINFLAG DLLEXT DLLFLAGS DLLIBS LDSHARED LDDLLFLAGS LIBEXT IMPLIBEXT DLLTOOL ac_ct_DLLTOOL DLLWRAP ac_ct_DLLWRAP LDEXECFLAGS LDLIBWINEFLAGS COREFOUNDATIONLIB IOKITLIB CROSSTEST CROSSCC CROSSWINDRES LDPATH CRTLIBS SOCKETLIBS WINE_BINARIES MAIN_BINARY LDD LIBOBJS LTLIBOBJS'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS DLLDEFS build build_cpu build_vendor build_os host host_cpu host_vendor host_os WIN16_FILES WIN16_INSTALL SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPPBIN ac_ct_CPPBIN TOOLSDIR CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LEX LEXLIB LEX_OUTPUT_ROOT XLEX BISON AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP WINDRES ac_ct_WINDRES LN_S LN EGREP LDCONFIG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LINT LINTFLAGS FONTFORGE PKG_CONFIG PRELINK LIBPTHREAD XLIB XFILES OPENGLFILES GLU32FILES OPENGL_LIBS GLUT_LIBS GLUT32FILES NASLIBS XML2LIBS XML2INCL XSLTLIBS XSLTINCL CURSESLIBS sane_devel SANELIBS SANEINCL ICULIBS LCMSLIBS LDAPLIBS FREETYPELIBS FREETYPEINCL ft_devel ft_devel2 FONTSSUBDIRS ARTSCCONFIG ARTSLIBS ARTSINCL ESDCONFIG ESDLIBS ESDINCL ALSALIBS AUDIOIOLIBS EXTRACFLAGS BUILTINFLAG DLLEXT DLLFLAGS DLLIBS LDSHARED LDDLLFLAGS LIBEXT IMPLIBEXT DLLTOOL ac_ct_DLLTOOL DLLWRAP ac_ct_DLLWRAP LDEXECFLAGS COREFOUNDATIONLIB IOKITLIB LDLIBWINEFLAGS CROSSTEST CROSSCC CROSSWINDRES LDPATH CRTLIBS SOCKETLIBS WINE_BINARIES MAIN_BINARY LDD LIBOBJS LTLIBOBJS'
ac_subst_files='MAKE_RULES MAKE_DLL_RULES MAKE_IMPLIB_RULES MAKE_TEST_RULES MAKE_LIB_RULES MAKE_PROG_RULES'
# Initialize some variables set by options.
@ -12720,19 +12720,28 @@ echo "${ECHO_T}$ac_cv_c_dll_macho" >&6
if test "$ac_cv_c_dll_macho" = "yes"
then
LIBEXT="dylib"
LDDLLFLAGS="-bundle -read_only_relocs warning"
LDDLLFLAGS="-bundle"
LDSHARED="\$(CC) -dynamiclib"
CFLAGS="$CFLAGS -ffixed-r13 -no-cpp-precomp"
STRIP="$STRIP -u -r"
COREFOUNDATIONLIB="-framework CoreFoundation"
IOKITLIB="-framework IOKit -framework CoreFoundation"
case $host_cpu in
*i[3456789]86*)
LDEXECFLAGS="-image_base 0x7bf00000"
;;
*powerpc*)
CFLAGS="$CFLAGS -ffixed-r13"
LDDLLFLAGS="$LDDLLFLAGS -read_only_relocs warning"
LDEXECFLAGS="-seg1addr 0x120000"
LDLIBWINEFLAGS="-seg1addr 0x140000"
COREFOUNDATIONLIB="-framework CoreFoundation"
;;
esac
IOKITLIB="-framework IOKit"
IOKITLIB="$IOKITLIB $COREFOUNDATIONLIB"
else
echo "$as_me:$LINENO: checking whether we can build an HP-UX dll" >&5
echo $ECHO_N "checking whether we can build an HP-UX dll... $ECHO_C" >&6
@ -19585,9 +19594,9 @@ s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t
s,@DLLWRAP@,$DLLWRAP,;t t
s,@ac_ct_DLLWRAP@,$ac_ct_DLLWRAP,;t t
s,@LDEXECFLAGS@,$LDEXECFLAGS,;t t
s,@LDLIBWINEFLAGS@,$LDLIBWINEFLAGS,;t t
s,@COREFOUNDATIONLIB@,$COREFOUNDATIONLIB,;t t
s,@IOKITLIB@,$IOKITLIB,;t t
s,@LDLIBWINEFLAGS@,$LDLIBWINEFLAGS,;t t
s,@CROSSTEST@,$CROSSTEST,;t t
s,@CROSSCC@,$CROSSCC,;t t
s,@CROSSWINDRES@,$CROSSWINDRES,;t t

View File

@ -1018,19 +1018,25 @@ case $host_os in
if test "$ac_cv_c_dll_macho" = "yes"
then
LIBEXT="dylib"
LDDLLFLAGS="-bundle -read_only_relocs warning"
LDDLLFLAGS="-bundle"
LDSHARED="\$(CC) -dynamiclib"
CFLAGS="$CFLAGS -ffixed-r13 -no-cpp-precomp"
STRIP="$STRIP -u -r"
dnl Relocate wine executable
AC_SUBST(LDEXECFLAGS,"-seg1addr 0x120000")
dnl Relocate libwine.dyld too
AC_SUBST(LDLIBWINEFLAGS,"-seg1addr 0x140000")
dnl declare needed frameworks
AC_SUBST(COREFOUNDATIONLIB,"-framework CoreFoundation")
AC_SUBST(IOKITLIB,"-framework IOKit")
dnl using IOKit imply we use CoreFoundation too
IOKITLIB="$IOKITLIB $COREFOUNDATIONLIB"
AC_SUBST(IOKITLIB,"-framework IOKit -framework CoreFoundation")
case $host_cpu in
*i[[3456789]]86*)
AC_SUBST(LDEXECFLAGS,"-image_base 0x7bf00000")
;;
*powerpc*)
CFLAGS="$CFLAGS -ffixed-r13"
LDDLLFLAGS="$LDDLLFLAGS -read_only_relocs warning"
dnl Relocate wine executable (FIXME: is this really needed?)
AC_SUBST(LDEXECFLAGS,"-seg1addr 0x120000")
AC_SUBST(LDLIBWINEFLAGS,"-seg1addr 0x140000")
;;
esac
else
AC_CACHE_CHECK(whether we can build an HP-UX dll, ac_cv_c_dll_hpux,
[WINE_TRY_SHLIB_FLAGS([-shared], ac_cv_c_dll_hpux="yes", ac_cv_c_dll_hpux="no")])