- if test "$wxUSE_MGL" = 1; then
- AC_MSG_CHECKING(for SciTech MGL library)
- if test "x$MGL_ROOT" = x ; then
- AC_MSG_RESULT(not found)
- AC_MSG_ERROR([Cannot find MGL library. Make sure MGL_ROOT is set.])
- else
- AC_MSG_RESULT($MGL_ROOT)
- fi
-
- AC_MSG_CHECKING(for libmgl location)
- dnl Find MGL library that we want
- dnl FIXME_MGL - test for MGL variants for freebsd etc.;
- dnl and for non-x86 versions
- case "${host}" in
- *-*-linux* )
- dnl glibc.so, glibc are for older versions of MGL,
- dnl x86/a, x86/so are used by >= 5.0 R11
- if test "x$wxUSE_SHARED" = xyes ; then
- mgl_os_candidates="linux/gcc/x86/so linux/gcc/x86/a linux/gcc/glibc.so linux/gcc/glibc"
- else
- mgl_os_candidates="linux/gcc/x86/a linux/gcc/x86/so linux/gcc/glibc linux/gcc/glibc.so"
- fi
- ;;
- *-pc-msdosdjgpp )
- mgl_os_candidates="dos32/dj2"
- ;;
- *)
- AC_MSG_ERROR(This system type ${host} is not yet supported by wxMGL.)
- esac
-
- mgl_lib_type=""
- mgl_os=""
-
- for mgl_os_i in $mgl_os_candidates ; do
- if test "x$mgl_os" = x ; then
- if test "$wxUSE_DEBUG_FLAG" = yes ; then
- if test -f $MGL_ROOT/lib/debug/$mgl_os_i/libmgl.a -o \
- -f $MGL_ROOT/lib/debug/$mgl_os_i/libmgl.so; then
- mgl_lib_type=debug
- mgl_os=$mgl_os_i
- fi
- fi
- if test "x$mgl_lib_type" = x ; then
- if test -f $MGL_ROOT/lib/release/$mgl_os_i/libmgl.a -o \
- -f $MGL_ROOT/lib/release/$mgl_os_i/libmgl.so; then
- mgl_lib_type=release
- mgl_os=$mgl_os_i
- fi
- fi
- fi
- done
-
- if test "x$mgl_os" = x ; then
- AC_MSG_RESULT(not found)
- AC_MSG_ERROR([Cannot find MGL libraries, make sure they are compiled.])
- fi
- AC_MSG_RESULT("$MGL_ROOT/lib/$mgl_lib_type/$mgl_os")
-
- wxUSE_UNIVERSAL="yes"
-
- TOOLKIT_INCLUDE="-I$MGL_ROOT/include"
- GUI_TK_LIBRARY="-L$MGL_ROOT/lib/$mgl_lib_type/$mgl_os -lmgl -lmglcpp -lpm"
-
- AFMINSTALL=afminstall
- TOOLKIT=MGL
- GUIDIST=MGL_DIST
- fi
-