fixed MGL libraries detection code

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2003-01-20 23:23:57 +00:00
parent c3f64df223
commit 63a76696df
2 changed files with 567 additions and 542 deletions

1061
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -2163,7 +2163,7 @@ equivalent variable and GTK+ is version 1.2.3 or above.
fi fi
if test "$wxUSE_MGL" = 1; then if test "$wxUSE_MGL" = 1; then
AC_MSG_CHECKING(for SciTech MGL library) AC_MSG_CHECKING(for SciTech MGL library)
if test "x$MGL_ROOT" = x ; then if test "x$MGL_ROOT" = x ; then
AC_MSG_RESULT(not found) AC_MSG_RESULT(not found)
AC_MSG_ERROR([Cannot find MGL library. Make sure MGL_ROOT is set.]) AC_MSG_ERROR([Cannot find MGL library. Make sure MGL_ROOT is set.])
@ -2171,36 +2171,52 @@ equivalent variable and GTK+ is version 1.2.3 or above.
AC_MSG_RESULT($MGL_ROOT) AC_MSG_RESULT($MGL_ROOT)
fi fi
AC_MSG_CHECKING(for libmgl location)
dnl Find MGL library that we want dnl Find MGL library that we want
dnl FIXME_MGL - test for MGL variants for freebsd etc. dnl FIXME_MGL - test for MGL variants for freebsd etc.
case "${host}" in case "${host}" in
*-*-linux* ) *-*-linux* )
mgl_os="linux/gcc/glibc*" if test "x$wxUSE_SHARED" = xyes ; then
mgl_os_candidates="linux/gcc/glibc.so linux/gcc/glibc"
else
mgl_os_candidates="linux/gcc/glibc linux/gcc/glibc.so"
fi
;; ;;
*-pc-msdosdjgpp ) *-pc-msdosdjgpp )
mgl_os=dos32/dj2 mgl_os_candidates="dos32/dj2"
;; ;;
*) *)
AC_MSG_ERROR(This system type ${host} is not yet supported by wxMGL.) AC_MSG_ERROR(This system type ${host} is not yet supported by wxMGL.)
esac esac
mgl_lib_type="" mgl_lib_type=""
mgl_os=""
if test "$wxUSE_DEBUG_FLAG" = yes ; then for mgl_os_i in $mgl_os_candidates ; do
if test -f $MGL_ROOT/lib/debug/$mgl_os/libmgl.a -o \ if test "x$mgl_os" = x ; then
-f $MGL_ROOT/lib/debug/$mgl_os/libmgl.so; then if test "$wxUSE_DEBUG_FLAG" = yes ; then
mgl_lib_type=debug 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 fi
fi done
if test "x$mgl_lib_type" = x ; then
if test -f $MGL_ROOT/lib/release/$mgl_os/libmgl.a -o \
-f $MGL_ROOT/lib/release/$mgl_os/libmgl.so; then
mgl_lib_type=release
else
AC_MSG_ERROR([Cannot find MGL libraries, make sure they are compiled.])
fi
fi
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" wxUSE_UNIVERSAL="yes"
TOOLKIT_INCLUDE="-I$MGL_ROOT/include" TOOLKIT_INCLUDE="-I$MGL_ROOT/include"