fi
;;
*-*-darwin* )
- SHARED_LD="libtool -dynamic -o"
+ SHARED_LD="${CXX} -dynamic -dylib -o"
PIC_FLAG="-fPIC"
if test "$wxUSE_OPENGL" = "yes"; then
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL"
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
WX_ALL="CREATE_LINKS"
fi
+ dnl the name of the shared library
+ WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}-${WX_RELEASE}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}.dylib"
+ WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}.dylib"
+ dnl the name of the links to the shared library
+ WX_LIBRARY_LINK1="lib${WX_LIBRARY}-${WX_RELEASE}.${WX_CURRENT}.dylib"
+ WX_LIBRARY_LINK2="lib${WX_LIBRARY}-${WX_RELEASE}.dylib"
+ WX_LIBRARY_LINK3="lib${WX_LIBRARY}.dylib"
+ WX_LIBRARY_LINK1_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.${WX_CURRENT}.dylib"
+ WX_LIBRARY_LINK2_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.dylib"
+ WX_LIBRARY_LINK3_GL="lib${WX_LIBRARY}_gl.dylib"
;;
*-*-osf* )
SHARED_LD="${CXX} -shared -o"
dnl AIX calls the library libpthreads - thanks IBM!
if test "$USE_AIX" = 1; then
THREADS_LIB=pthreads
+ elif test "$USE_MAC" = 1; then
+ THREADS_LIB=cc_dynamic
else
THREADS_LIB=pthread
fi
pthread_cleanup_pop(0);
], [
wx_cv_func_pthread_cleanup_push=yes
- AC_DEFINE(HAVE_THREAD_CLEANUP_FUNCTIONS)
], [
wx_cv_func_pthread_cleanup_push=no
])
])
+ if test "$wx_cv_func_pthread_cleanup_push" = "yes"; then
+ AC_DEFINE(HAVE_THREAD_CLEANUP_FUNCTIONS)
+ fi
+
+ dnl mutexattr_t initialization is done in quite different ways on different
+ dnl platforms, so check for a few things:
+ dnl
+ dnl HAVE_MUTEX_RECURSIVE means that we can create recursive mutexes
+ dnl HAVE_MUTEXATTR_SETTYPE means that we do it using
+ dnl pthread_mutexattr_settype(PTHREAD_MUTEX_RECURSIVE) and if it is not
+ dnl defined, we do it by directly assigned
+ dnl PTHREAD_MUTEX_RECURSIVE_MUTEX_INITIALIZER_NP to attr
+
+#ifdef HAVE_PTHREAD_MUTEXATTR_T
+#elif defined(HAVE_PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
+
+ AC_CACHE_CHECK([for pthread_mutexattr_t], wx_cv_type_pthread_mutexattr_t,
+ [
+ AC_TRY_COMPILE([#include <pthread.h>],
+ [
+ pthread_mutexattr_t attr;
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
+ ], [
+ wx_cv_type_pthread_mutexattr_t=yes
+ ], [
+ wx_cv_type_pthread_mutexattr_t=no
+ ]
+ )
+ ])
+
+ if test "$wx_cv_type_pthread_mutexattr_t" = "yes"; then
+ AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_T)
+ else
+ dnl don't despair, there may be another way to do it
+ AC_CACHE_CHECK([for PTHREAD_RECURSIVE_MUTEX_INITIALIZER],
+ wx_cv_type_pthread_rec_mutex_init,
+ [
+ AC_TRY_COMPILE([#include <pthread.h>],
+ [
+ pthread_mutex_t attr = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+ ], [
+ wx_cv_type_pthread_rec_mutex_init=yes
+ ], [
+ wx_cv_type_pthread_rec_mutex_init=no
+ ]
+ )
+ ])
+ if test "$wx_cv_type_pthread_rec_mutex_init"="yes"; then
+ AC_DEFINE(HAVE_PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
+ else
+ dnl this may break code working elsewhere, so at least warn about it
+ AC_MSG_WARN([wxMutex won't be recursive on this platform])
+ fi
+ fi
+
THREADS_LINK="-l$THREADS_LINK"
dnl building MT programs under Solaris with the native compiler requires -mt
if test "$wxUSE_THREADS" = "yes"; then
AC_DEFINE(wxUSE_THREADS)
- dnl must define _REENTRANT for multithreaded code
- CFLAGS="${CFLAGS} -D_REENTRANT"
- CXXFLAGS="${CXXFLAGS} -D_REENTRANT"
+ dnl must define _REENTRANT for multithreaded code except for Mac OS X
+ if test "$wxUSE_MAC" = "0"; then
+ CFLAGS="${CFLAGS} -D_REENTRANT"
+ CXXFLAGS="${CXXFLAGS} -D_REENTRANT"
+ fi
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS thread"
else
fi
if test "$wxUSE_MAC" = 1 ; then
- TOOLKIT_DEF="${TOOLKIT_DEF} -D__UNIX__ -DTARGET_CARBON"
+ TOOLKIT_DEF="${TOOLKIT_DEF} -D__UNIX__ -D__POWERPC__ -DTARGET_CARBON"
TOOLKIT_INCLUDE="${TOOLKIT_INCLUDE}"
fi
wxUSE_DRAG_AND_DROP=no
fi
+ if test "$wxUSE_MAC" = 1; then
+ AC_MSG_WARN([Drag and drop is not yet supported under Mac OS X])
+ wxUSE_DRAG_AND_DROP=no
+ fi
+
if test "$USE_WIN32" = 1; then
dnl check for ole headers and disable DnD if not present (earlier
dnl versions of mingw32 don't have them)
dnl note that we always link with -lm except for Mac OS X
dnl extended.c uses floor() and is always linked in
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"
+ EXTRA_LIBS="$LIBS $POSIX4_LINK $INET_LINK $WCHAR_LINK $THREADS_LINK $DMALLOC_LINK $DL_LINK $ZLIB_LINK -Llib -lxpm -framework Carbon -framework System"
CFLAGS="${CFLAGS} -fpascal-strings"
CPPFLAGS="${CPPFLAGS} -fpascal-strings"
else
dnl the debian build process wants setup.h in the lib subdir so we
dnl can pretend wxWin is already installed, so we *copy* it there
-
+
if test ! -d lib; then
mkdir lib
fi