changeset 706:164e497d6039

[project @ 1994-09-15 15:21:45 by jwe]
author jwe
date Thu, 15 Sep 1994 15:21:47 +0000
parents 1900ccfdf860
children d7c4962ec7a0
files acconfig.h configure.in src/mappers.cc
diffstat 3 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/acconfig.h
+++ b/acconfig.h
@@ -68,6 +68,9 @@
    directory tree as the sources. */
 #undef RUN_IN_PLACE
 
+/* Define if math.h declares signgam. */
+#undef SIGNGAM_DECLARED
+
 /* To quiet autoheader. */
 #undef SMART_PUTENV
 
--- a/configure.in
+++ b/configure.in
@@ -21,7 +21,7 @@
 dnl along with Octave; see the file COPYING.  If not, write to the Free
 dnl Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 dnl
-AC_REVISION($Revision: 1.45 $)dnl
+AC_REVISION($Revision: 1.46 $)dnl
 AC_PREREQ(1.8)dnl
 AC_INIT(src/octave.cc)
 AC_CONFIG_HEADER(config.h kpathsea/c-auto.h)
@@ -533,6 +533,11 @@
 AC_HAVE_FUNCS(infinity quiet_nan)dnl
 AC_HAVE_FUNCS(erf erfc lgamma)dnl
 dnl
+AC_COMPILE_CHECK([signgam declaration in math.h],
+  [#include <math.h>],
+  [int foo = signgam + 1;],
+  AC_DEFINE(SIGNGAM_DECLARED, 1), [])dnl
+dnl
 CFLAGS="$XCFLAGS"
 dnl
 dnl Check for nonstandard but common trig functions that we need.
--- a/src/mappers.cc
+++ b/src/mappers.cc
@@ -49,6 +49,10 @@
 #define M_PI 3.14159265358979323846
 #endif
 
+#if defined (HAVE_LGAMMA) && ! defined (SIGNGAM_DECLARED)
+extern int signgam;
+#endif
+
 /*
  * Double -> double mappers.
  */