added Mac OS X toolkit configuration

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9292 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Gilles Depeyrot
2001-02-04 19:53:25 +00:00
parent d3358961db
commit b4085ce66c
3 changed files with 763 additions and 571 deletions

View File

@@ -137,6 +137,7 @@ GTKDIR = $(WXDIR)/src/gtk
MOTIFDIR = $(WXDIR)/src/motif MOTIFDIR = $(WXDIR)/src/motif
MSWDIR = $(WXDIR)/src/msw MSWDIR = $(WXDIR)/src/msw
PMDIR = $(WXDIR)/src/os2 PMDIR = $(WXDIR)/src/os2
MACDIR = $(WXDIR)/src/mac
ODBCDIR = $(WXDIR)/src/iodbc ODBCDIR = $(WXDIR)/src/iodbc
FTDIR = $(WXDIR)/src/freetype FTDIR = $(WXDIR)/src/freetype
INCDIR = $(WXDIR)/include INCDIR = $(WXDIR)/include
@@ -690,6 +691,9 @@ MOTIF_DIST: ALL_GUI_DIST
cp $(MOTIFDIR)/xmcombo/*.h $(DISTDIR)/src/motif/xmcombo cp $(MOTIFDIR)/xmcombo/*.h $(DISTDIR)/src/motif/xmcombo
cp $(MOTIFDIR)/xmcombo/copying.txt $(DISTDIR)/src/motif/xmcombo cp $(MOTIFDIR)/xmcombo/copying.txt $(DISTDIR)/src/motif/xmcombo
MAC_DIST: ALL_GUI_DIST
echo "Apple Mac OS X specific distribution not complete"
MSW_DIST: ALL_GUI_DIST MSW_DIST: ALL_GUI_DIST
cp $(WXDIR)/wxWINE.spec $(DISTDIR) cp $(WXDIR)/wxWINE.spec $(DISTDIR)
cp $(INCDIR)/wx/msw/*.h $(DISTDIR)/include/wx/msw cp $(INCDIR)/wx/msw/*.h $(DISTDIR)/include/wx/msw

1193
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -505,13 +505,14 @@ dnl than checking it during run-time
NEEDS_D_REENTRANT_FOR_R_FUNCS=0 NEEDS_D_REENTRANT_FOR_R_FUNCS=0
dnl the list of all available toolkits dnl the list of all available toolkits
ALL_TOOLKITS="CYGWIN GTK MINGW MOTIF WINE PM" ALL_TOOLKITS="CYGWIN GTK MINGW MOTIF MAC WINE PM"
dnl NB: these wxUSE_XXX constants have value of 0 or 1 unlike all the other ones dnl NB: these wxUSE_XXX constants have value of 0 or 1 unlike all the other ones
dnl which are either yes or no dnl which are either yes or no
DEFAULT_wxUSE_GTK=0 DEFAULT_wxUSE_GTK=0
DEFAULT_wxUSE_MOTIF=0 DEFAULT_wxUSE_MOTIF=0
DEFAULT_wxUSE_MSW=0 DEFAULT_wxUSE_MSW=0
DEFAULT_wxUSE_MAC=0
DEFAULT_wxUSE_WINE=0 DEFAULT_wxUSE_WINE=0
DEFAULT_wxUSE_PM=0 DEFAULT_wxUSE_PM=0
@@ -521,6 +522,7 @@ dnl nothing was found in the cache
DEFAULT_DEFAULT_wxUSE_GTK=0 DEFAULT_DEFAULT_wxUSE_GTK=0
DEFAULT_DEFAULT_wxUSE_MOTIF=0 DEFAULT_DEFAULT_wxUSE_MOTIF=0
DEFAULT_DEFAULT_wxUSE_MSW=0 DEFAULT_DEFAULT_wxUSE_MSW=0
DEFAULT_DEFAULT_wxUSE_MAC=0
DEFAULT_DEFAULT_wxUSE_WINE=0 DEFAULT_DEFAULT_wxUSE_WINE=0
DEFAULT_DEFAULT_wxUSE_PM=0 DEFAULT_DEFAULT_wxUSE_PM=0
@@ -638,6 +640,15 @@ case "${host}" in
DEFAULT_DEFAULT_wxUSE_PM=1 DEFAULT_DEFAULT_wxUSE_PM=1
;; ;;
*-*-darwin* )
USE_BSD=1
USE_MAC=1
AC_DEFINE(__MAC__)
AC_DEFINE(__BSD__)
AC_DEFINE(__UNIX__)
DEFAULT_DEFAULT_wxUSE_MAC=1
;;
*-*-beos* ) *-*-beos* )
dnl leave USE_UNIX on - BeOS is sufficiently Unix-like for this dnl leave USE_UNIX on - BeOS is sufficiently Unix-like for this
USE_BEOS=1 USE_BEOS=1
@@ -960,6 +971,7 @@ if test "$wxUSE_GUI" = "yes"; then
AC_ARG_WITH(gtk, [ --with-gtk use GTK+], [wxUSE_GTK="$withval" CACHE_GTK=1 TOOLKIT_GIVEN=1]) AC_ARG_WITH(gtk, [ --with-gtk use GTK+], [wxUSE_GTK="$withval" CACHE_GTK=1 TOOLKIT_GIVEN=1])
AC_ARG_WITH(motif, [ --with-motif use Motif/Lesstif], [wxUSE_MOTIF="$withval" CACHE_MOTIF=1 TOOLKIT_GIVEN=1]) AC_ARG_WITH(motif, [ --with-motif use Motif/Lesstif], [wxUSE_MOTIF="$withval" CACHE_MOTIF=1 TOOLKIT_GIVEN=1])
AC_ARG_WITH(mac, [ --with-mac use Mac OS X], [wxUSE_MAC="$withval" TOOLKIT_GIVEN=1])
AC_ARG_WITH(wine, [ --with-wine use WINE], [wxUSE_WINE="$withval" CACHE_WINE=1 TOOLKIT_GIVEN=1]) AC_ARG_WITH(wine, [ --with-wine use WINE], [wxUSE_WINE="$withval" CACHE_WINE=1 TOOLKIT_GIVEN=1])
AC_ARG_WITH(cygwin, [ --with-cygwin use Cygwin for MS-Windows], [wxUSE_CYGWIN="$withval" CACHE_CYGWIN=1 TOOLKIT_GIVEN=1]) AC_ARG_WITH(cygwin, [ --with-cygwin use Cygwin for MS-Windows], [wxUSE_CYGWIN="$withval" CACHE_CYGWIN=1 TOOLKIT_GIVEN=1])
AC_ARG_WITH(mingw, [ --with-mingw use GCC Minimal MS-Windows], [wxUSE_MINGW="$withval" CACHE_MINGW=1 TOOLKIT_GIVEN=1]) AC_ARG_WITH(mingw, [ --with-mingw use GCC Minimal MS-Windows], [wxUSE_MINGW="$withval" CACHE_MINGW=1 TOOLKIT_GIVEN=1])
@@ -1266,7 +1278,7 @@ else
fi fi
dnl we suppose that expr exists... dnl we suppose that expr exists...
NUM_TOOLKITS=`expr ${wxUSE_GTK:-0} + ${wxUSE_MOTIF:-0} + ${wxUSE_WINE:-0} + ${wxUSE_MINGW:-0} + ${wxUSE_CYGWIN:-0}` NUM_TOOLKITS=`expr ${wxUSE_GTK:-0} + ${wxUSE_MOTIF:-0} + ${wxUSE_MAC:-0} + ${wxUSE_WINE:-0} + ${wxUSE_MINGW:-0} + ${wxUSE_CYGWIN:-0}`
dnl Allow wxUSE_PM only for OS/2 with EMX. dnl Allow wxUSE_PM only for OS/2 with EMX.
dnl Path separator; ':' for unix. dnl Path separator; ':' for unix.
@@ -1890,6 +1902,13 @@ if test "$wxUSE_MOTIF" = 1; then
GUIDIST=MOTIF_DIST GUIDIST=MOTIF_DIST
fi fi
if test "$wxUSE_MAC" = 1; then
TOOLKIT=MAC
UNIXOBJS="\$(UNIX_OBJS)"
UNIXDEPS="\$(UNIX_DEPS)"
GUIDIST=MAC_DIST
fi
if test "$wxUSE_PM" = 1; then if test "$wxUSE_PM" = 1; then
TOOLKIT=PM TOOLKIT=PM
@@ -1975,8 +1994,8 @@ else
TOOLKIT_DEF="-D__WXBASE__" TOOLKIT_DEF="-D__WXBASE__"
dnl the sources, their dependenices and the headers dnl the sources, their dependenices and the headers
ALL_OBJECTS="\$(BASE_OBJS) \${BASE_UNIX_OBJS}" ALL_OBJECTS="\$(BASE_OBJS) \$(BASE_UNIX_OBJS)"
ALL_DEPFILES="\${BASE_DEPS} \${BASE_UNIX_DEPS}" ALL_DEPFILES="\$(BASE_DEPS) \$(BASE_UNIX_DEPS)"
if test "$wxUSE_ZLIB" = "yes" ; then if test "$wxUSE_ZLIB" = "yes" ; then
ALL_OBJECTS="${ALL_OBJECTS} \$(ZLIBOBJS)" ALL_OBJECTS="${ALL_OBJECTS} \$(ZLIBOBJS)"
@@ -1992,6 +2011,12 @@ else
dnl distribute only wxBase sources/headers dnl distribute only wxBase sources/headers
GUIDIST="BASE_DIST" GUIDIST="BASE_DIST"
DISTDIR="wxBase" DISTDIR="wxBase"
dnl Apple MAC OS X specific extras
if test "$USE_UNIX" = 1 ; then
ALL_OBJECTS="${ALL_OBJECTS} dl_macosx.o"
ALL_DEPFILES="${ALL_DEPFILES} dl_macosx.d"
fi
fi fi
dnl the name of the (libtool) library dnl the name of the (libtool) library
@@ -2106,7 +2131,7 @@ if test "$wxUSE_SHARED" = "yes"; then
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
WX_ALL="CREATE_LINKS" WX_ALL="CREATE_LINKS"
;; ;;
*-*-freebsd* | *-*-netbsd*) *-*-freebsd* | *-*-netbsd* )
SHARED_LD="${CC} -shared -o" SHARED_LD="${CC} -shared -o"
PIC_FLAG="-fPIC" PIC_FLAG="-fPIC"
if test "$wxUSE_OPENGL" = "yes"; then if test "$wxUSE_OPENGL" = "yes"; then
@@ -2117,6 +2142,17 @@ if test "$wxUSE_SHARED" = "yes"; then
WX_ALL="CREATE_LINKS" WX_ALL="CREATE_LINKS"
fi fi
;; ;;
*-*-darwin* )
SHARED_LD="libtool -dynamic -o"
PIC_FLAG="-fPIC"
if test "$wxUSE_OPENGL" = "yes"; then
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL"
WX_ALL="CREATE_LINKS CREATE_LINKS_GL"
else
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
WX_ALL="CREATE_LINKS"
fi
;;
*-*-osf* ) *-*-osf* )
SHARED_LD="${CXX} -shared -o" SHARED_LD="${CXX} -shared -o"
PIC_FLAG="-fPIC" PIC_FLAG="-fPIC"
@@ -2454,6 +2490,13 @@ if test "$USE_BEOS" = 1; then
HAVE_SOME_SLEEP_FUNC=1 HAVE_SOME_SLEEP_FUNC=1
fi fi
if test "$USE_MAC" = 1; then
dnl Mac OS X has both nanosleep and usleep
dnl but only usleep is defined in unistd.h
AC_DEFINE(HAVE_USLEEP)
HAVE_SOME_SLEEP_FUNC=1
fi
if test "$HAVE_SOME_SLEEP_FUNC" != 1; then if test "$HAVE_SOME_SLEEP_FUNC" != 1; then
dnl try nanosleep() in libc and libposix4, if this fails - usleep() dnl try nanosleep() in libc and libposix4, if this fails - usleep()
POSIX4_LINK= POSIX4_LINK=
@@ -2466,7 +2509,9 @@ if test "$HAVE_SOME_SLEEP_FUNC" != 1; then
POSIX4_LINK="-lposix4" POSIX4_LINK="-lposix4"
], ],
[ [
AC_CHECK_FUNCS(usleep) AC_CHECK_FUNCS(usleep,
AC_DEFINE(HAVE_USLEEP),
)
AC_MSG_WARN([wxSleep() function will not work]) AC_MSG_WARN([wxSleep() function will not work])
] ]
) )
@@ -2569,6 +2614,11 @@ if test "$wxUSE_THREADS" = "yes" ; then
AC_CHECK_LIB(c_r, pthread_create, [ AC_CHECK_LIB(c_r, pthread_create, [
THREADS_OBJ="threadpsx.lo" THREADS_OBJ="threadpsx.lo"
THREADS_LINK="c_r" THREADS_LINK="c_r"
], [
dnl thread functions are in libcc_dynamic under Mac OS X/Darwin
AC_CHECK_LIB(cc_dynamic, pthread_create, [
THREADS_OBJ="threadpsx.lo"
THREADS_LINK="cc_dynamic"
], [ ], [
dnl VZ: SGI threads are not supported currently dnl VZ: SGI threads are not supported currently
AC_CHECK_HEADER(sys/prctl.h, [ AC_CHECK_HEADER(sys/prctl.h, [
@@ -2576,6 +2626,7 @@ if test "$wxUSE_THREADS" = "yes" ; then
]) ])
]) ])
]) ])
])
if test -z "$THREADS_OBJ" ; then if test -z "$THREADS_OBJ" ; then
wxUSE_THREADS=no wxUSE_THREADS=no
@@ -2711,6 +2762,11 @@ if test "$WXWINE" = 1 ; then
TOOLKIT_DEF="${TOOLKIT_DEF} -D__WXWINE__" TOOLKIT_DEF="${TOOLKIT_DEF} -D__WXWINE__"
fi fi
if test "$wxUSE_MAC" = 1 ; then
TOOLKIT_DEF="${TOOLKIT_DEF} -D__UNIX__ -DTARGET_CARBON"
TOOLKIT_INCLUDE="${TOOLKIT_INCLUDE}"
fi
if test "$wxUSE_CYGWIN" = 1 ; then if test "$wxUSE_CYGWIN" = 1 ; then
TOOLKIT_DEF="${TOOLKIT_DEF} -D__WIN95__" TOOLKIT_DEF="${TOOLKIT_DEF} -D__WIN95__"
fi fi
@@ -3272,6 +3328,10 @@ if test "$TOOLKIT" != "MSW"; then
HAVE_DL_FUNCS=0 HAVE_DL_FUNCS=0
HAVE_SHL_FUNCS=0 HAVE_SHL_FUNCS=0
if test "$wxUSE_DYNLIB_CLASS" = "yes"; then if test "$wxUSE_DYNLIB_CLASS" = "yes"; then
if test "$USE_MAC" = 1; then
dnl Mac OS X needs dl_macosx.c to be compiled in to fake dlopen/dlerror
HAVE_DL_FUNCS=1
else
dnl the test is a bit complicated because we check for dlopen() both with dnl the test is a bit complicated because we check for dlopen() both with
dnl and without -ldl and we also try to find shl_load() if there is no dnl and without -ldl and we also try to find shl_load() if there is no
dnl dlopen() on this system dnl dlopen() on this system
@@ -3309,6 +3369,7 @@ if test "$wxUSE_DYNLIB_CLASS" = "yes"; then
AC_DEFINE(HAVE_DLERROR), AC_DEFINE(HAVE_DLERROR),
AC_CHECK_LIB(dl, dlerror, AC_DEFINE(HAVE_DLERROR))) AC_CHECK_LIB(dl, dlerror, AC_DEFINE(HAVE_DLERROR)))
fi fi
fi
if test "$HAVE_DL_FUNCS" = 0; then if test "$HAVE_DL_FUNCS" = 0; then
if test "$HAVE_SHL_FUNCS" = 0; then if test "$HAVE_SHL_FUNCS" = 0; then
@@ -3756,9 +3817,15 @@ OPENGL_LIBS="$OPENGL_LINK"
dnl all additional libraries (except wxWindows itself) we link with dnl all additional libraries (except wxWindows itself) we link with
dnl dnl
dnl note that we always link with -lm - extended.c uses floor() and is always dnl note that we always link with -lm except for Mac OS X
dnl linked in dnl extended.c uses floor() and is always linked in
EXTRA_LIBS="$LIBS $POSIX4_LINK $INET_LINK $WCHAR_LINK $THREADS_LINK $DMALLOC_LINK $DL_LINK $ZLIB_LINK -lm" if test "$USE_MAC" = 1 ; then
EXTRA_LIBS="$LIBS $POSIX4_LINK $INET_LINK $WCHAR_LINK $THREADS_LINK $DMALLOC_LINK $DL_LINK $ZLIB_LINK -framework System"
CFLAGS="${CFLAGS} -fpascal-strings"
CPPFLAGS="${CPPFLAGS} -fpascal-strings"
else
EXTRA_LIBS="$LIBS $POSIX4_LINK $INET_LINK $WCHAR_LINK $THREADS_LINK $DMALLOC_LINK $DL_LINK $ZLIB_LINK -lm"
fi
if test "$wxUSE_GUI" = "yes"; then if test "$wxUSE_GUI" = "yes"; then
EXTRA_LIBS="$GUILIBS $PNG_LINK $JPEG_LINK $TIFF_LINK $FREETYPE_LINK $EXTRA_LIBS" EXTRA_LIBS="$GUILIBS $PNG_LINK $JPEG_LINK $TIFF_LINK $FREETYPE_LINK $EXTRA_LIBS"
fi fi