-WXGRAPH=NONE
-if test "$wxUSE_WXGRAPH" = 1 ; then
- WXGRAPH="WXGRAPH"
- AC_DEFINE_UNQUOTED(wxUSE_WXGRAPH,$wxUSE_WXGRAPH)
-fi
-AC_SUBST(WXGRAPH)
-
-WXTREE=NONE
-if test "$wxUSE_WXTREE" = 1 ; then
- WXTREE="WXTREE"
- AC_DEFINE_UNQUOTED(wxUSE_WXTREE,$wxUSE_WXTREE)
-fi
-AC_SUBST(WXTREE)
-
-GLCANVAS=NONE
-if test "$wxUSE_OPENGL" = 1 ; then
- GLCANVAS="GLCANVAS"
-fi
-
-dnl ----------------------------------------------------------------
-dnl select dynamic loader (used by iODBC to load drivers)
-dnl ----------------------------------------------------------------
-
-AC_CHECK_LIB(dl,main,[DL_LIBRARY=-ldl],[DL_LIBRARY=])
-AC_SUBST(DL_LIBRARY)
-
-dnl ----------------------------------------------------------------
-dnl thread support
-dnl ----------------------------------------------------------------
-
-wxUSE_THREADS=1
-THREADS_LINK=""
-UNIX_THREAD="gtk/threadno.cpp"
-
-AC_OVERRIDES(threads,threads,
-**--without-threads Force disabling threads,
-wxUSE_THREADS)
-
-dnl AC_ARG_WITH(threads,
-dnl [**--without-threads Force disabling threads ],
-dnl [wxUSE_THREADS="$withval"])
-
-if test "$wxUSE_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_CHECK_HEADER(sys/prctl.h, [
- UNIX_THREAD="gtk/threadsgi.cpp"
- ])
-
- dnl pthread_create is always available in pthread but it seems not to be
- dnl the case for pthread_setcanceltype.
-
- AC_CHECK_LIB(pthread, pthread_setcanceltype, [
- UNIX_THREAD="gtk/threadpsx.cpp"
- THREADS_LINK="-lpthread"
- ])
- ])
- AC_CHECK_LIB(pthreads, pthread_setcanceltype, [
- UNIX_THREAD="gtk/threadpsx.cpp"
- THREADS_LINK="-lpthreads"
- ])
-fi
-
-if test "$wxUSE_MOTIF" = "1"; then
- UNIX_THREAD="motif/thread.cpp"
-fi
-
-if test -z "$UNIX_THREAD"; then
- wxUSE_THREADS=0
-fi
-
-AC_SUBST(UNIX_THREAD)
-AC_SUBST(THREADS_LINK)
-AC_DEFINE(wxUSE_THREADS)
-
-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 wxUSE_THREADS if thread support is activated. (GL)
-
-dnl ----------------------------------------------------------------
-dnl search for opengl
-dnl ----------------------------------------------------------------
-
-OPENGL_INCLUDE=
-OPENGL_LIBRARY=
-OPENGL_LINK=
-
-if test "$wxUSE_OPENGL" = 1; then
- dnl checking OPENGL includes
- AC_MSG_CHECKING(for OpenGL includes)
- AC_PATH_FIND_INCLUDES($SEARCH_INCLUDE,GL/gl.h)
- if test "$ac_find_includes" != "" ; then
- OPENGL_INCLUDE="-I$ac_find_includes"
- AC_MSG_RESULT(found $ac_find_includes)
- dnl checking OPENGL libraries
- AC_MSG_CHECKING(for OpenGL library)
- AC_PATH_FIND_LIBRARIES($SEARCH_LIB,GL)
- if test "$ac_find_libraries" != "" ; then
- AC_INCLUDE_PATH_EXIST($ac_find_includes,$CHECK_INCLUDE)
- AC_LINK_PATH_EXIST($ac_find_libraries,$CHECK_LIB)
- CHECK_LINK="$CHECK_INCLUDE $ac_path_to_link"
- CHECK_INCLUDE="$CHECK_INCLUDE $ac_path_to_include"
- OPENGL_LIBRARY="$ac_path_to_link"
- OPENGL_INCLUDE="$ac_path_to_include"
- OPENGL_LINK="-lGL"
- AC_MSG_RESULT(found OpenGL at $ac_find_libraries)
- else
- AC_PATH_FIND_LIBRARIES($SEARCH_LIB,MesaGL)
- if test "$ac_find_libraries" != "" ; then
- AC_INCLUDE_PATH_EXIST($ac_find_includes,$CHECK_INCLUDE)
- AC_LINK_PATH_EXIST($ac_find_libraries,$CHECK_LIB)
- CHECK_LINK="$CHECK_INCLUDE $ac_path_to_link"
- CHECK_INCLUDE="$CHECK_INCLUDE $ac_path_to_include"
- OPENGL_LIBRARY="$ac_path_to_link"
- OPENGL_INCLUDE="$ac_path_to_include"
- OPENGL_LINK="-lMesaGL"
- AC_MSG_RESULT(found MESA at $ac_find_libraries)
- else
- AC_MSG_ERROR(no)
- fi
- fi
- else
- AC_MSG_ERROR(no)
- fi
-fi
-
-dnl ----------------------------------------------------------------
-dnl left-over
-dnl ----------------------------------------------------------------
-
-wxUSE_GLX=$wxUSE_OPENGL
-if test "$wxUSE_OPENGL" != 1; then
- OPENGL_LIBRARIES=
- OPENGL_INCLUDE=
- OPENGL_LINK=
- GLCANVAS=NONE
-fi
-
-AC_DEFINE_UNQUOTED(wxUSE_GLX,$wxUSE_GLX)
-AC_SUBST(OPENGL_INCLUDE)
-AC_SUBST(OPENGL_LIBRARY)
-AC_SUBST(OPENGL_LINK)
-AC_SUBST(GLCANVAS)
-