Mercurial > hg > octave-avbm
comparison aclocal.m4 @ 5844:034cdbd34c0a
[project @ 2006-06-07 15:38:58 by jwe]
author | jwe |
---|---|
date | Wed, 07 Jun 2006 15:38:58 +0000 |
parents | ecb61a521d5b |
children | 68f8017ef077 |
comparison
equal
deleted
inserted
replaced
5843:393100dce990 | 5844:034cdbd34c0a |
---|---|
76 dnl | 76 dnl |
77 AC_DEFUN(OCTAVE_STRING_NPOS, | 77 AC_DEFUN(OCTAVE_STRING_NPOS, |
78 [AC_CACHE_CHECK([whether including <string> defines NPOS], | 78 [AC_CACHE_CHECK([whether including <string> defines NPOS], |
79 octave_cv_string_npos, | 79 octave_cv_string_npos, |
80 [AC_LANG_PUSH(C++) | 80 [AC_LANG_PUSH(C++) |
81 AC_TRY_COMPILE([#include <string>], | 81 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <string>]], |
82 [size_t foo = NPOS], | 82 [[size_t foo = NPOS]])], |
83 octave_cv_string_npos=yes, octave_cv_string_npos=no)]) | 83 octave_cv_string_npos=yes, octave_cv_string_npos=no)]) |
84 if test $octave_cv_string_npos = no; then | 84 if test $octave_cv_string_npos = no; then |
85 AC_DEFINE(NPOS, [std::string::npos], [Define (to string::npos) if <string> doesn't]) | 85 AC_DEFINE(NPOS, [std::string::npos], [Define (to string::npos) if <string> doesn't]) |
86 fi | 86 fi |
87 AC_LANG_POP(C++) | 87 AC_LANG_POP(C++) |
91 dnl | 91 dnl |
92 AC_DEFUN(OCTAVE_PLACEMENT_DELETE, | 92 AC_DEFUN(OCTAVE_PLACEMENT_DELETE, |
93 [AC_CACHE_CHECK([whether <new> defines placement delete operator], | 93 [AC_CACHE_CHECK([whether <new> defines placement delete operator], |
94 octave_cv_placement_delete, | 94 octave_cv_placement_delete, |
95 [AC_LANG_PUSH(C++) | 95 [AC_LANG_PUSH(C++) |
96 AC_TRY_COMPILE([#include <new>], | 96 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <new>]], |
97 [operator delete((void *)0, (void *)0);], | 97 [[operator delete((void *)0, (void *)0);]])], |
98 octave_cv_placement_delete=yes, octave_cv_placement_delete=no)]) | 98 octave_cv_placement_delete=yes, octave_cv_placement_delete=no)]) |
99 if test $octave_cv_placement_delete = yes; then | 99 if test $octave_cv_placement_delete = yes; then |
100 AC_DEFINE(HAVE_PLACEMENT_DELETE,1,[Define if C++ supports operator delete(void *, void *)]) | 100 AC_DEFINE(HAVE_PLACEMENT_DELETE,1,[Define if C++ supports operator delete(void *, void *)]) |
101 fi | 101 fi |
102 AC_LANG_POP(C++) | 102 AC_LANG_POP(C++) |
106 dnl | 106 dnl |
107 AC_DEFUN(OCTAVE_DYNAMIC_AUTO_ARRAYS, | 107 AC_DEFUN(OCTAVE_DYNAMIC_AUTO_ARRAYS, |
108 [AC_CACHE_CHECK([whether C++ supports dynamic auto arrays], | 108 [AC_CACHE_CHECK([whether C++ supports dynamic auto arrays], |
109 octave_cv_dynamic_auto_arrays, | 109 octave_cv_dynamic_auto_arrays, |
110 [AC_LANG_PUSH(C++) | 110 [AC_LANG_PUSH(C++) |
111 AC_TRY_COMPILE(, | 111 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], |
112 [void test(char *); int length(); char x[length()]; test(x);], | 112 [[void test(char *); int length(); char x[length()]; test(x);]])], |
113 octave_cv_dynamic_auto_arrays=yes, octave_cv_dynamic_auto_arrays=no)]) | 113 octave_cv_dynamic_auto_arrays=yes, octave_cv_dynamic_auto_arrays=no)]) |
114 if test $octave_cv_dynamic_auto_arrays = yes; then | 114 if test $octave_cv_dynamic_auto_arrays = yes; then |
115 AC_DEFINE(HAVE_DYNAMIC_AUTO_ARRAYS,1,[Define if C++ supports dynamic auto arrays]) | 115 AC_DEFINE(HAVE_DYNAMIC_AUTO_ARRAYS,1,[Define if C++ supports dynamic auto arrays]) |
116 fi | 116 fi |
117 AC_LANG_POP(C++) | 117 AC_LANG_POP(C++) |
126 dnl We don't actually need to run this if we don't have putenv, but it | 126 dnl We don't actually need to run this if we don't have putenv, but it |
127 dnl doesn't hurt. | 127 dnl doesn't hurt. |
128 AC_DEFUN(OCTAVE_SMART_PUTENV, | 128 AC_DEFUN(OCTAVE_SMART_PUTENV, |
129 [AC_MSG_CHECKING(whether putenv uses malloc) | 129 [AC_MSG_CHECKING(whether putenv uses malloc) |
130 AC_CACHE_VAL(octave_cv_func_putenv_malloc, | 130 AC_CACHE_VAL(octave_cv_func_putenv_malloc, |
131 [AC_TRY_RUN([ | 131 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
132 #define VAR "YOW_VAR" | 132 #define VAR "YOW_VAR" |
133 #define STRING1 "GabbaGabbaHey" | 133 #define STRING1 "GabbaGabbaHey" |
134 #define STRING2 "Yow!!" /* should be shorter than STRING1 */ | 134 #define STRING2 "Yow!!" /* should be shorter than STRING1 */ |
135 extern char *getenv (); /* in case char* and int don't mix gracefully */ | 135 extern char *getenv (); /* in case char* and int don't mix gracefully */ |
136 main () | 136 main () |
175 printf ("#define SMART_PUTENV\n"); | 175 printf ("#define SMART_PUTENV\n"); |
176 else | 176 else |
177 printf ("#undef SMART_PUTENV\n"); | 177 printf ("#undef SMART_PUTENV\n"); |
178 #endif | 178 #endif |
179 exit (rstr1 == rstr2 ? 0 : 1); | 179 exit (rstr1 == rstr2 ? 0 : 1); |
180 }], octave_cv_func_putenv_malloc=yes, octave_cv_func_putenv_malloc=no, | 180 }]])], octave_cv_func_putenv_malloc=yes, octave_cv_func_putenv_malloc=no, |
181 octave_cv_func_putenv_malloc=no)])dnl | 181 octave_cv_func_putenv_malloc=no)])dnl |
182 AC_MSG_RESULT($octave_cv_func_putenv_malloc) | 182 AC_MSG_RESULT($octave_cv_func_putenv_malloc) |
183 if test $octave_cv_func_putenv_malloc = yes; then | 183 if test $octave_cv_func_putenv_malloc = yes; then |
184 AC_DEFINE(SMART_PUTENV,1,[To quiet autoheader.]) | 184 AC_DEFINE(SMART_PUTENV,1,[To quiet autoheader.]) |
185 fi]) | 185 fi]) |
206 sigsetmask (mask); | 206 sigsetmask (mask); |
207 sigblock (mask); | 207 sigblock (mask); |
208 sigpause (mask);]])], | 208 sigpause (mask);]])], |
209 [octave_cv_signal_vintage=4.2bsd], | 209 [octave_cv_signal_vintage=4.2bsd], |
210 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <signal.h> | 210 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <signal.h> |
211 RETSIGTYPE foo() { }]])], | 211 RETSIGTYPE foo() { }]], |
212 [[int mask = sigmask (SIGINT); | 212 [[int mask = sigmask (SIGINT); |
213 sigset (SIGINT, foo); | 213 sigset (SIGINT, foo); |
214 sigrelse (SIGINT); | 214 sigrelse (SIGINT); |
215 sighold (SIGINT); | 215 sighold (SIGINT); |
216 sigpause (SIGINT);]], | 216 sigpause (SIGINT);]])], |
217 [octave_cv_signal_vintage=svr3], | 217 [octave_cv_signal_vintage=svr3], |
218 [octave_cv_signal_vintage=v7])])])]) | 218 [octave_cv_signal_vintage=v7])])])]) |
219 AC_MSG_RESULT($octave_cv_signal_vintage) | 219 AC_MSG_RESULT($octave_cv_signal_vintage) |
220 if test "$octave_cv_signal_vintage" = posix; then | 220 if test "$octave_cv_signal_vintage" = posix; then |
221 AC_DEFINE(HAVE_POSIX_SIGNALS, 1, [Define if you have POSIX style signals.]) | 221 AC_DEFINE(HAVE_POSIX_SIGNALS, 1, [Define if you have POSIX style signals.]) |
229 AC_DEFUN(OCTAVE_REINSTALL_SIGHANDLERS, | 229 AC_DEFUN(OCTAVE_REINSTALL_SIGHANDLERS, |
230 [AC_REQUIRE([AC_TYPE_SIGNAL]) | 230 [AC_REQUIRE([AC_TYPE_SIGNAL]) |
231 AC_REQUIRE([OCTAVE_SIGNAL_CHECK]) | 231 AC_REQUIRE([OCTAVE_SIGNAL_CHECK]) |
232 AC_MSG_CHECKING([if signal handlers must be reinstalled when invoked]) | 232 AC_MSG_CHECKING([if signal handlers must be reinstalled when invoked]) |
233 AC_CACHE_VAL(octave_cv_must_reinstall_sighandlers, | 233 AC_CACHE_VAL(octave_cv_must_reinstall_sighandlers, |
234 [AC_TRY_RUN([ | 234 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
235 #include <signal.h> | 235 #include <signal.h> |
236 #ifdef HAVE_UNISTD_H | 236 #ifdef HAVE_UNISTD_H |
237 #include <unistd.h> | 237 #include <unistd.h> |
238 #endif | 238 #endif |
239 typedef RETSIGTYPE sigfunc(); | 239 typedef RETSIGTYPE sigfunc(); |
267 set_signal_handler(SIGINT, sigint); | 267 set_signal_handler(SIGINT, sigint); |
268 kill((int)getpid(), SIGINT); | 268 kill((int)getpid(), SIGINT); |
269 kill((int)getpid(), SIGINT); | 269 kill((int)getpid(), SIGINT); |
270 exit(nsigint != 2); | 270 exit(nsigint != 2); |
271 } | 271 } |
272 ], octave_cv_must_reinstall_sighandlers=no, octave_cv_must_reinstall_sighandlers=yes, | 272 ]])], |
273 octave_cv_must_reinstall_sighandlers=no, | |
274 octave_cv_must_reinstall_sighandlers=yes, | |
273 if test "$octave_cv_signal_vintage" = svr3; then | 275 if test "$octave_cv_signal_vintage" = svr3; then |
274 octave_cv_must_reinstall_sighandlers=yes | 276 octave_cv_must_reinstall_sighandlers=yes |
275 else | 277 else |
276 octave_cv_must_reinstall_sighandlers=no | 278 octave_cv_must_reinstall_sighandlers=no |
277 fi)]) | 279 fi)]) |
709 dnl | 711 dnl |
710 dnl Determine if mkdir accepts only one argument instead dnl of the usual 2. | 712 dnl Determine if mkdir accepts only one argument instead dnl of the usual 2. |
711 dnl | 713 dnl |
712 AC_DEFUN(OCTAVE_MKDIR_TAKES_ONE_ARG, | 714 AC_DEFUN(OCTAVE_MKDIR_TAKES_ONE_ARG, |
713 [AC_CACHE_CHECK([if mkdir takes one argument], octave_cv_mkdir_takes_one_arg, | 715 [AC_CACHE_CHECK([if mkdir takes one argument], octave_cv_mkdir_takes_one_arg, |
714 [AC_TRY_COMPILE([ | 716 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
715 #include <sys/types.h> | |
716 #ifdef HAVE_SYS_STAT_H | 717 #ifdef HAVE_SYS_STAT_H |
717 # include <sys/stat.h> | 718 # include <sys/stat.h> |
718 #endif | 719 #endif |
719 #ifdef HAVE_UNISTD_H | 720 #ifdef HAVE_UNISTD_H |
720 # include <unistd.h> | 721 # include <unistd.h> |
721 #endif | 722 #endif |
722 #ifdef HAVE_DIRECT_H | 723 #ifdef HAVE_DIRECT_H |
723 # include <direct.h> | 724 # include <direct.h> |
724 #endif], [mkdir ("foo", 0);], | 725 #endif]], [[mkdir ("foo", 0);]])], |
725 octave_cv_mkdir_takes_one_arg=no, octave_cv_mkdir_takes_one_arg=yes)]) | 726 octave_cv_mkdir_takes_one_arg=no, octave_cv_mkdir_takes_one_arg=yes)]) |
726 if test $octave_cv_mkdir_takes_one_arg = yes ; then | 727 if test $octave_cv_mkdir_takes_one_arg = yes ; then |
727 AC_DEFINE(MKDIR_TAKES_ONE_ARG, 1, [Define if host mkdir takes a single argument.]) | 728 AC_DEFINE(MKDIR_TAKES_ONE_ARG, 1, [Define if host mkdir takes a single argument.]) |
728 fi | 729 fi |
729 ]) | 730 ]) |
812 dnl Check for IEEE 754 data format. | 813 dnl Check for IEEE 754 data format. |
813 dnl | 814 dnl |
814 AC_DEFUN([OCTAVE_IEEE754_DATA_FORMAT], | 815 AC_DEFUN([OCTAVE_IEEE754_DATA_FORMAT], |
815 [AC_MSG_CHECKING([for IEEE 754 data format]) | 816 [AC_MSG_CHECKING([for IEEE 754 data format]) |
816 AC_CACHE_VAL(octave_cv_ieee754_data_format, | 817 AC_CACHE_VAL(octave_cv_ieee754_data_format, |
817 [AC_TRY_RUN([ | 818 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
818 int | 819 int |
819 main (void) | 820 main (void) |
820 { | 821 { |
821 typedef union { unsigned char c[8]; double d; } ieeebytes; | 822 typedef union { unsigned char c[8]; double d; } ieeebytes; |
822 | 823 |
823 ieeebytes l = {0x1c, 0xbc, 0x6e, 0xf2, 0x54, 0x8b, 0x11, 0x43}; | 824 ieeebytes l = {0x1c, 0xbc, 0x6e, 0xf2, 0x54, 0x8b, 0x11, 0x43}; |
824 ieeebytes b = {0x43, 0x11, 0x8b, 0x54, 0xf2, 0x6e, 0xbc, 0x1c}; | 825 ieeebytes b = {0x43, 0x11, 0x8b, 0x54, 0xf2, 0x6e, 0xbc, 0x1c}; |
825 | 826 |
826 return l.d != 1234567891234567.0 && b.d != 1234567891234567.0; | 827 return l.d != 1234567891234567.0 && b.d != 1234567891234567.0; |
827 }], | 828 }]])], |
828 octave_cv_ieee754_data_format=yes, | 829 octave_cv_ieee754_data_format=yes, |
829 octave_cv_ieee754_data_format=no, | 830 octave_cv_ieee754_data_format=no, |
830 octave_cv_ieee754_data_format=no)]) | 831 octave_cv_ieee754_data_format=no)]) |
831 if test "$cross_compiling" = yes; then | 832 if test "$cross_compiling" = yes; then |
832 AC_MSG_RESULT([$octave_cv_ieee754_data_format assumed for cross compilation]) | 833 AC_MSG_RESULT([$octave_cv_ieee754_data_format assumed for cross compilation]) |
845 dnl Assumes that the check for umfpack has already been performed. | 846 dnl Assumes that the check for umfpack has already been performed. |
846 dnl | 847 dnl |
847 AC_DEFUN([OCTAVE_UMFPACK_SEPERATE_SPLIT], | 848 AC_DEFUN([OCTAVE_UMFPACK_SEPERATE_SPLIT], |
848 [AC_MSG_CHECKING([for UMFPACK seperate complex matrix and rhs split]) | 849 [AC_MSG_CHECKING([for UMFPACK seperate complex matrix and rhs split]) |
849 AC_CACHE_VAL(octave_cv_umfpack_seperate_split, | 850 AC_CACHE_VAL(octave_cv_umfpack_seperate_split, |
850 [AC_TRY_RUN([ | 851 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
851 #include <stdlib.h> | 852 #include <stdlib.h> |
852 #if defined (HAVE_UFSPARSE_UMFPACK_h) | 853 #if defined (HAVE_UFSPARSE_UMFPACK_h) |
853 #include <ufsparse/umfpack.h> | 854 #include <ufsparse/umfpack.h> |
854 #elif defined (HAVE_UMFPACK_UMFPACK_H) | 855 #elif defined (HAVE_UMFPACK_UMFPACK_H) |
855 #include <umfpack/umfpack.h> | 856 #include <umfpack/umfpack.h> |
878 for (i = 0; i < n; i++, x+=2) | 879 for (i = 0; i < n; i++, x+=2) |
879 if (fabs(*x - i - 1.) > 1.e-13) | 880 if (fabs(*x - i - 1.) > 1.e-13) |
880 return (1); | 881 return (1); |
881 return (0) ; | 882 return (0) ; |
882 } | 883 } |
883 ], | 884 ]])], |
884 octave_cv_umfpack_seperate_split=yes, | 885 octave_cv_umfpack_seperate_split=yes, |
885 octave_cv_umfpack_seperate_split=no, | 886 octave_cv_umfpack_seperate_split=no, |
886 octave_cv_umfpack_seperate_split=no)]) | 887 octave_cv_umfpack_seperate_split=no)]) |
887 if test "$cross_compiling" = yes; then | 888 if test "$cross_compiling" = yes; then |
888 AC_MSG_RESULT([$octave_cv_umfpack_seperate_split assumed for cross compilation]) | 889 AC_MSG_RESULT([$octave_cv_umfpack_seperate_split assumed for cross compilation]) |