Mercurial > octave
comparison configure.ac @ 12450:47612d3e7077
use AC_COMPILE_IFELSE to check for OpenGL support in FLTK
author | Benjamin Lindner <lindnerb@users.sourceforge.net> |
---|---|
date | Tue, 15 Feb 2011 12:53:17 -0500 |
parents | af2b18354a8e |
children | c6c3fdbfede2 |
comparison
equal
deleted
inserted
replaced
12449:2f0d1e12806d | 12450:47612d3e7077 |
---|---|
912 FLTK_LDFLAGS="`echo $FLTK_LDFLAGS | sed -e 's/-mwindows//g'`" | 912 FLTK_LDFLAGS="`echo $FLTK_LDFLAGS | sed -e 's/-mwindows//g'`" |
913 ;; | 913 ;; |
914 esac | 914 esac |
915 | 915 |
916 AC_MSG_CHECKING([for OpenGL support in FLTK]) | 916 AC_MSG_CHECKING([for OpenGL support in FLTK]) |
917 cat > conftest.cc <<EOF | 917 save_CFLAGS="$CFLAGS" |
918 #include <FL/gl.h> | 918 CFLAGS="$CFLAGS $FLTK_CFLAGS" |
919 int nothing=0; | 919 AC_COMPILE_IFELSE( |
920 EOF | 920 AC_LANG_PROGRAM([[#include <FL/gl.h>]], [[int nothing = 0;]]), |
921 $CXX $CXXFLAGS $FLTK_CFLAGS -c conftest.cc || \ | 921 [ |
922 warn_fltk_opengl="FLTK does not have OpenGL support. Native graphics will be disabled." | 922 AC_MSG_RESULT([no]) |
923 | 923 warn_fltk_opengl="FLTK does not have OpenGL support. Native graphics will be disabled." |
924 ],[ | |
925 AC_DEFINE(HAVE_FLTK, 1, [Define if FLTK is available]) | |
926 AC_MSG_RESULT([yes]) | |
927 ]) | |
928 | |
924 if test -z "$warn_fltk_opengl"; then | 929 if test -z "$warn_fltk_opengl"; then |
925 AC_MSG_RESULT(yes) | |
926 AC_DEFINE(HAVE_FLTK, 1, [Define if FLTK is available]) | |
927 GRAPHICS_CFLAGS="$FLTK_CFLAGS" | 930 GRAPHICS_CFLAGS="$FLTK_CFLAGS" |
928 GRAPHICS_LIBS="$FLTK_LDFLAGS" | 931 GRAPHICS_LIBS="$FLTK_LDFLAGS" |
929 else | |
930 AC_MSG_RESULT(no) | |
931 fi | 932 fi |
933 CFLAGS="$save_CFLAGS" | |
932 fi | 934 fi |
933 fi | 935 fi |
934 | 936 |
935 AC_SUBST(GRAPHICS_CFLAGS) | 937 AC_SUBST(GRAPHICS_CFLAGS) |
936 AC_SUBST(GRAPHICS_LIBS) | 938 AC_SUBST(GRAPHICS_LIBS) |