Mercurial > hg > octave-avbm
changeset 10571:2ceb8e013597
add configure test for glu
author | Shai Ayal <shaiay@users.sourceforge.net> |
---|---|
date | Mon, 26 Apr 2010 07:21:26 +0300 |
parents | a61d7248627c |
children | 148559d9d4ac |
files | ChangeLog configure.ac |
diffstat | 2 files changed, 70 insertions(+), 64 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-04-26 Shai Ayal <shaiay@users.sourceforge.net> + + * configure.ac: make all graphics related tests inter-dependent + 2010-04-20 Jaroslav Hajek <highegg@gmail.com> * NEWS: Update.
--- a/configure.ac +++ b/configure.ac @@ -820,6 +820,9 @@ warn_freetype="" OCTAVE_OPENGL +GRAPHICS_LIBS= +GRAPHICS_CFLAGS= + if test -n "$OPENGL_LIBS"; then AC_DEFINE(HAVE_OPENGL, 1, [Define if OpenGL is available]) @@ -828,81 +831,80 @@ AC_CHECK_FT2([9.0.3], [AC_DEFINE(HAVE_FREETYPE, 1, [Define to 1 if you have Freetype library.]) XTRA_CXXFLAGS="$XTRA_CXXFLAGS $FT2_CFLAGS"], [warn_freetype="FreeType library not found. Native renderer will not have on-screen text"]) -fi -## fontconfig library + ## fontconfig library -warn_fontconfig="" -if test -z "$warn_freetype"; then - PKG_CHECK_MODULES(FONTCONFIG, [fontconfig], [ - have_fontconfig=yes - OPENGL_LIBS="$FONTCONFIG_LIBS $OPENGL_LIBS" - XTRA_CXXFLAGS="$XTRA_CXXFLAGS $FONTCONFIG_CFLAGS" - AC_DEFINE(HAVE_FONTCONFIG, 1, [Define to 1 if fontconfig is present])], [ - have_fontconfig=no - warn_fontconfig="Fontconfig not found. Native text rendering will use hard-coded font instead."]) -fi + warn_fontconfig="" + if test -z "$warn_freetype"; then + PKG_CHECK_MODULES(FONTCONFIG, [fontconfig], [ + have_fontconfig=yes + OPENGL_LIBS="$FONTCONFIG_LIBS $OPENGL_LIBS" + XTRA_CXXFLAGS="$XTRA_CXXFLAGS $FONTCONFIG_CFLAGS" + AC_DEFINE(HAVE_FONTCONFIG, 1, [Define to 1 if fontconfig is present])], [ + have_fontconfig=no + warn_fontconfig="Fontconfig not found. Native text rendering will use hard-coded font instead."]) + fi -GRAPHICS_LIBS= -GRAPHICS_CFLAGS= + ## fltk (www.fltk.org) + AC_ARG_WITH(fltk-prefix, + [ --with-fltk-prefix=PFX Prefix where FLTK is installed (optional)], + fltk_prefix="$withval", + fltk_prefix="") + AC_ARG_WITH(fltk-exec-prefix, + [ --with-fltk-exec-prefix=PFX Exec prefix where FLTK is installed (optional)], + fltk_exec_prefix="$withval", + fltk_exec_prefix="") -## fltk (www.fltk.org) -AC_ARG_WITH(fltk-prefix, - [ --with-fltk-prefix=PFX Prefix where FLTK is installed (optional)], - fltk_prefix="$withval", - fltk_prefix="") -AC_ARG_WITH(fltk-exec-prefix, - [ --with-fltk-exec-prefix=PFX Exec prefix where FLTK is installed (optional)], - fltk_exec_prefix="$withval", - fltk_exec_prefix="") - -if test -n "$fltk_exec_prefix"; then - fltk_args="$fltk_args --exec-prefix=$fltk_exec_prefix" - if test "x${FLTK_CONFIG+set}" != xset ; then - FLTK_CONFIG="$fltk_exec_prefix/bin/fltk-config" + if test -n "$fltk_exec_prefix"; then + fltk_args="$fltk_args --exec-prefix=$fltk_exec_prefix" + if test "x${FLTK_CONFIG+set}" != xset ; then + FLTK_CONFIG="$fltk_exec_prefix/bin/fltk-config" + fi fi -fi -if test -n "$fltk_prefix"; then - fltk_args="$fltk_args --prefix=$fltk_prefix" - if test x${FLTK_CONFIG+set} != xset ; then - FLTK_CONFIG="$fltk_prefix/bin/fltk-config" + if test -n "$fltk_prefix"; then + fltk_args="$fltk_args --prefix=$fltk_prefix" + if test x${FLTK_CONFIG+set} != xset ; then + FLTK_CONFIG="$fltk_prefix/bin/fltk-config" + fi fi -fi + + AC_PATH_PROG(FLTK_CONFIG, fltk-config, no) + + warn_fltk_config="" + warn_fltk_opengl="" + + if test "$FLTK_CONFIG" = "no" ; then + warn_fltk_config="FLTK config script not found. Native graphics will be disabled." + else + FLTK_CFLAGS="`$FLTK_CONFIG $fltkconf_args --use-gl --cflags`" + FLTK_LDFLAGS="`$FLTK_CONFIG $fltkconf_args --use-gl --ldflags`" -AC_PATH_PROG(FLTK_CONFIG, fltk-config, no) + case "$canonical_host_type" in + *-*-mingw*) + FLTK_LDFLAGS="`echo $FLTK_LDFLAGS | sed -e 's/-mwindows//g'`" + ;; + esac -warn_fltk_config="" -warn_fltk_opengl="" + AC_MSG_CHECKING([for OpenGL support in FLTK]) + cat > conftest.cc <<EOF + #include <FL/gl.h> + int nothing=0; + EOF + $CXX $CXXFLAGS $FLTK_CFLAGS -c conftest.cc || \ + warn_fltk_opengl="FLTK does not have OpenGL support. Native graphics will be disabled." -if test "$FLTK_CONFIG" = "no" ; then - warn_fltk_config="FLTK config script not found. Native graphics will be disabled." + if test -z "$warn_fltk_opengl"; then + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_FLTK, 1, [Define if FLTK is available]) + GRAPHICS_CFLAGS="$FLTK_CFLAGS" + GRAPHICS_LIBS="$FLTK_LDFLAGS" + else + AC_MSG_RESULT(no) + fi + fi else - FLTK_CFLAGS="`$FLTK_CONFIG $fltkconf_args --use-gl --cflags`" - FLTK_LDFLAGS="`$FLTK_CONFIG $fltkconf_args --use-gl --ldflags`" - - case "$canonical_host_type" in - *-*-mingw*) - FLTK_LDFLAGS="`echo $FLTK_LDFLAGS | sed -e 's/-mwindows//g'`" - ;; - esac - - AC_MSG_CHECKING([for OpenGL support in FLTK]) - cat > conftest.cc <<EOF - #include <FL/gl.h> - int nothing=0; -EOF - $CXX $CXXFLAGS $FLTK_CFLAGS -c conftest.cc || \ - warn_fltk_opengl="FLTK does not have OpenGL support. Native graphics will be disabled." - - if test -z "$warn_fltk_opengl"; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_FLTK, 1, [Define if FLTK is available]) - GRAPHICS_CFLAGS="$FLTK_CFLAGS" - GRAPHICS_LIBS="$FLTK_LDFLAGS" - else - AC_MSG_RESULT(no) - fi + warn_fltk_opengl="OpenGL libs (GL and GLU) not found. Native graphics will be disabled." fi AC_SUBST(GRAPHICS_CFLAGS)