Mercurial > hg > octave-lyh
comparison m4/acinclude.m4 @ 15063:36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Use common syntax for messages in config.h
Correct typos, refer to libraries in all caps, use two spaces after period.
Follow Autoconf guidelines and place general tests before specific tests.
* configure.ac, m4/acinclude.m4: Use common syntax for messages in config.h
Correct typos, refer to libraries in all caps, use two spaces after period.
Follow Autoconf guidelines and place general tests before specific tests.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 31 Jul 2012 10:28:51 -0700 |
parents | c753ee228708 |
children | 25200c04bc25 |
comparison
equal
deleted
inserted
replaced
15060:5156934606d7 | 15063:36cbcc37fdb8 |
---|---|
83 [AC_LANG_PUSH(C++) | 83 [AC_LANG_PUSH(C++) |
84 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <new>]], | 84 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <new>]], |
85 [[operator delete((void *)0, (void *)0);]])], | 85 [[operator delete((void *)0, (void *)0);]])], |
86 octave_cv_placement_delete=yes, octave_cv_placement_delete=no)]) | 86 octave_cv_placement_delete=yes, octave_cv_placement_delete=no)]) |
87 if test $octave_cv_placement_delete = yes; then | 87 if test $octave_cv_placement_delete = yes; then |
88 AC_DEFINE(HAVE_PLACEMENT_DELETE,1,[Define if C++ supports operator delete(void *, void *)]) | 88 AC_DEFINE(HAVE_PLACEMENT_DELETE,1,[Define to 1 if C++ supports operator delete(void *, void *).]) |
89 fi | 89 fi |
90 AC_LANG_POP(C++) | 90 AC_LANG_POP(C++) |
91 ]) | 91 ]) |
92 dnl | 92 dnl |
93 dnl See if the compiler dynamic auto arrays | 93 dnl See if the compiler dynamic auto arrays |
98 [AC_LANG_PUSH(C++) | 98 [AC_LANG_PUSH(C++) |
99 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], | 99 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], |
100 [[void test(char *); int length(); char x[length()]; test(x);]])], | 100 [[void test(char *); int length(); char x[length()]; test(x);]])], |
101 octave_cv_dynamic_auto_arrays=yes, octave_cv_dynamic_auto_arrays=no)]) | 101 octave_cv_dynamic_auto_arrays=yes, octave_cv_dynamic_auto_arrays=no)]) |
102 if test $octave_cv_dynamic_auto_arrays = yes; then | 102 if test $octave_cv_dynamic_auto_arrays = yes; then |
103 AC_DEFINE(HAVE_DYNAMIC_AUTO_ARRAYS,1,[Define if C++ supports dynamic auto arrays]) | 103 AC_DEFINE(HAVE_DYNAMIC_AUTO_ARRAYS,1,[Define to 1 if C++ supports dynamic auto arrays.]) |
104 fi | 104 fi |
105 AC_LANG_POP(C++) | 105 AC_LANG_POP(C++) |
106 ]) | 106 ]) |
107 dnl | 107 dnl |
108 dnl See if the C++ library has the bit_and, bit_or and bit_xor | 108 dnl See if the C++ library has the bit_and, bit_or and bit_xor |
118 int z1 = std::bit_and<int>() (x, y); | 118 int z1 = std::bit_and<int>() (x, y); |
119 int z2 = std::bit_or<int>() (x, y); | 119 int z2 = std::bit_or<int>() (x, y); |
120 int z3 = std::bit_xor<int>() (x, y);]])], | 120 int z3 = std::bit_xor<int>() (x, y);]])], |
121 octave_cv_cxx_bitwise_op_templates=yes, octave_cv_cxx_bitwise_op_templates=no)]) | 121 octave_cv_cxx_bitwise_op_templates=yes, octave_cv_cxx_bitwise_op_templates=no)]) |
122 if test $octave_cv_cxx_bitwise_op_templates = yes; then | 122 if test $octave_cv_cxx_bitwise_op_templates = yes; then |
123 AC_DEFINE(HAVE_CXX_BITWISE_OP_TEMPLATES,1,[Define if C++ library has templated bitwise operators]) | 123 AC_DEFINE(HAVE_CXX_BITWISE_OP_TEMPLATES,1,[Define to 1 if C++ library has templated bitwise operators.]) |
124 fi | 124 fi |
125 AC_LANG_POP(C++) | 125 AC_LANG_POP(C++) |
126 ]) | 126 ]) |
127 | 127 |
128 dnl | 128 dnl |
135 [AC_LANG_PUSH(C++) | 135 [AC_LANG_PUSH(C++) |
136 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <complex>]], | 136 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <complex>]], |
137 [[std::complex<double> x; x.real (1.0); x.imag (2.0);]])], | 137 [[std::complex<double> x; x.real (1.0); x.imag (2.0);]])], |
138 octave_cv_cxx_complex_setters=yes, octave_cv_cxx_complex_setters=no)]) | 138 octave_cv_cxx_complex_setters=yes, octave_cv_cxx_complex_setters=no)]) |
139 if test $octave_cv_cxx_complex_setters = yes; then | 139 if test $octave_cv_cxx_complex_setters = yes; then |
140 AC_DEFINE(HAVE_CXX_COMPLEX_SETTERS,1,[Define if C++ complex class has void real (T) and void imag (T) methods]) | 140 AC_DEFINE(HAVE_CXX_COMPLEX_SETTERS,1,[Define to 1 if C++ complex class has void real (T) and void imag (T) methods.]) |
141 fi | 141 fi |
142 AC_LANG_POP(C++) | 142 AC_LANG_POP(C++) |
143 ]) | 143 ]) |
144 dnl | 144 dnl |
145 dnl See if the C++ library has functions to access real and imaginary | 145 dnl See if the C++ library has functions to access real and imaginary |
151 [AC_LANG_PUSH(C++) | 151 [AC_LANG_PUSH(C++) |
152 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <complex>]], | 152 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <complex>]], |
153 [[std::complex<double> x; x.real () = 1.0; x.imag () = 1.0;]])], | 153 [[std::complex<double> x; x.real () = 1.0; x.imag () = 1.0;]])], |
154 octave_cv_cxx_complex_reference_accessors=yes, octave_cv_cxx_complex_reference_accessors=no)]) | 154 octave_cv_cxx_complex_reference_accessors=yes, octave_cv_cxx_complex_reference_accessors=no)]) |
155 if test $octave_cv_cxx_complex_reference_accessors = yes; then | 155 if test $octave_cv_cxx_complex_reference_accessors = yes; then |
156 AC_DEFINE(HAVE_CXX_COMPLEX_REFERENCE_ACCESSORS,1,[Define if C++ complex class has T& real (void) and T& imag (void) methods]) | 156 AC_DEFINE(HAVE_CXX_COMPLEX_REFERENCE_ACCESSORS,1,[Define to 1 if C++ complex class has T& real (void) and T& imag (void) methods.]) |
157 fi | 157 fi |
158 AC_LANG_POP(C++) | 158 AC_LANG_POP(C++) |
159 ]) | 159 ]) |
160 dnl | 160 dnl |
161 dnl See if the Carbon Framework defines CGDisplayBitsPerPixel. | 161 dnl See if the Carbon Framework defines CGDisplayBitsPerPixel. |
170 CGDirectDisplayID display = CGMainDisplayID (); | 170 CGDirectDisplayID display = CGMainDisplayID (); |
171 size_t depth = CGDisplayBitsPerPixel (display); | 171 size_t depth = CGDisplayBitsPerPixel (display); |
172 ]])], | 172 ]])], |
173 octave_cv_carbon_cgdisplaybitsperpixel=yes, octave_cv_carbon_cgdisplaybitsperpixel=no)]) | 173 octave_cv_carbon_cgdisplaybitsperpixel=yes, octave_cv_carbon_cgdisplaybitsperpixel=no)]) |
174 if test $octave_cv_carbon_cgdisplaybitsperpixel = yes; then | 174 if test $octave_cv_carbon_cgdisplaybitsperpixel = yes; then |
175 AC_DEFINE(HAVE_CARBON_CGDISPLAYBITSPERPIXEL,1,[Define if Carbon Framework has CGDisplayBitsPerPixel]) | 175 AC_DEFINE(HAVE_CARBON_CGDISPLAYBITSPERPIXEL,1,[Define to 1 if Carbon Framework has CGDisplayBitsPerPixel.]) |
176 fi | 176 fi |
177 AC_LANG_POP(C++) | 177 AC_LANG_POP(C++) |
178 ]) | 178 ]) |
179 dnl | 179 dnl |
180 dnl The following test is from Karl Berry's Kpathseach library. I'm | 180 dnl The following test is from Karl Berry's Kpathseach library. I'm |
273 [octave_cv_cxx_new_friend_template_decl=yes]) | 273 [octave_cv_cxx_new_friend_template_decl=yes]) |
274 AC_LANG_POP(C++) | 274 AC_LANG_POP(C++) |
275 ]) | 275 ]) |
276 AC_MSG_RESULT([$octave_cv_cxx_new_friend_template_decl]) | 276 AC_MSG_RESULT([$octave_cv_cxx_new_friend_template_decl]) |
277 if test $octave_cv_cxx_new_friend_template_decl = yes; then | 277 if test $octave_cv_cxx_new_friend_template_decl = yes; then |
278 AC_DEFINE(CXX_NEW_FRIEND_TEMPLATE_DECL,1,[Define if your compiler supports `<>' stuff for template friends.]) | 278 AC_DEFINE(CXX_NEW_FRIEND_TEMPLATE_DECL,1,[Define to 1 if your compiler supports `<>' stuff for template friends.]) |
279 fi | 279 fi |
280 ]) | 280 ]) |
281 dnl | 281 dnl |
282 dnl Check to see if C compiler handles FLAG command line option. If | 282 dnl Check to see if C compiler handles FLAG command line option. If |
283 dnl two arguments are specified, execute the second arg as shell | 283 dnl two arguments are specified, execute the second arg as shell |
526 AC_MSG_RESULT([$octave_$1_ok]) | 526 AC_MSG_RESULT([$octave_$1_ok]) |
527 if test $octave_$1_ok = yes; then | 527 if test $octave_$1_ok = yes; then |
528 m4_ifblank([$8], [ | 528 m4_ifblank([$8], [ |
529 warn_$1= | 529 warn_$1= |
530 AC_DEFINE([HAVE_]m4_toupper([$1]), 1, | 530 AC_DEFINE([HAVE_]m4_toupper([$1]), 1, |
531 [Define if $2 is available.]) | 531 [Define to 1 if $2 is available.]) |
532 [TEXINFO_]m4_toupper([$1])="@set [HAVE_]m4_toupper([$1])"], [$8]) | 532 [TEXINFO_]m4_toupper([$1])="@set [HAVE_]m4_toupper([$1])"], [$8]) |
533 fi | 533 fi |
534 LIBS="$octave_check_library_save_LIBS" | 534 LIBS="$octave_check_library_save_LIBS" |
535 LDFLAGS="$octave_check_library_save_LDFLAGS" | 535 LDFLAGS="$octave_check_library_save_LDFLAGS" |
536 fi | 536 fi |
759 [octave_cv_cxx_iso_compliant_library=no]) | 759 [octave_cv_cxx_iso_compliant_library=no]) |
760 AC_LANG_POP(C++) | 760 AC_LANG_POP(C++) |
761 ]) | 761 ]) |
762 AC_MSG_RESULT([$octave_cv_cxx_iso_compliant_library]) | 762 AC_MSG_RESULT([$octave_cv_cxx_iso_compliant_library]) |
763 if test $octave_cv_cxx_iso_compliant_library = yes; then | 763 if test $octave_cv_cxx_iso_compliant_library = yes; then |
764 AC_DEFINE(CXX_ISO_COMPLIANT_LIBRARY, 1, [Define if your C++ runtime library is ISO compliant.]) | 764 AC_DEFINE(CXX_ISO_COMPLIANT_LIBRARY, 1, [Define to 1 if your C++ runtime library is ISO compliant.]) |
765 fi | 765 fi |
766 ]) | 766 ]) |
767 dnl | 767 dnl |
768 dnl Allow the user disable support for command line editing using GNU | 768 dnl Allow the user disable support for command line editing using GNU |
769 dnl readline. | 769 dnl readline. |
781 if $USE_READLINE; then | 781 if $USE_READLINE; then |
782 save_LIBS="$LIBS" | 782 save_LIBS="$LIBS" |
783 LIBS="$TERM_LIBS" | 783 LIBS="$TERM_LIBS" |
784 AC_CHECK_LIB(readline, rl_set_keyboard_input_timeout, [ | 784 AC_CHECK_LIB(readline, rl_set_keyboard_input_timeout, [ |
785 READLINE_LIBS="-lreadline" | 785 READLINE_LIBS="-lreadline" |
786 AC_DEFINE(USE_READLINE, 1, [Define to use the readline library.]) | 786 AC_DEFINE(USE_READLINE, 1, [Define to 1 to use the readline library.]) |
787 ], [ | 787 ], [ |
788 AC_MSG_WARN([I need GNU Readline 4.2 or later]) | 788 AC_MSG_WARN([I need GNU Readline 4.2 or later]) |
789 AC_MSG_ERROR([this is fatal unless you specify --disable-readline]) | 789 AC_MSG_ERROR([this is fatal unless you specify --disable-readline]) |
790 ]) | 790 ]) |
791 LIBS="$save_LIBS" | 791 LIBS="$save_LIBS" |
808 void *vptr = reinterpret_cast<void *> (psin); | 808 void *vptr = reinterpret_cast<void *> (psin); |
809 psin = reinterpret_cast<fptr> (vptr);]])], | 809 psin = reinterpret_cast<fptr> (vptr);]])], |
810 octave_cv_cxx_broken_reinterpret_cast=no, | 810 octave_cv_cxx_broken_reinterpret_cast=no, |
811 octave_cv_cxx_broken_reinterpret_cast=yes)]) | 811 octave_cv_cxx_broken_reinterpret_cast=yes)]) |
812 if test $octave_cv_cxx_broken_reinterpret_cast = yes ; then | 812 if test $octave_cv_cxx_broken_reinterpret_cast = yes ; then |
813 AC_DEFINE(CXX_BROKEN_REINTERPRET_CAST, 1, [Define if C++ reinterpret_cast fails for function pointers.]) | 813 AC_DEFINE(CXX_BROKEN_REINTERPRET_CAST, 1, [Define to 1 if C++ reinterpret_cast fails for function pointers.]) |
814 fi | 814 fi |
815 AC_LANG_POP(C++)]) | 815 AC_LANG_POP(C++)]) |
816 dnl | 816 dnl |
817 dnl Find find. | 817 dnl Find find. |
818 dnl | 818 dnl |
936 AC_MSG_RESULT([$octave_cv_ieee754_data_format assumed for cross compilation]) | 936 AC_MSG_RESULT([$octave_cv_ieee754_data_format assumed for cross compilation]) |
937 else | 937 else |
938 AC_MSG_RESULT([$octave_cv_ieee754_data_format]) | 938 AC_MSG_RESULT([$octave_cv_ieee754_data_format]) |
939 fi | 939 fi |
940 if test "$octave_cv_ieee754_data_format" = yes; then | 940 if test "$octave_cv_ieee754_data_format" = yes; then |
941 AC_DEFINE(HAVE_IEEE754_DATA_FORMAT, 1, [Define if your system uses IEEE 754 data format.]) | 941 AC_DEFINE(HAVE_IEEE754_DATA_FORMAT, 1, [Define to 1 if your system uses IEEE 754 data format.]) |
942 else | 942 else |
943 ## If the format is unknown, then you will probably not have a | 943 ## If the format is unknown, then you will probably not have a |
944 ## useful system, so we will abort here. Anyone wishing to | 944 ## useful system, so we will abort here. Anyone wishing to |
945 ## experiment with building Octave on a system without IEEE | 945 ## experiment with building Octave on a system without IEEE |
946 ## floating point should be capable of removing this check and | 946 ## floating point should be capable of removing this check and |
999 AC_MSG_RESULT([$octave_cv_umfpack_seperate_split assumed for cross compilation]) | 999 AC_MSG_RESULT([$octave_cv_umfpack_seperate_split assumed for cross compilation]) |
1000 else | 1000 else |
1001 AC_MSG_RESULT([$octave_cv_umfpack_seperate_split]) | 1001 AC_MSG_RESULT([$octave_cv_umfpack_seperate_split]) |
1002 fi | 1002 fi |
1003 if test "$octave_cv_umfpack_seperate_split" = yes; then | 1003 if test "$octave_cv_umfpack_seperate_split" = yes; then |
1004 AC_DEFINE(UMFPACK_SEPARATE_SPLIT, 1, [Define if the UMFPACK Complex solver allow matrix and RHS to be split independently]) | 1004 AC_DEFINE(UMFPACK_SEPARATE_SPLIT, 1, [Define to 1 if the UMFPACK Complex solver allow matrix and RHS to be split independently.]) |
1005 fi | 1005 fi |
1006 ]) | 1006 ]) |
1007 dnl | 1007 dnl |
1008 dnl Check whether using HDF5 DLL under Windows. This is done by | 1008 dnl Check whether using HDF5 DLL under Windows. This is done by |
1009 dnl testing for a data symbol in the HDF5 library, which would | 1009 dnl testing for a data symbol in the HDF5 library, which would |
1021 octave_cv_hdf5_dll=yes, | 1021 octave_cv_hdf5_dll=yes, |
1022 octave_cv_hdf5_dll=no) | 1022 octave_cv_hdf5_dll=no) |
1023 CFLAGS="$save_CFLAGS" | 1023 CFLAGS="$save_CFLAGS" |
1024 LIBS="$save_LIBS"])]) | 1024 LIBS="$save_LIBS"])]) |
1025 if test "$octave_cv_hdf5_dll" = yes; then | 1025 if test "$octave_cv_hdf5_dll" = yes; then |
1026 AC_DEFINE(_HDF5USEDLL_, 1, [Define if using HDF5 dll (Win32)]) | 1026 AC_DEFINE(_HDF5USEDLL_, 1, [Define to 1 if using HDF5 dll (Win32).]) |
1027 fi]) | 1027 fi]) |
1028 dnl | 1028 dnl |
1029 dnl Check whether HDF5 library has version 1.6 API functions. | 1029 dnl Check whether HDF5 library has version 1.6 API functions. |
1030 dnl | 1030 dnl |
1031 AC_DEFUN([OCTAVE_HDF5_HAS_ENFORCED_16_API], [ | 1031 AC_DEFUN([OCTAVE_HDF5_HAS_ENFORCED_16_API], [ |
1036 ], [ | 1036 ], [ |
1037 H5Eset_auto (0, 0);], [ | 1037 H5Eset_auto (0, 0);], [ |
1038 octave_cv_hdf5_has_enforced_16_api=yes], [ | 1038 octave_cv_hdf5_has_enforced_16_api=yes], [ |
1039 octave_cv_hdf5_has_enforced_16_api=no])]) | 1039 octave_cv_hdf5_has_enforced_16_api=no])]) |
1040 if test "$octave_cv_hdf5_has_enforced_16_api" != "yes"; then | 1040 if test "$octave_cv_hdf5_has_enforced_16_api" != "yes"; then |
1041 AC_DEFINE(HAVE_HDF5_18, 1, [Define if >=HDF5-1.8 is available.]) | 1041 AC_DEFINE(HAVE_HDF5_18, 1, [Define to 1 if >=HDF5-1.8 is available.]) |
1042 fi | 1042 fi |
1043 ]) | 1043 ]) |
1044 dnl | 1044 dnl |
1045 dnl Check for the QHull version. | 1045 dnl Check for the Qhull version. |
1046 dnl | 1046 dnl |
1047 AC_DEFUN([OCTAVE_CHECK_QHULL_VERSION], | 1047 AC_DEFUN([OCTAVE_CHECK_QHULL_VERSION], |
1048 [AC_CACHE_CHECK([for qh_version in $QHULL_LIBS], | 1048 [AC_CACHE_CHECK([for qh_version in $QHULL_LIBS], |
1049 octave_cv_lib_qhull_version, [ | 1049 octave_cv_lib_qhull_version, [ |
1050 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ | 1050 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
1079 ]], [[ | 1079 ]], [[ |
1080 const char *tmp = qh_version; | 1080 const char *tmp = qh_version; |
1081 ]])], [octave_cv_lib_qhull_version=yes], [octave_cv_lib_qhull_version=no])]) | 1081 ]])], [octave_cv_lib_qhull_version=yes], [octave_cv_lib_qhull_version=no])]) |
1082 if test "$octave_cv_lib_qhull_version" = no; then | 1082 if test "$octave_cv_lib_qhull_version" = no; then |
1083 AC_DEFINE(NEED_QHULL_VERSION, 1, | 1083 AC_DEFINE(NEED_QHULL_VERSION, 1, |
1084 [Define if the QHull library needs a qh_version variable defined.]) | 1084 [Define to 1 if the Qhull library needs a qh_version variable defined.]) |
1085 fi | 1085 fi |
1086 ]) | 1086 ]) |
1087 dnl | 1087 dnl |
1088 dnl Check whether QHull works (does not crash) | 1088 dnl Check whether Qhull works (does not crash) |
1089 dnl | 1089 dnl |
1090 AC_DEFUN([OCTAVE_CHECK_QHULL_OK], | 1090 AC_DEFUN([OCTAVE_CHECK_QHULL_OK], |
1091 [AC_CACHE_CHECK([whether the qhull library works], | 1091 [AC_CACHE_CHECK([whether the qhull library works], |
1092 octave_cv_lib_qhull_ok, [ | 1092 octave_cv_lib_qhull_ok, [ |
1093 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ | 1093 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ |
1289 fi | 1289 fi |
1290 ]) | 1290 ]) |
1291 dnl | 1291 dnl |
1292 dnl Check for OpenGL. If found, define OPENGL_LIBS | 1292 dnl Check for OpenGL. If found, define OPENGL_LIBS |
1293 dnl | 1293 dnl |
1294 dnl FIXME -- the following tests should probably check for the | 1294 dnl FIXME: The following tests should probably check for the |
1295 dnl libraries separately. | 1295 dnl libraries separately. |
1296 dnl | 1296 dnl |
1297 dnl FIXME -- should we allow a way to specify a directory for OpenGL | 1297 dnl FIXME: Should we allow a way to specify a directory for OpenGL |
1298 dnl libraries and header files? | 1298 dnl libraries and header files? |
1299 dnl | 1299 dnl |
1300 AC_DEFUN([OCTAVE_OPENGL], [ | 1300 AC_DEFUN([OCTAVE_OPENGL], [ |
1301 OPENGL_LIBS= | 1301 OPENGL_LIBS= |
1302 | 1302 |
1305 #include <OpenGL/gl.h> | 1305 #include <OpenGL/gl.h> |
1306 #include <OpenGL/glu.h> ], [GLint par; glGetIntegerv (GL_VIEWPORT, &par);], | 1306 #include <OpenGL/glu.h> ], [GLint par; glGetIntegerv (GL_VIEWPORT, &par);], |
1307 [have_framework_opengl="yes"], [have_framework_opengl="no"]) | 1307 [have_framework_opengl="yes"], [have_framework_opengl="no"]) |
1308 | 1308 |
1309 if test $have_framework_opengl = "yes"; then | 1309 if test $have_framework_opengl = "yes"; then |
1310 AC_DEFINE(HAVE_FRAMEWORK_OPENGL, 1, [Define if framework OPENGL is available.]) | 1310 AC_DEFINE(HAVE_FRAMEWORK_OPENGL, 1, [Define to 1 if framework OPENGL is available.]) |
1311 OPENGL_LIBS="-Wl,-framework -Wl,OpenGL" | 1311 OPENGL_LIBS="-Wl,-framework -Wl,OpenGL" |
1312 AC_MSG_NOTICE([adding -Wl,-framework -Wl,OpenGL to OPENGL_LIBS]) | 1312 AC_MSG_NOTICE([adding -Wl,-framework -Wl,OpenGL to OPENGL_LIBS]) |
1313 OCTAVE_GLUTESSCALLBACK_THREEDOTS | 1313 OCTAVE_GLUTESSCALLBACK_THREEDOTS |
1314 else | 1314 else |
1315 case $canonical_host_type in | 1315 case $canonical_host_type in |
1380 [[GLvoid (*func)(...); gluTessCallback(0, 0, func);]])], | 1380 [[GLvoid (*func)(...); gluTessCallback(0, 0, func);]])], |
1381 octave_cv_glutesscallback_threedots="yes", octave_cv_glutesscallback_threedots="no")]) | 1381 octave_cv_glutesscallback_threedots="yes", octave_cv_glutesscallback_threedots="no")]) |
1382 AC_LANG_POP(C++) | 1382 AC_LANG_POP(C++) |
1383 if test $octave_cv_glutesscallback_threedots = "yes"; then | 1383 if test $octave_cv_glutesscallback_threedots = "yes"; then |
1384 AC_DEFINE(HAVE_GLUTESSCALLBACK_THREEDOTS, 1, | 1384 AC_DEFINE(HAVE_GLUTESSCALLBACK_THREEDOTS, 1, |
1385 [Define if gluTessCallback is called with (...)]) | 1385 [Define to 1 if gluTessCallback is called with (...).]) |
1386 fi | 1386 fi |
1387 ]) | 1387 ]) |
1388 dnl | 1388 dnl |
1389 dnl Check for support of OpenMP with a given compiler flag. If | 1389 dnl Check for support of OpenMP with a given compiler flag. If |
1390 dnl found define HAVE_OPENMP and add the compile flag to CFLAGS | 1390 dnl found define HAVE_OPENMP and add the compile flag to CFLAGS |
1406 return 0; | 1406 return 0; |
1407 } | 1407 } |
1408 ]])],octave_cv_openmp=yes, octave_cv_openmmp=no, octave_cv_openmp=no)]) | 1408 ]])],octave_cv_openmp=yes, octave_cv_openmmp=no, octave_cv_openmp=no)]) |
1409 AC_MSG_RESULT($octave_cv_openmp) | 1409 AC_MSG_RESULT($octave_cv_openmp) |
1410 if test "$octave_cv_openmp" = yes; then | 1410 if test "$octave_cv_openmp" = yes; then |
1411 AC_DEFINE(HAVE_OPENMP,1,[Define if compiler supports OpenMP]) | 1411 AC_DEFINE(HAVE_OPENMP,1,[Define to 1 if compiler supports OpenMP.]) |
1412 CXXFLAGS="$CXXFLAGS $1" | 1412 CXXFLAGS="$CXXFLAGS $1" |
1413 else | 1413 else |
1414 CFLAGS="$XCFLAGS" | 1414 CFLAGS="$XCFLAGS" |
1415 fi | 1415 fi |
1416 ]) | 1416 ]) |
1625 ]], | 1625 ]], |
1626 [[ | 1626 [[ |
1627 take_func(std::$1); | 1627 take_func(std::$1); |
1628 ]])], | 1628 ]])], |
1629 [AC_MSG_RESULT([yes]) | 1629 [AC_MSG_RESULT([yes]) |
1630 AC_DEFINE(HAVE_CMATH_[]AS_TR_CPP($1),1,[Define if <cmath> provides $1])], | 1630 AC_DEFINE(HAVE_CMATH_[]AS_TR_CPP($1),1,[Define to 1 if <cmath> provides $1.])], |
1631 [AC_MSG_RESULT([no])]) | 1631 [AC_MSG_RESULT([no])]) |
1632 AC_MSG_CHECKING([for std::$1 (float variant) in <cmath>]) | 1632 AC_MSG_CHECKING([for std::$1 (float variant) in <cmath>]) |
1633 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | 1633 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
1634 #include <cmath> | 1634 #include <cmath> |
1635 void take_func (bool (*func) (float x)); | 1635 void take_func (bool (*func) (float x)); |
1638 ]], | 1638 ]], |
1639 [[ | 1639 [[ |
1640 take_func(std::$1); | 1640 take_func(std::$1); |
1641 ]])], | 1641 ]])], |
1642 [AC_MSG_RESULT([yes]) | 1642 [AC_MSG_RESULT([yes]) |
1643 AC_DEFINE(HAVE_CMATH_[]AS_TR_CPP($1)F,1,[Define if <cmath> provides float variant of $1])], | 1643 AC_DEFINE(HAVE_CMATH_[]AS_TR_CPP($1)F,1,[Define to 1 if <cmath> provides float variant of $1.])], |
1644 [AC_MSG_RESULT([no])]) | 1644 [AC_MSG_RESULT([no])]) |
1645 AC_LANG_POP(C++) | 1645 AC_LANG_POP(C++) |
1646 ]) | 1646 ]) |
1647 | 1647 |
1648 dnl Check whether fast signed integer arithmetics using bit tricks | 1648 dnl Check whether fast signed integer arithmetics using bit tricks |
1649 dnl can be used in oct-inttypes.h. Defines HAVE_FAST_INT_OPS if | 1649 dnl can be used in oct-inttypes.h. Defines HAVE_FAST_INT_OPS if |
1650 dnl the following conditions hold: | 1650 dnl the following conditions hold: |
1651 dnl 1. Signed numbers are represented by twos complement | 1651 dnl 1. Signed numbers are represented by twos complement |
1652 dnl (see <http://en.wikipedia.org/wiki/Two%27s_complement>) | 1652 dnl (see <http://en.wikipedia.org/wiki/Two%27s_complement>) |
1653 dnl 2. static_cast to unsigned int counterpart works like interpreting | 1653 dnl 2. static_cast to unsigned int counterpart works like interpreting |
1654 dnl the signed bit pattern as unsigned (and is thus zero-cost). | 1654 dnl the signed bit pattern as unsigned (and is thus zero-cost). |
1709 [octave_cv_fast_int_ops=no], | 1709 [octave_cv_fast_int_ops=no], |
1710 [octave_cv_fast_int_ops=yes]) | 1710 [octave_cv_fast_int_ops=yes]) |
1711 AC_LANG_POP(C++)]) | 1711 AC_LANG_POP(C++)]) |
1712 if test $octave_cv_fast_int_ops = yes; then | 1712 if test $octave_cv_fast_int_ops = yes; then |
1713 AC_DEFINE(HAVE_FAST_INT_OPS, 1, | 1713 AC_DEFINE(HAVE_FAST_INT_OPS, 1, |
1714 [Define if signed integers use two's complement]) | 1714 [Define to 1 if signed integers use two's complement.]) |
1715 fi | 1715 fi |
1716 ]) | 1716 ]) |
1717 dnl | 1717 dnl |
1718 dnl Check to see if the compiler and the linker can handle the flags | 1718 dnl Check to see if the compiler and the linker can handle the flags |
1719 dnl "-framework $1" for the given prologue $2 and the given body $3 of | 1719 dnl "-framework $1" for the given prologue $2 and the given body $3 of |
1720 dnl a source file. Arguments 2 and 3 optionally can also be empty. | 1720 dnl a source file. Arguments 2 and 3 optionally can also be empty. |
1721 dnl Add options (lower case letters $1) "--with-framework-$1" and | 1721 dnl Add options (lower case letters $1) "--with-framework-$1" and |
1722 dnl "--without-framework-$1". If this test is successful then perform | 1722 dnl "--without-framework-$1". If this test is successful then perform |
1723 dnl $4, otherwise do $5. | 1723 dnl $4, otherwise do $5. |
1724 dnl | 1724 dnl |
1725 dnl OCTAVE_HAVE_FRAMEWORK | 1725 dnl OCTAVE_HAVE_FRAMEWORK |
1726 AC_DEFUN([OCTAVE_HAVE_FRAMEWORK], [ | 1726 AC_DEFUN([OCTAVE_HAVE_FRAMEWORK], [ |
1727 AC_MSG_CHECKING([whether ${LD-ld} accepts -framework $1]) | 1727 AC_MSG_CHECKING([whether ${LD-ld} accepts -framework $1]) |