X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8d31c13865c0254b2f4c784677f8537b1e81593f..c83d505a201ffeaad1da3bc02795397ab7fd9175:/install/gtk/configure.in diff --git a/install/gtk/configure.in b/install/gtk/configure.in index 4e2e279986..d7db7f05e2 100644 --- a/install/gtk/configure.in +++ b/install/gtk/configure.in @@ -494,21 +494,52 @@ dnl ############################ dnl # checks library functions # dnl ############################ -UNIX_THREAD=gtk/threadno.cpp -AC_CHECK_LIB(pthread, pthread_create, [UNIX_THREAD=gtk/threadpsx.cpp]) - dnl ########################## dnl # checks system services # dnl ########################## dnl ##### Threads ##### -UNIX_THREAD="gtk/threadno.cpp" -AC_CHECK_LIB(pthread, pthread_create, [UNIX_THREAD="gtk/threadpsx.cpp"]) -AC_CHECK_LIB(pthreads, pthread_create, [UNIX_THREAD="gtk/threadpsx.cpp"]) -AC_CHECK_HEADER(sys/prctl.h, [UNIX_THREAD="gtk/threadsgi.cpp"]) +USE_THREADS=1 +THREADS_LINK="" +UNIX_THREAD="" + +AC_ARG_WITH(threads, +[ --without-threads Force disabling threads ], +[USE_THREADS="$withval"]) + +if test "$USE_THREADS" = "1"; then + UNIX_THREAD="gtk/threadno.cpp" + + dnl For glibc 2 users who have the old libc 5 too + + AC_CHECK_LIB(pthread-0.7, pthread_create, [ + UNIX_THREAD="gtk/threadpsx.cpp" + THREADS_LINK="-lpthread-0.7" + AC_DEFINE(USE_THREADS) + ],[ + AC_CHECK_LIB(pthread, pthread_create, [ + UNIX_THREAD="gtk/threadpsx.cpp" + THREADS_LINK="-lpthread" + AC_DEFINE(USE_THREADS) + ]) + ]) + AC_CHECK_LIB(pthreads, pthread_create, [ + UNIX_THREAD="gtk/threadpsx.cpp" + THREADS_LINK="-lpthreads" + AC_DEFINE(USE_THREADS) + ]) + AC_CHECK_HEADER(sys/prctl.h, [ + UNIX_THREAD="gtk/threadsgi.cpp" + AC_DEFINE(USE_THREADS) + ]) +fi + AC_SUBST(UNIX_THREAD) +AC_SUBST(THREADS_LINK) dnl defines UNIX_THREAD it contains the source file to use for threads. (GL) +dnl defines THREADS_LINK it contains the thread library to link with. (GL) +dnl defines USE_THREADS if thread support is activated. (GL) AC_SYS_LONG_FILE_NAMES dnl defines HAVE_LONG_FILENAMES if filenames longer then @@ -562,7 +593,7 @@ USE_GTK=1 USE_UNIX=1 TOOLKIT=GTK -TOOLKIT_DEF=__GTK__ +TOOLKIT_DEF=__WXGTK__ USE_LINUX= USE_SGI= @@ -665,6 +696,7 @@ DEFAULT_USE_ZLIB=1 DEFAULT_USE_GDK_IMLIB=1 DEFAULT_USE_LIBPNG=1 +DEFAULT_USE_APPLE_IEEE=1 DEFAULT_USE_STORABLE_CLASSES=1 DEFAULT_USE_AUTOTRANS=1 DEFAULT_USE_AFM_FOR_POSTSCRIPT=1 @@ -672,9 +704,6 @@ DEFAULT_WX_NORMALIZED_PS_FONTS=1 DEFAULT_USE_IOSTREAMH=1 -DEFAULT_USE_THREADS=0 -DEFAULT_USE_THREADS_SGI=0 -DEFAULT_USE_THREADS_POSIX=0 DEFAULT_USE_OPENGL=0 DEFAULT_USE_WXCONFIG=1 @@ -712,11 +741,11 @@ AC_OVERRIDES(shared,shared, USE_SHARED) AC_OVERRIDES(optimise,optimise, -**--without-optimise create unoptimised code, +**--with-optimise create optimised code, USE_OPTIMISE) AC_OVERRIDES(debug_flag,debug_flag, -**--with-debug_flag create code with DEBUG define set to 1, +**--with-debug_flag create code with WXDEBUG define set to 1, USE_DEBUG_FLAG) AC_OVERRIDES(debug_info,debug_info, @@ -736,35 +765,35 @@ dnl user options for libraries (no choice yet) dnl ---------------------------------------------------------------- AC_OVERRIDES(zlib,zlib, -**--with-zlib use zlib (LZW comression), +**--with-zlib use zlib (LZW comression), USE_ZLIB) AC_OVERRIDES(gdk_imlib,gdk_imlib, -**--with-gdk_imlib use Raster's gdk_imlib (Image library), +**--with-gdk_imlib use Raster's gdk_imlib (Image library), USE_GDK_IMLIB) AC_OVERRIDES(libpng,libpng, -**--with-libpng use libpng (PNG image format), +**--with-libpng use libpng (PNG image format), USE_LIBPNG) -AC_OVERRIDES(threads,threads, -**--with-threads use threads, -USE_THREADS) - AC_OVERRIDES(opengl,opengl, -**--with-opengl use opengl (OpenGL or Mesa), +**--with-opengl use opengl (OpenGL or Mesa), USE_OPENGL) dnl ---------------------------------------------------------------- dnl user options for code features (no choice yet) dnl ---------------------------------------------------------------- +AC_OVERRIDES(apple_ieee, apple_ieee, +**--with_apple_ieee use the Apple IEEE codec, +USE_APPLE_IEEE) + AC_OVERRIDES(storable,storable, -**--with-storable use storable classes, +**--with-storable use storable classes, USE_STORABLE_CLASSES) AC_OVERRIDES(autotrans,autotrans, -**--with-autotrans use gettext automatic translation, +**--with-autotrans use gettext automatic translation, USE_AUTOTRANS) AC_OVERRIDES(afmfonts,afmfonts, @@ -892,26 +921,11 @@ if test "$USE_LIBPNG" = 1 ; then LIBPNG="LIBPNG" fi -THREADS=NONE -THREADS_LINK= -if test "$USE_THREADS" = 1 ; then - case "$OS" in iris | IRIX | Irix5 | Irix6) - USE_THREADS_POSIX=0 - USE_THREADS_SGI=1 - ;; - *) - USE_THREADS_POSIX=1 - USE_THREADS_SGI=0 - THREADS_LINK=-lpthread - ;; - esac - THREADS="THREADS" - AC_DEFINE_UNQUOTED(USE_THREADS,$USE_THREADS) - AC_DEFINE_UNQUOTED(USE_THREADS_SGI,$USE_THREADS_SGI) - AC_DEFINE_UNQUOTED(USE_THREADS_POSIX,$USE_THREADS_POSIX) +APPLE_IEEE=NONE +if test "$USE_APPLE_IEEE" = 1 ; then + APPLE_IEEE="APPLE_IEEE" + AC_DEFINE_UNQUOTED(USE_APPLE_IEEE,$USE_APPLE_IEEE) fi -AC_SUBST(THREADS) -AC_SUBST(THREADS_LINK) STORABLE=NONE if test "$USE_STORABLE_CLASSES" = 1 ; then @@ -925,14 +939,16 @@ if test "$USE_AUTOTRANS" = 1 ; then AC_DEFINE_UNQUOTED(USE_AUTOTRANS,$USE_AUTOTRANS) fi -DEBUG= +WXDEBUG= if test "$USE_DEBUG_INFO" = 1 ; then - DEBUG="-g" + WXDEBUG="-g" fi -AC_SUBST(DEBUG) +AC_SUBST(WXDEBUG) if test "$USE_DEBUG_FLAG" = 1 ; then - AC_DEFINE_UNQUOTED(DEBUG,$USE_DEBUG_FLAG) + AC_DEFINE_UNQUOTED(WXDEBUG,$USE_DEBUG_FLAG) + WXDEBUG_DEFINE="-D__WXDEBUG__" + AC_SUBST(WXDEBUG_DEFINE) fi if test "$USE_MEM_TRACING" = 1 ; then @@ -1166,7 +1182,7 @@ if test "$USE_GTK" = 1; then GUI_TK_INCLUDE="$GTK_CFLAGS" GUI_TK_LIBRARY="$GTK_LIBS" ], AC_MSG_ERROR(Are gtk-config and the GTK in path and up-to-date?)) - AC_DEFINE(__GTK__) + AC_DEFINE(__WXGTK__) fi AC_SUBST(GUI_TK_INCLUDE) AC_SUBST(GUI_TK_LIBRARY)