comparison aclocal.m4 @ 8659:9792c26bffc7

configure: check whether qhull works
author Jaroslav Hajek <highegg@gmail.com>
date Wed, 04 Feb 2009 10:18:20 +0100
parents bef8f001032f
children 22462fd58e66
comparison
equal deleted inserted replaced
8658:73c4516fae10 8659:9792c26bffc7
953 AC_MSG_RESULT(no) 953 AC_MSG_RESULT(no)
954 ifelse([$2], , , [$2]) 954 ifelse([$2], , , [$2])
955 fi 955 fi
956 ]) 956 ])
957 dnl 957 dnl
958 dnl Check whether QHull works (does not crash)
959 dnl
960 AC_DEFUN(AC_CHECK_QHULL_OK,
961 [AC_MSG_CHECKING([whether the qhull library works])
962 AC_CACHE_VAL(octave_cv_lib_qhull_ok,
963 [
964 save_LIBS="$LIBS"
965 LIBS="$LIBS -lqhull -lm"
966 AC_RUN_IFELSE([AC_LANG_SOURCE([[
967 #include <stdio.h>
968 #include <qhull/qhull.h>
969
970 #ifdef NEED_QHULL_VERSION
971 char *qh_version = "version";
972 #endif
973 int main()
974 {
975 int dim = 2, n = 4;
976 coordT points[8] = { -0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, 0.5 };
977 boolT ismalloc = 0;
978
979 return qh_new_qhull (dim, n, points, ismalloc, "qhull ", 0, stderr);
980 }
981 ]])],
982 [octave_cv_lib_qhull_ok=yes],
983 [octave_cv_lib_qhull_ok=no],
984 [octave_cv_lib_qhull_ok=yes])
985 LIBS="$save_LIBS"
986 ])
987 if test "$octave_cv_lib_qhull_ok" = "yes"; then
988 AC_MSG_RESULT(yes)
989 ifelse([$1], , , [$1])
990 else
991 AC_MSG_RESULT(no)
992 ifelse([$2], , , [$2])
993 fi
994 ])
995 dnl
958 dnl Check for OpenGL. If found, define OPENGL_LIBS 996 dnl Check for OpenGL. If found, define OPENGL_LIBS
959 dnl 997 dnl
960 dnl FIXME -- add tests for apple 998 dnl FIXME -- add tests for apple
961 dnl 999 dnl
962 AC_DEFUN([OCTAVE_OPENGL], [ 1000 AC_DEFUN([OCTAVE_OPENGL], [