summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.Merijn Brand <h.m.brand@xs4all.nl>2005-04-10 17:08:36 +0000
committerH.Merijn Brand <h.m.brand@xs4all.nl>2005-04-10 17:08:36 +0000
commit0a0abfba80ecb959bb176fcf214c3d9eeebfb1c6 (patch)
tree3bd838a0b1d2b4bcdb82b78ea56d62c54cc22030
parentccafdc969fe8361303a07e7576d1af4e3e389a76 (diff)
downloadperl-0a0abfba80ecb959bb176fcf214c3d9eeebfb1c6.tar.gz
Configure now probes for _LIB_VERSION support in math.h/libm
LIBM_LIB_VERSION is defined if it does p4raw-id: //depot/perl@24217
-rwxr-xr-xConfigure63
-rw-r--r--Porting/config_H6
-rw-r--r--config_h.SH136
-rw-r--r--handy.h2
4 files changed, 126 insertions, 81 deletions
diff --git a/Configure b/Configure
index b76f5d0731..a7ba8380e4 100755
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Fri Apr 8 16:30:10 CEST 2005 [metaconfig 3.0 PL70]
+# Generated on Sun Apr 10 19:26:39 CEST 2005 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.org)
cat >c1$$ <<EOF
@@ -525,6 +525,7 @@ d_isnanl=''
d_killpg=''
d_lchown=''
d_ldbl_dig=''
+d_libm_lib_version=''
d_link=''
d_localtime_r=''
localtime_r_proto=''
@@ -663,6 +664,7 @@ d_shmget=''
d_sigaction=''
d_sigprocmask=''
d_sigsetjmp=''
+d_sitecustomize=''
usesitecustomize=''
d_sockatmark=''
d_sockatmarkproto=''
@@ -13948,6 +13950,38 @@ $rm -f ldbl_dig.?
set d_ldbl_dig
eval $setvar
+: see if this is a math.h system
+set math.h i_math
+eval $inhdr
+
+d_libm_lib_version="$undef"
+case $i_math in
+ $define)
+ : check to see if math.h defines _LIB_VERSION
+ echo " "
+ echo "Checking to see if your libm supports _LIB_VERSION..." >&4
+ $cat >try.c <<EOCP
+#include <unistd.h>
+#include <math.h>
+int main (int argc, char *argv[])
+{
+ printf ("%d\n", _LIB_VERSION);
+ return (0);
+ } /* main */
+EOCP
+ set try
+ if eval $compile; then
+ foo=`$run ./try`
+ echo "Yes, it does ($foo)" >&4
+ d_libm_lib_version="$define"
+ else
+ echo "No, it does not (probably harmless)\n" >&4
+ fi
+ $rm -f try.* try core core.try.*
+ ;;
+
+ esac
+
: see if link exists
set link d_link
eval $inlibc
@@ -14101,10 +14135,6 @@ esac
-: see if this is a math.h system
-set math.h i_math
-eval $inhdr
-
: see if sqrtl exists
set sqrtl d_sqrtl
eval $inlibc
@@ -16136,6 +16166,17 @@ set d_sigsetjmp
eval $setvar
$rm -f try.c try
+
+d_sitecustomize="$undef"
+case "$usesitecustomize" in
+ $define|true|[Yy]*)
+ usesitecustomize="$define"
+ d_sitecustomize="$define"
+ ;;
+ *)
+ usesitecustomize="$undef"
+ esac
+
: see if sockatmark exists
set sockatmark d_sockatmark
eval $inlibc
@@ -19488,16 +19529,6 @@ case "$uidsign" in
;;
esac
-
-case "$usesitecustomize" in
- $define|true|[Yy]*)
- usesitecustomize="$define"
- ;;
- *)
- usesitecustomize="$undef"
- ;;
- esac
-
: determine compiler compiler
case "$yacc" in
'')
@@ -20743,6 +20774,7 @@ d_isnanl='$d_isnanl'
d_killpg='$d_killpg'
d_lchown='$d_lchown'
d_ldbl_dig='$d_ldbl_dig'
+d_libm_lib_version='$d_libm_lib_version'
d_link='$d_link'
d_localtime_r='$d_localtime_r'
d_locconv='$d_locconv'
@@ -20882,6 +20914,7 @@ d_shmget='$d_shmget'
d_sigaction='$d_sigaction'
d_sigprocmask='$d_sigprocmask'
d_sigsetjmp='$d_sigsetjmp'
+d_sitecustomize='$d_sitecustomize'
d_sockatmark='$d_sockatmark'
d_sockatmarkproto='$d_sockatmarkproto'
d_socket='$d_socket'
diff --git a/Porting/config_H b/Porting/config_H
index ddc4b40c3f..d2cf0a1ef7 100644
--- a/Porting/config_H
+++ b/Porting/config_H
@@ -704,6 +704,12 @@
*/
#define I_MATH /**/
+/* LIBM_LIB_VERSION:
+ * This symbol, if defined, indicates that libm exports _LIB_VERSION
+ * and that math.h defines the enum to manipulate it.
+ */
+#undef LIBM_LIB_VERSION /**/
+
/* I_MEMORY:
* This symbol, if defined, indicates to the C program that it should
* include <memory.h>.
diff --git a/config_h.SH b/config_h.SH
index fde606b370..1953713728 100644
--- a/config_h.SH
+++ b/config_h.SH
@@ -893,47 +893,6 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
*/
#$i_vfork I_VFORK /**/
-/* INTSIZE:
- * This symbol contains the value of sizeof(int) so that the C
- * preprocessor can make decisions based on it.
- */
-/* LONGSIZE:
- * This symbol contains the value of sizeof(long) so that the C
- * preprocessor can make decisions based on it.
- */
-/* SHORTSIZE:
- * This symbol contains the value of sizeof(short) so that the C
- * preprocessor can make decisions based on it.
- */
-#define INTSIZE $intsize /**/
-#define LONGSIZE $longsize /**/
-#define SHORTSIZE $shortsize /**/
-
-/* MULTIARCH:
- * This symbol, if defined, signifies that the build
- * process will produce some binary files that are going to be
- * used in a cross-platform environment. This is the case for
- * example with the NeXT "fat" binaries that contain executables
- * for several CPUs.
- */
-#$multiarch MULTIARCH /**/
-
-/* HAS_QUAD:
- * This symbol, if defined, tells that there's a 64-bit integer type,
- * Quad_t, and its unsigned counterpar, Uquad_t. QUADKIND will be one
- * of QUAD_IS_INT, QUAD_IS_LONG, QUAD_IS_LONG_LONG, or QUAD_IS_INT64_T.
- */
-#$d_quad HAS_QUAD /**/
-#ifdef HAS_QUAD
-# define Quad_t $quadtype /**/
-# define Uquad_t $uquadtype /**/
-# define QUADKIND $quadkind /**/
-# define QUAD_IS_INT 1
-# define QUAD_IS_LONG 2
-# define QUAD_IS_LONG_LONG 3
-# define QUAD_IS_INT64_T 4
-#endif
-
/* HAS_ACCESSX:
* This symbol, if defined, indicates that the accessx routine is
* available to do extended access checks.
@@ -982,12 +941,6 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
#define MEM_ALIGNBYTES $alignbytes
#endif
-/* PERL_RELOCATABLE_INC:
- * This symbol, if defined, indicates that we'd like to relocate entries
- * in @INC at run time based on the location of the perl binary.
- */
-#$userelocatableinc PERL_RELOCATABLE_INC /**/
-
/* ARCHLIB:
* This variable, if defined, holds the name of the directory in
* which the user wants to put architecture-dependent public
@@ -1904,6 +1857,12 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
*/
#$d_ldbl_dig HAS_LDBL_DIG /* */
+/* LIBM_LIB_VERSION:
+ * This symbol, if defined, indicates that libm exports _LIB_VERSION
+ * and that math.h defines the enum to manipulate it.
+ */
+#$d_libm_lib_version LIBM_LIB_VERSION /**/
+
/* HAS_LOCALTIME_R:
* This symbol, if defined, indicates that the localtime_r routine
* is available to localtime re-entrantly.
@@ -2525,18 +2484,6 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
#$d_strerror_r HAS_STRERROR_R /**/
#define STRERROR_R_PROTO $strerror_r_proto /**/
-/* HAS_STRLCAT:
- * This symbol, if defined, indicates that the strlcat () routine is
- * available to do string concatenation.
- */
-#$d_strlcat HAS_STRLCAT /**/
-
-/* HAS_STRLCPY:
- * This symbol, if defined, indicates that the strlcpy () routine is
- * available to do string copying.
- */
-#$d_strlcpy HAS_STRLCPY /**/
-
/* HAS_STRTOLD:
* This symbol, if defined, indicates that the strtold routine is
* available to convert strings to long doubles.
@@ -3028,6 +2975,22 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
*/
#$installusrbinperl INSTALL_USR_BIN_PERL /**/
+/* INTSIZE:
+ * This symbol contains the value of sizeof(int) so that the C
+ * preprocessor can make decisions based on it.
+ */
+/* LONGSIZE:
+ * This symbol contains the value of sizeof(long) so that the C
+ * preprocessor can make decisions based on it.
+ */
+/* SHORTSIZE:
+ * This symbol contains the value of sizeof(short) so that the C
+ * preprocessor can make decisions based on it.
+ */
+#define INTSIZE $intsize /**/
+#define LONGSIZE $longsize /**/
+#define SHORTSIZE $shortsize /**/
+
/* PERL_PRIfldbl:
* This symbol, if defined, contains the string used by stdio to
* format long doubles (format 'f') for output.
@@ -3092,6 +3055,15 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
*/
#define Mode_t $modetype /* file mode parameter for system calls */
+/* MULTIARCH:
+ * This symbol, if defined, signifies that the build
+ * process will produce some binary files that are going to be
+ * used in a cross-platform environment. This is the case for
+ * example with the NeXT "fat" binaries that contain executables
+ * for several CPUs.
+ */
+#$multiarch MULTIARCH /**/
+
/* VAL_O_NONBLOCK:
* This symbol is to be used during open() or fcntl(F_SETFL) to turn on
* non-blocking I/O for the file descriptor. Note that there is no way
@@ -3346,6 +3318,22 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
*/
#define PTRSIZE $ptrsize /**/
+/* HAS_QUAD:
+ * This symbol, if defined, tells that there's a 64-bit integer type,
+ * Quad_t, and its unsigned counterpar, Uquad_t. QUADKIND will be one
+ * of QUAD_IS_INT, QUAD_IS_LONG, QUAD_IS_LONG_LONG, or QUAD_IS_INT64_T.
+ */
+#$d_quad HAS_QUAD /**/
+#ifdef HAS_QUAD
+# define Quad_t $quadtype /**/
+# define Uquad_t $uquadtype /**/
+# define QUADKIND $quadkind /**/
+# define QUAD_IS_INT 1
+# define QUAD_IS_LONG 2
+# define QUAD_IS_LONG_LONG 3
+# define QUAD_IS_INT64_T 4
+#endif
+
/* Drand01:
* This macro is to be used to generate uniformly distributed
* random numbers over the range [0., 1.[. You may have to supply
@@ -3470,12 +3458,6 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
#define SITELIB_EXP "$sitelibexp" /**/
#define SITELIB_STEM "$sitelib_stem" /**/
-/* USE_SITECUSTOMIZE:
- * This symbol, if defined, indicates that sitecustomize should
- * be used.
- */
-#$usesitecustomize USE_SITECUSTOMIZE /**/
-
/* Size_t_size:
* This symbol holds the size of a Size_t in bytes.
*/
@@ -3619,6 +3601,12 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
#$useperlio USE_PERLIO /**/
#endif
+/* PERL_RELOCATABLE_INC:
+ * This symbol, if defined, indicates that we'd like to relocate entries
+ * in @INC at run time based on the location of the perl binary.
+ */
+#define PERL_RELOCATABLE_INC "$userelocatableinc" /**/
+
/* USE_SOCKS:
* This symbol, if defined, indicates that Perl should
* be built to use socks.
@@ -3920,6 +3908,12 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
*/
#$d_sigprocmask HAS_SIGPROCMASK /**/
+/* USE_SITECUSTOMIZE:
+ * This symbol, if defined, indicates that sitecustomize should
+ * be used.
+ */
+#$d_sitecustomize USE_SITECUSTOMIZE /**/
+
/* HAS_SOCKATMARK:
* This symbol, if defined, indicates that the sockatmark routine is
* available to test whether a socket is at the out-of-band mark.
@@ -3956,6 +3950,18 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
*/
#$d_strftime HAS_STRFTIME /**/
+/* HAS_STRLCAT:
+ * This symbol, if defined, indicates that the strlcat () routine is
+ * available to do string concatenation.
+ */
+#$d_strlcat HAS_STRLCAT /**/
+
+/* HAS_STRLCPY:
+ * This symbol, if defined, indicates that the strlcpy () routine is
+ * available to do string copying.
+ */
+#$d_strlcpy HAS_STRLCPY /**/
+
/* HAS_SYSCALL_PROTO:
* This symbol, if defined, indicates that the system provides
* a prototype for the syscall() function. Otherwise, it is up
diff --git a/handy.h b/handy.h
index 81483a81b7..d1872f2257 100644
--- a/handy.h
+++ b/handy.h
@@ -160,7 +160,7 @@ typedef U64TYPE U64;
#endif
/* HMB H.Merijn Brand - a placeholder for preparing Configure patches */
-#if defined(USE_SITECUSTOMIZE) || defined(LIBM_VERSION_TYPE)
+#if defined(LIBM_LIB_VERSION)
/* Not (yet) used at top level, but mention them for metaconfig */
#endif