Mercurial > octave
comparison aclocal.m4 @ 9654:a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 18 Sep 2009 10:13:53 -0400 |
parents | 4531741e5236 |
children |
comparison
equal
deleted
inserted
replaced
9653:e087d7c77ff9 | 9654:a307a6f77fb3 |
---|---|
39 dnl ---------------------------------------------------------------------- | 39 dnl ---------------------------------------------------------------------- |
40 dnl | 40 dnl |
41 dnl Figure out the hardware-vendor-os info. | 41 dnl Figure out the hardware-vendor-os info. |
42 dnl | 42 dnl |
43 dnl OCTAVE_HOST_TYPE | 43 dnl OCTAVE_HOST_TYPE |
44 AC_DEFUN(OCTAVE_HOST_TYPE, | 44 AC_DEFUN([OCTAVE_HOST_TYPE], |
45 [AC_CANONICAL_HOST | 45 [AC_CANONICAL_HOST |
46 if test -z "$host"; then | 46 if test -z "$host"; then |
47 host=unknown | 47 host=unknown |
48 fi | 48 fi |
49 canonical_host_type=$host | 49 canonical_host_type=$host |
54 AC_SUBST(canonical_host_type)]) | 54 AC_SUBST(canonical_host_type)]) |
55 dnl | 55 dnl |
56 dnl Set default value for a variable and substitute it. | 56 dnl Set default value for a variable and substitute it. |
57 dnl | 57 dnl |
58 dnl OCTAVE_SET_DEFAULT | 58 dnl OCTAVE_SET_DEFAULT |
59 AC_DEFUN(OCTAVE_SET_DEFAULT, | 59 AC_DEFUN([OCTAVE_SET_DEFAULT], |
60 [ifelse($#, 2, [: ${$1=$2} | 60 [ifelse($#, 2, [: ${$1=$2} |
61 ])dnl | 61 ])dnl |
62 AC_MSG_RESULT([defining $1 to be $$1]) | 62 AC_MSG_RESULT([defining $1 to be $$1]) |
63 AC_SUBST($1)]) | 63 AC_SUBST($1)]) |
64 dnl | 64 dnl |
65 dnl Check for ar. | 65 dnl Check for ar. |
66 dnl | 66 dnl |
67 AC_DEFUN(OCTAVE_PROG_AR, | 67 AC_DEFUN([OCTAVE_PROG_AR], |
68 [if test -z "$AR"; then | 68 [if test -z "$AR"; then |
69 AR=ar | 69 AR=ar |
70 fi | 70 fi |
71 AC_SUBST(AR) | 71 AC_SUBST(AR) |
72 | 72 |
76 AC_SUBST(ARFLAGS) | 76 AC_SUBST(ARFLAGS) |
77 ]) | 77 ]) |
78 dnl | 78 dnl |
79 dnl See if the compiler supports placement delete | 79 dnl See if the compiler supports placement delete |
80 dnl | 80 dnl |
81 AC_DEFUN(OCTAVE_PLACEMENT_DELETE, | 81 AC_DEFUN([OCTAVE_PLACEMENT_DELETE], |
82 [AC_CACHE_CHECK([whether <new> defines placement delete operator], | 82 [AC_CACHE_CHECK([whether <new> defines placement delete operator], |
83 octave_cv_placement_delete, | 83 octave_cv_placement_delete, |
84 [AC_LANG_PUSH(C++) | 84 [AC_LANG_PUSH(C++) |
85 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <new>]], | 85 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <new>]], |
86 [[operator delete((void *)0, (void *)0);]])], | 86 [[operator delete((void *)0, (void *)0);]])], |
91 AC_LANG_POP(C++) | 91 AC_LANG_POP(C++) |
92 ]) | 92 ]) |
93 dnl | 93 dnl |
94 dnl See if the compiler dynamic auto arrays | 94 dnl See if the compiler dynamic auto arrays |
95 dnl | 95 dnl |
96 AC_DEFUN(OCTAVE_DYNAMIC_AUTO_ARRAYS, | 96 AC_DEFUN([OCTAVE_DYNAMIC_AUTO_ARRAYS], |
97 [AC_CACHE_CHECK([whether C++ supports dynamic auto arrays], | 97 [AC_CACHE_CHECK([whether C++ supports dynamic auto arrays], |
98 octave_cv_dynamic_auto_arrays, | 98 octave_cv_dynamic_auto_arrays, |
99 [AC_LANG_PUSH(C++) | 99 [AC_LANG_PUSH(C++) |
100 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], | 100 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], |
101 [[void test(char *); int length(); char x[length()]; test(x);]])], | 101 [[void test(char *); int length(); char x[length()]; test(x);]])], |
106 AC_LANG_POP(C++) | 106 AC_LANG_POP(C++) |
107 ]) | 107 ]) |
108 dnl | 108 dnl |
109 dnl Check for broken strptime | 109 dnl Check for broken strptime |
110 dnl | 110 dnl |
111 AC_DEFUN(OCTAVE_STRPTIME_BROKEN, | 111 AC_DEFUN([OCTAVE_STRPTIME_BROKEN], |
112 [AC_CACHE_CHECK([whether strptime is broken], | 112 [AC_CACHE_CHECK([whether strptime is broken], |
113 octave_cv_strptime_broken, | 113 octave_cv_strptime_broken, |
114 [AC_LANG_PUSH(C) | 114 [AC_LANG_PUSH(C) |
115 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ | 115 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ |
116 #define _XOPEN_SOURCE | 116 #define _XOPEN_SOURCE |
139 dnl | 139 dnl |
140 dnl Some BSD putenv's, e.g., FreeBSD, do malloc/free's on the environment. | 140 dnl Some BSD putenv's, e.g., FreeBSD, do malloc/free's on the environment. |
141 dnl This test program is due to Mike Hibler <mike@cs.utah.edu>. | 141 dnl This test program is due to Mike Hibler <mike@cs.utah.edu>. |
142 dnl We don't actually need to run this if we don't have putenv, but it | 142 dnl We don't actually need to run this if we don't have putenv, but it |
143 dnl doesn't hurt. | 143 dnl doesn't hurt. |
144 AC_DEFUN(OCTAVE_SMART_PUTENV, | 144 AC_DEFUN([OCTAVE_SMART_PUTENV], |
145 [AC_MSG_CHECKING(whether putenv uses malloc) | 145 [AC_MSG_CHECKING(whether putenv uses malloc) |
146 AC_CACHE_VAL(octave_cv_func_putenv_malloc, | 146 AC_CACHE_VAL(octave_cv_func_putenv_malloc, |
147 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ | 147 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
148 #define VAR "YOW_VAR" | 148 #define VAR "YOW_VAR" |
149 #define STRING1 "GabbaGabbaHey" | 149 #define STRING1 "GabbaGabbaHey" |
202 dnl | 202 dnl |
203 dnl These two checks for signal functions were originally part of the | 203 dnl These two checks for signal functions were originally part of the |
204 dnl aclocal.m4 file distributed with bash 2.0. | 204 dnl aclocal.m4 file distributed with bash 2.0. |
205 dnl | 205 dnl |
206 dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7) | 206 dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7) |
207 AC_DEFUN(OCTAVE_SIGNAL_CHECK, | 207 AC_DEFUN([OCTAVE_SIGNAL_CHECK], |
208 [AC_REQUIRE([AC_TYPE_SIGNAL]) | 208 [AC_REQUIRE([AC_TYPE_SIGNAL]) |
209 AC_MSG_CHECKING(for type of signal functions) | 209 AC_MSG_CHECKING(for type of signal functions) |
210 AC_CACHE_VAL(octave_cv_signal_vintage, | 210 AC_CACHE_VAL(octave_cv_signal_vintage, |
211 [ | 211 [ |
212 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>]], | 212 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>]], |
240 elif test "$octave_cv_signal_vintage" = svr3; then | 240 elif test "$octave_cv_signal_vintage" = svr3; then |
241 AC_DEFINE(HAVE_USG_SIGHOLD, 1, [Define if you have System V Release 3 signals.]) | 241 AC_DEFINE(HAVE_USG_SIGHOLD, 1, [Define if you have System V Release 3 signals.]) |
242 fi | 242 fi |
243 ]) | 243 ]) |
244 dnl | 244 dnl |
245 AC_DEFUN(OCTAVE_REINSTALL_SIGHANDLERS, | 245 AC_DEFUN([OCTAVE_REINSTALL_SIGHANDLERS], |
246 [AC_REQUIRE([AC_TYPE_SIGNAL]) | 246 [AC_REQUIRE([AC_TYPE_SIGNAL]) |
247 AC_REQUIRE([OCTAVE_SIGNAL_CHECK]) | 247 AC_REQUIRE([OCTAVE_SIGNAL_CHECK]) |
248 AC_MSG_CHECKING([if signal handlers must be reinstalled when invoked]) | 248 AC_MSG_CHECKING([if signal handlers must be reinstalled when invoked]) |
249 AC_CACHE_VAL(octave_cv_must_reinstall_sighandlers, | 249 AC_CACHE_VAL(octave_cv_must_reinstall_sighandlers, |
250 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ | 250 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
305 dnl | 305 dnl |
306 dnl Check to see if C++ compiler needs the new friend template declaration | 306 dnl Check to see if C++ compiler needs the new friend template declaration |
307 dnl syntax. | 307 dnl syntax. |
308 dnl | 308 dnl |
309 dnl OCTAVE_CXX_NEW_FRIEND_TEMPLATE_DECL | 309 dnl OCTAVE_CXX_NEW_FRIEND_TEMPLATE_DECL |
310 AC_DEFUN(OCTAVE_CXX_NEW_FRIEND_TEMPLATE_DECL, [ | 310 AC_DEFUN([OCTAVE_CXX_NEW_FRIEND_TEMPLATE_DECL], [ |
311 AC_REQUIRE([AC_PROG_CXX]) | 311 AC_REQUIRE([AC_PROG_CXX]) |
312 AC_MSG_CHECKING([for C++ support for new friend template declaration]) | 312 AC_MSG_CHECKING([for C++ support for new friend template declaration]) |
313 AC_CACHE_VAL(octave_cv_cxx_new_friend_template_decl, [ | 313 AC_CACHE_VAL(octave_cv_cxx_new_friend_template_decl, [ |
314 AC_LANG_PUSH(C++) | 314 AC_LANG_PUSH(C++) |
315 rm -f conftest.h | 315 rm -f conftest.h |
342 dnl two arguments are specified, execute the second arg as shell | 342 dnl two arguments are specified, execute the second arg as shell |
343 dnl commands. Otherwise, add FLAG to CFLAGS if the compiler accepts | 343 dnl commands. Otherwise, add FLAG to CFLAGS if the compiler accepts |
344 dnl the flag. | 344 dnl the flag. |
345 dnl | 345 dnl |
346 dnl OCTAVE_CC_FLAG | 346 dnl OCTAVE_CC_FLAG |
347 AC_DEFUN(OCTAVE_CC_FLAG, [ | 347 AC_DEFUN([OCTAVE_CC_FLAG], [ |
348 ac_safe=`echo "$1" | sed 'y%./+-:=%__p___%'` | 348 ac_safe=`echo "$1" | sed 'y%./+-:=%__p___%'` |
349 AC_MSG_CHECKING(whether ${CC-cc} accepts $1) | 349 AC_MSG_CHECKING(whether ${CC-cc} accepts $1) |
350 AC_CACHE_VAL(octave_cv_cc_flag_$ac_safe, [ | 350 AC_CACHE_VAL(octave_cv_cc_flag_$ac_safe, [ |
351 AC_LANG_PUSH(C) | 351 AC_LANG_PUSH(C) |
352 XCFLAGS="$CFLAGS" | 352 XCFLAGS="$CFLAGS" |
372 dnl two arguments are specified, execute the second arg as shell | 372 dnl two arguments are specified, execute the second arg as shell |
373 dnl commands. Otherwise, add FLAG to CXXFLAGS if the compiler accepts | 373 dnl commands. Otherwise, add FLAG to CXXFLAGS if the compiler accepts |
374 dnl the flag. | 374 dnl the flag. |
375 dnl | 375 dnl |
376 dnl OCTAVE_CXX_FLAG | 376 dnl OCTAVE_CXX_FLAG |
377 AC_DEFUN(OCTAVE_CXX_FLAG, [ | 377 AC_DEFUN([OCTAVE_CXX_FLAG], [ |
378 ac_safe=`echo "$1" | sed 'y%./+-:=%__p___%'` | 378 ac_safe=`echo "$1" | sed 'y%./+-:=%__p___%'` |
379 AC_MSG_CHECKING(whether ${CXX-g++} accepts $1) | 379 AC_MSG_CHECKING(whether ${CXX-g++} accepts $1) |
380 AC_CACHE_VAL(octave_cv_cxx_flag_$ac_safe, [ | 380 AC_CACHE_VAL(octave_cv_cxx_flag_$ac_safe, [ |
381 AC_LANG_PUSH(C++) | 381 AC_LANG_PUSH(C++) |
382 XCXXFLAGS="$CXXFLAGS" | 382 XCXXFLAGS="$CXXFLAGS" |
402 dnl two arguments are specified, execute the second arg as shell | 402 dnl two arguments are specified, execute the second arg as shell |
403 dnl commands. Otherwise, add FLAG to FFLAGS if the compiler accepts | 403 dnl commands. Otherwise, add FLAG to FFLAGS if the compiler accepts |
404 dnl the flag. | 404 dnl the flag. |
405 dnl | 405 dnl |
406 dnl OCTAVE_F77_FLAG | 406 dnl OCTAVE_F77_FLAG |
407 AC_DEFUN(OCTAVE_F77_FLAG, [ | 407 AC_DEFUN([OCTAVE_F77_FLAG], [ |
408 ac_safe=`echo "$1" | sed 'y%./+-:=%__p___%'` | 408 ac_safe=`echo "$1" | sed 'y%./+-:=%__p___%'` |
409 AC_MSG_CHECKING(whether ${F77-g77} accepts $1) | 409 AC_MSG_CHECKING(whether ${F77-g77} accepts $1) |
410 AC_CACHE_VAL(octave_cv_f77_flag_$ac_safe, [ | 410 AC_CACHE_VAL(octave_cv_f77_flag_$ac_safe, [ |
411 AC_LANG_PUSH(Fortran 77) | 411 AC_LANG_PUSH(Fortran 77) |
412 XFFLAGS="$FFLAGS" | 412 XFFLAGS="$FFLAGS" |
428 fi | 428 fi |
429 ]) | 429 ]) |
430 dnl | 430 dnl |
431 dnl Check to see whether the default Fortran INTEGER is 64 bits wide. | 431 dnl Check to see whether the default Fortran INTEGER is 64 bits wide. |
432 dnl | 432 dnl |
433 AC_DEFUN(OCTAVE_CHECK_FORTRAN_INTEGER_SIZE, [ | 433 AC_DEFUN([OCTAVE_CHECK_FORTRAN_INTEGER_SIZE], [ |
434 AC_LANG_PUSH(Fortran 77) | 434 AC_LANG_PUSH(Fortran 77) |
435 AC_CACHE_CHECK([whether $F77 generates correct size integers], | 435 AC_CACHE_CHECK([whether $F77 generates correct size integers], |
436 [octave_cv_fortran_integer_size], | 436 [octave_cv_fortran_integer_size], |
437 [AC_COMPILE_IFELSE( | 437 [AC_COMPILE_IFELSE( |
438 [ subroutine foo(n, in, out) | 438 [ subroutine foo(n, in, out) |
481 dnl | 481 dnl |
482 dnl | 482 dnl |
483 dnl | 483 dnl |
484 dnl OCTAVE_CHECK_LIBRARY(LIBRARY, DOC-NAME, WARN-MSG, HEADER, FUNC, | 484 dnl OCTAVE_CHECK_LIBRARY(LIBRARY, DOC-NAME, WARN-MSG, HEADER, FUNC, |
485 dnl LANG, DOC-STRING, EXTRA-CHECK) | 485 dnl LANG, DOC-STRING, EXTRA-CHECK) |
486 AC_DEFUN(OCTAVE_CHECK_LIBRARY, [ | 486 AC_DEFUN([OCTAVE_CHECK_LIBRARY], [ |
487 AC_ARG_WITH([$1-includedir], | 487 AC_ARG_WITH([$1-includedir], |
488 [AS_HELP_STRING([--with-$1-includedir=DIR], | 488 [AS_HELP_STRING([--with-$1-includedir=DIR], |
489 [look for $2 include files in DIR])], | 489 [look for $2 include files in DIR])], |
490 [m4_toupper([$1])_CPPFLAGS="-I$withval"]) | 490 [m4_toupper([$1])_CPPFLAGS="-I$withval"]) |
491 AC_SUBST(m4_toupper([$1])_CPPFLAGS) | 491 AC_SUBST(m4_toupper([$1])_CPPFLAGS) |
558 fi | 558 fi |
559 ]) | 559 ]) |
560 dnl | 560 dnl |
561 dnl Check for flex | 561 dnl Check for flex |
562 dnl | 562 dnl |
563 AC_DEFUN(OCTAVE_PROG_FLEX, [ | 563 AC_DEFUN([OCTAVE_PROG_FLEX], [ |
564 ### For now, don't define LEXLIB to be -lfl -- we don't use anything in | 564 ### For now, don't define LEXLIB to be -lfl -- we don't use anything in |
565 ### it, and it might not be installed. | 565 ### it, and it might not be installed. |
566 ### | 566 ### |
567 ### Also make sure that we generate an interactive scanner if we are | 567 ### Also make sure that we generate an interactive scanner if we are |
568 ### using flex. | 568 ### using flex. |
582 AC_SUBST(LFLAGS) | 582 AC_SUBST(LFLAGS) |
583 ]) | 583 ]) |
584 dnl | 584 dnl |
585 dnl Check for bison | 585 dnl Check for bison |
586 dnl | 586 dnl |
587 AC_DEFUN(OCTAVE_PROG_BISON, [ | 587 AC_DEFUN([OCTAVE_PROG_BISON], [ |
588 AC_PROG_YACC | 588 AC_PROG_YACC |
589 case "$YACC" in | 589 case "$YACC" in |
590 bison*) | 590 bison*) |
591 ;; | 591 ;; |
592 *) | 592 *) |
597 esac | 597 esac |
598 ]) | 598 ]) |
599 dnl | 599 dnl |
600 dnl What pager should we use? | 600 dnl What pager should we use? |
601 dnl | 601 dnl |
602 AC_DEFUN(OCTAVE_PROG_PAGER, | 602 AC_DEFUN([OCTAVE_PROG_PAGER], |
603 [if test "$cross_compiling" = yes; then | 603 [if test "$cross_compiling" = yes; then |
604 DEFAULT_PAGER=less | 604 DEFAULT_PAGER=less |
605 AC_MSG_RESULT(assuming $DEFAULT_PAGER exists on $canonical_host_type host) | 605 AC_MSG_RESULT(assuming $DEFAULT_PAGER exists on $canonical_host_type host) |
606 AC_SUBST(DEFAULT_PAGER) | 606 AC_SUBST(DEFAULT_PAGER) |
607 else | 607 else |
620 fi | 620 fi |
621 ]) | 621 ]) |
622 dnl | 622 dnl |
623 dnl Does gnuplot exist? | 623 dnl Does gnuplot exist? |
624 dnl | 624 dnl |
625 AC_DEFUN(OCTAVE_PROG_GNUPLOT, [ | 625 AC_DEFUN([OCTAVE_PROG_GNUPLOT], [ |
626 case "$canonical_host_type" in | 626 case "$canonical_host_type" in |
627 *-*-cygwin* | *-*-mingw32* | *-*-msdosmsvc) | 627 *-*-cygwin* | *-*-mingw32* | *-*-msdosmsvc) |
628 gp_names="pgnuplot pipe-gnuplot gnuplot" | 628 gp_names="pgnuplot pipe-gnuplot gnuplot" |
629 gp_default=pgnuplot | 629 gp_default=pgnuplot |
630 ;; | 630 ;; |
664 ]) | 664 ]) |
665 dnl | 665 dnl |
666 dnl Is gperf installed? | 666 dnl Is gperf installed? |
667 dnl | 667 dnl |
668 dnl OCTAVE_PROG_GPERF | 668 dnl OCTAVE_PROG_GPERF |
669 AC_DEFUN(OCTAVE_PROG_GPERF, [ | 669 AC_DEFUN([OCTAVE_PROG_GPERF], [ |
670 AC_CHECK_PROG(GPERF, gperf, gperf, []) | 670 AC_CHECK_PROG(GPERF, gperf, gperf, []) |
671 if test -z "$GPERF"; then | 671 if test -z "$GPERF"; then |
672 GPERF='$(top_srcdir)/missing gperf' | 672 GPERF='$(top_srcdir)/missing gperf' |
673 warn_gperf="I didn't find gperf, but it's only a problem if you need to reconstruct oct-gperf.h" | 673 warn_gperf="I didn't find gperf, but it's only a problem if you need to reconstruct oct-gperf.h" |
674 AC_MSG_WARN($warn_gperf) | 674 AC_MSG_WARN($warn_gperf) |
677 ]) | 677 ]) |
678 dnl | 678 dnl |
679 dnl Is ghostscript installed? | 679 dnl Is ghostscript installed? |
680 dnl | 680 dnl |
681 dnl OCTAVE_PROG_GHOSTSCRIPT | 681 dnl OCTAVE_PROG_GHOSTSCRIPT |
682 AC_DEFUN(OCTAVE_PROG_GHOSTSCRIPT, [ | 682 AC_DEFUN([OCTAVE_PROG_GHOSTSCRIPT], [ |
683 case "$canonical_host_type" in | 683 case "$canonical_host_type" in |
684 *-*-cygwin* | *-*-mingw32* | *-*-msdosmsvc) | 684 *-*-cygwin* | *-*-mingw32* | *-*-msdosmsvc) |
685 gs_names="gs gswin32" | 685 gs_names="gs gswin32" |
686 ;; | 686 ;; |
687 *) | 687 *) |
698 ]) | 698 ]) |
699 dnl | 699 dnl |
700 dnl Is makeinfo installed? | 700 dnl Is makeinfo installed? |
701 dnl | 701 dnl |
702 dnl OCTAVE_PROG_MAKEINFO | 702 dnl OCTAVE_PROG_MAKEINFO |
703 AC_DEFUN(OCTAVE_PROG_MAKEINFO, [ | 703 AC_DEFUN([OCTAVE_PROG_MAKEINFO], [ |
704 AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, []) | 704 AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, []) |
705 if test -z "$MAKEINFO"; then | 705 if test -z "$MAKEINFO"; then |
706 MAKEINFO='$(top_srcdir)/missing makeinfo' | 706 MAKEINFO='$(top_srcdir)/missing makeinfo' |
707 warn_makeinfo="I didn't find makeinfo, but it's only a problem if you need to reconstruct the Info version of the manual" | 707 warn_makeinfo="I didn't find makeinfo, but it's only a problem if you need to reconstruct the Info version of the manual" |
708 AC_MSG_WARN($warn_makeinfo) | 708 AC_MSG_WARN($warn_makeinfo) |
711 ]) | 711 ]) |
712 dnl | 712 dnl |
713 dnl Is texi2dvi installed? | 713 dnl Is texi2dvi installed? |
714 dnl | 714 dnl |
715 dnl OCTAVE_PROG_TEXI2DVI | 715 dnl OCTAVE_PROG_TEXI2DVI |
716 AC_DEFUN(OCTAVE_PROG_TEXI2DVI, [ | 716 AC_DEFUN([OCTAVE_PROG_TEXI2DVI], [ |
717 AC_CHECK_PROG(TEXI2DVI, texi2dvi, texi2dvi, []) | 717 AC_CHECK_PROG(TEXI2DVI, texi2dvi, texi2dvi, []) |
718 if test -z "$TEXI2DVI"; then | 718 if test -z "$TEXI2DVI"; then |
719 TEXI2DVI='$(top_srcdir)/missing texi2dvi' | 719 TEXI2DVI='$(top_srcdir)/missing texi2dvi' |
720 warn_texi2dvi="I didn't find texi2dvi, but it's only a problem if you need to reconstruct the DVI version of the manual" | 720 warn_texi2dvi="I didn't find texi2dvi, but it's only a problem if you need to reconstruct the DVI version of the manual" |
721 AC_MSG_WARN($warn_texi2dvi) | 721 AC_MSG_WARN($warn_texi2dvi) |
724 ]) | 724 ]) |
725 dnl | 725 dnl |
726 dnl Is texi2pdf installed? | 726 dnl Is texi2pdf installed? |
727 dnl | 727 dnl |
728 dnl OCTAVE_PROG_TEXI2PDF | 728 dnl OCTAVE_PROG_TEXI2PDF |
729 AC_DEFUN(OCTAVE_PROG_TEXI2PDF, [ | 729 AC_DEFUN([OCTAVE_PROG_TEXI2PDF], [ |
730 AC_REQUIRE([OCTAVE_PROG_TEXI2DVI]) | 730 AC_REQUIRE([OCTAVE_PROG_TEXI2DVI]) |
731 AC_CHECK_PROG(TEXI2PDF, texi2pdf, texi2pdf, []) | 731 AC_CHECK_PROG(TEXI2PDF, texi2pdf, texi2pdf, []) |
732 if test -z "$TEXI2PDF"; then | 732 if test -z "$TEXI2PDF"; then |
733 missing=true; | 733 missing=true; |
734 if test -n "$TEXI2DVI"; then | 734 if test -n "$TEXI2DVI"; then |
748 dnl | 748 dnl |
749 dnl See if the C++ library is ISO compliant. | 749 dnl See if the C++ library is ISO compliant. |
750 dnl FIXME: This is obviously very simplistic, and trivially fooled. | 750 dnl FIXME: This is obviously very simplistic, and trivially fooled. |
751 dnl | 751 dnl |
752 dnl OCTAVE_CXX_ISO_COMPLIANT_LIBRARY | 752 dnl OCTAVE_CXX_ISO_COMPLIANT_LIBRARY |
753 AC_DEFUN(OCTAVE_CXX_ISO_COMPLIANT_LIBRARY, [ | 753 AC_DEFUN([OCTAVE_CXX_ISO_COMPLIANT_LIBRARY], [ |
754 AC_REQUIRE([AC_PROG_CXX]) | 754 AC_REQUIRE([AC_PROG_CXX]) |
755 AC_MSG_CHECKING([if C++ library is ISO compliant]) | 755 AC_MSG_CHECKING([if C++ library is ISO compliant]) |
756 AC_CACHE_VAL(octave_cv_cxx_iso_compliant_library, [ | 756 AC_CACHE_VAL(octave_cv_cxx_iso_compliant_library, [ |
757 AC_LANG_PUSH(C++) | 757 AC_LANG_PUSH(C++) |
758 rm -f conftest.h | 758 rm -f conftest.h |
784 dnl | 784 dnl |
785 dnl Allow the user disable support for command line editing using GNU | 785 dnl Allow the user disable support for command line editing using GNU |
786 dnl readline. | 786 dnl readline. |
787 dnl | 787 dnl |
788 dnl OCTAVE_ENABLE_READLINE | 788 dnl OCTAVE_ENABLE_READLINE |
789 AC_DEFUN(OCTAVE_ENABLE_READLINE, [ | 789 AC_DEFUN([OCTAVE_ENABLE_READLINE], [ |
790 USE_READLINE=true | 790 USE_READLINE=true |
791 READLINE_LIBS= | 791 READLINE_LIBS= |
792 AC_ARG_ENABLE(readline, | 792 AC_ARG_ENABLE(readline, |
793 [ --enable-readline use readline library (default is yes)], | 793 [ --enable-readline use readline library (default is yes)], |
794 [if test "$enableval" = no; then | 794 [if test "$enableval" = no; then |
812 dnl | 812 dnl |
813 dnl Check to see if C++ reintrepret cast works for function pointers. | 813 dnl Check to see if C++ reintrepret cast works for function pointers. |
814 dnl | 814 dnl |
815 dnl OCTAVE_CXX_BROKEN_REINTERPRET_CAST | 815 dnl OCTAVE_CXX_BROKEN_REINTERPRET_CAST |
816 dnl | 816 dnl |
817 AC_DEFUN(OCTAVE_CXX_BROKEN_REINTERPRET_CAST, [ | 817 AC_DEFUN([OCTAVE_CXX_BROKEN_REINTERPRET_CAST], [ |
818 AC_REQUIRE([AC_PROG_CXX]) | 818 AC_REQUIRE([AC_PROG_CXX]) |
819 AC_LANG_PUSH(C++) | 819 AC_LANG_PUSH(C++) |
820 AC_CACHE_CHECK([for broken C++ reinterpret_cast], | 820 AC_CACHE_CHECK([for broken C++ reinterpret_cast], |
821 octave_cv_cxx_broken_reinterpret_cast, [ | 821 octave_cv_cxx_broken_reinterpret_cast, [ |
822 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <cmath>]], [[ | 822 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <cmath>]], [[ |
831 fi | 831 fi |
832 AC_LANG_POP(C++)]) | 832 AC_LANG_POP(C++)]) |
833 dnl | 833 dnl |
834 dnl Determine if mkdir accepts only one argument instead dnl of the usual 2. | 834 dnl Determine if mkdir accepts only one argument instead dnl of the usual 2. |
835 dnl | 835 dnl |
836 AC_DEFUN(OCTAVE_MKDIR_TAKES_ONE_ARG, [ | 836 AC_DEFUN([OCTAVE_MKDIR_TAKES_ONE_ARG], [ |
837 AC_LANG_PUSH(C++) | 837 AC_LANG_PUSH(C++) |
838 AC_CACHE_CHECK([if mkdir takes one argument], octave_cv_mkdir_takes_one_arg, | 838 AC_CACHE_CHECK([if mkdir takes one argument], octave_cv_mkdir_takes_one_arg, |
839 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> | 839 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
840 #ifdef HAVE_SYS_STAT_H | 840 #ifdef HAVE_SYS_STAT_H |
841 # include <sys/stat.h> | 841 # include <sys/stat.h> |
929 ]) | 929 ]) |
930 dnl | 930 dnl |
931 dnl Find Perl. | 931 dnl Find Perl. |
932 dnl | 932 dnl |
933 dnl OCTAVE_PROG_PERL | 933 dnl OCTAVE_PROG_PERL |
934 AC_DEFUN(OCTAVE_PROG_PERL, | 934 AC_DEFUN([OCTAVE_PROG_PERL], |
935 [AC_CHECK_PROG(PERL, perl, perl, []) | 935 [AC_CHECK_PROG(PERL, perl, perl, []) |
936 AC_SUBST(PERL) | 936 AC_SUBST(PERL) |
937 ]) | 937 ]) |
938 dnl | 938 dnl |
939 dnl Find Python. | 939 dnl Find Python. |
940 dnl | 940 dnl |
941 dnl OCTAVE_PROG_PYTHON | 941 dnl OCTAVE_PROG_PYTHON |
942 AC_DEFUN(OCTAVE_PROG_PYTHON, | 942 AC_DEFUN([OCTAVE_PROG_PYTHON], |
943 [AC_CHECK_PROG(PYTHON, python, python, []) | 943 [AC_CHECK_PROG(PYTHON, python, python, []) |
944 AC_SUBST(PYTHON) | 944 AC_SUBST(PYTHON) |
945 ]) | 945 ]) |
946 dnl | 946 dnl |
947 dnl Find desktop-file-install. | 947 dnl Find desktop-file-install. |
948 dnl | 948 dnl |
949 dnl OCTAVE_PROG_DESKTOP_FILE_INSTALL | 949 dnl OCTAVE_PROG_DESKTOP_FILE_INSTALL |
950 AC_DEFUN(OCTAVE_PROG_DESKTOP_FILE_INSTALL, | 950 AC_DEFUN([OCTAVE_PROG_DESKTOP_FILE_INSTALL], |
951 [AC_CHECK_PROG(DESKTOP_FILE_INSTALL, desktop-file-install, desktop-file-install, []) | 951 [AC_CHECK_PROG(DESKTOP_FILE_INSTALL, desktop-file-install, desktop-file-install, []) |
952 AC_SUBST(DESKTOP_FILE_INSTALL) | 952 AC_SUBST(DESKTOP_FILE_INSTALL) |
953 ]) | 953 ]) |
954 dnl | 954 dnl |
955 dnl Check for IEEE 754 data format. | 955 dnl Check for IEEE 754 data format. |
1077 fi | 1077 fi |
1078 ]) | 1078 ]) |
1079 dnl | 1079 dnl |
1080 dnl Check for the QHull version. | 1080 dnl Check for the QHull version. |
1081 dnl | 1081 dnl |
1082 AC_DEFUN(OCTAVE_CHECK_QHULL_VERSION, | 1082 AC_DEFUN([OCTAVE_CHECK_QHULL_VERSION], |
1083 [AC_CACHE_CHECK([for qh_version in $QHULL_LIBS], | 1083 [AC_CACHE_CHECK([for qh_version in $QHULL_LIBS], |
1084 octave_cv_lib_qhull_version, [ | 1084 octave_cv_lib_qhull_version, [ |
1085 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ | 1085 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
1086 #include <qhull/qhull_a.h> | 1086 #include <qhull/qhull_a.h> |
1087 ]], [[ | 1087 ]], [[ |
1093 fi | 1093 fi |
1094 ]) | 1094 ]) |
1095 dnl | 1095 dnl |
1096 dnl Check whether QHull works (does not crash) | 1096 dnl Check whether QHull works (does not crash) |
1097 dnl | 1097 dnl |
1098 AC_DEFUN(OCTAVE_CHECK_QHULL_OK, | 1098 AC_DEFUN([OCTAVE_CHECK_QHULL_OK], |
1099 [AC_CACHE_CHECK([whether the qhull library works], | 1099 [AC_CACHE_CHECK([whether the qhull library works], |
1100 octave_cv_lib_qhull_ok, [ | 1100 octave_cv_lib_qhull_ok, [ |
1101 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ | 1101 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ |
1102 #include <stdio.h> | 1102 #include <stdio.h> |
1103 #include <qhull/qhull.h> | 1103 #include <qhull/qhull.h> |
1191 ]) | 1191 ]) |
1192 dnl | 1192 dnl |
1193 dnl See if function gluTessCallback is called with "(...)" | 1193 dnl See if function gluTessCallback is called with "(...)" |
1194 dnl | 1194 dnl |
1195 dnl OCTAVE_GLUTESSCALLBACK_THREEDOTS | 1195 dnl OCTAVE_GLUTESSCALLBACK_THREEDOTS |
1196 AC_DEFUN(OCTAVE_GLUTESSCALLBACK_THREEDOTS, | 1196 AC_DEFUN([OCTAVE_GLUTESSCALLBACK_THREEDOTS], |
1197 [AC_CACHE_CHECK([whether gluTessCallback is called with "(...)"], | 1197 [AC_CACHE_CHECK([whether gluTessCallback is called with "(...)"], |
1198 octave_cv_glutesscallback_threedots, | 1198 octave_cv_glutesscallback_threedots, |
1199 [AC_LANG_PUSH(C++) | 1199 [AC_LANG_PUSH(C++) |
1200 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | 1200 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
1201 #ifdef HAVE_GL_GLU_H | 1201 #ifdef HAVE_GL_GLU_H |
1510 dnl Add options (lower case letters $1) "--with-framework-$1" and | 1510 dnl Add options (lower case letters $1) "--with-framework-$1" and |
1511 dnl "--without-framework-$1". If this test is successful then perform | 1511 dnl "--without-framework-$1". If this test is successful then perform |
1512 dnl $4, otherwise do $5. | 1512 dnl $4, otherwise do $5. |
1513 dnl | 1513 dnl |
1514 dnl OCTAVE_HAVE_FRAMEWORK | 1514 dnl OCTAVE_HAVE_FRAMEWORK |
1515 AC_DEFUN(OCTAVE_HAVE_FRAMEWORK, [ | 1515 AC_DEFUN([OCTAVE_HAVE_FRAMEWORK], [ |
1516 AC_MSG_CHECKING(whether ${LD-ld} accepts -framework $1) | 1516 AC_MSG_CHECKING(whether ${LD-ld} accepts -framework $1) |
1517 AC_CACHE_VAL(octave_cv_framework_$1, [ | 1517 AC_CACHE_VAL(octave_cv_framework_$1, [ |
1518 XLDFLAGS="$LDFLAGS" | 1518 XLDFLAGS="$LDFLAGS" |
1519 LDFLAGS="$LDFLAGS -framework $1" | 1519 LDFLAGS="$LDFLAGS -framework $1" |
1520 AC_LANG_PUSH(C++) | 1520 AC_LANG_PUSH(C++) |
1543 ]) | 1543 ]) |
1544 dnl | 1544 dnl |
1545 dnl Do we have a working c99 vsnprintf function? | 1545 dnl Do we have a working c99 vsnprintf function? |
1546 dnl | 1546 dnl |
1547 dnl OCTAVE_HAVE_C99_VSNPRINTF | 1547 dnl OCTAVE_HAVE_C99_VSNPRINTF |
1548 AC_DEFUN(OCTAVE_HAVE_C99_VSNPRINTF, [ | 1548 AC_DEFUN([OCTAVE_HAVE_C99_VSNPRINTF], [ |
1549 AC_CACHE_CHECK([for c99 vsnprintf], [oct_cv_c99_vsnprintf], | 1549 AC_CACHE_CHECK([for c99 vsnprintf], [oct_cv_c99_vsnprintf], |
1550 [AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> | 1550 [AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> |
1551 #include <stdarg.h> | 1551 #include <stdarg.h> |
1552 #include <stdlib.h> | 1552 #include <stdlib.h> |
1553 | 1553 |