summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2008-12-03 13:51:36 +0100
committerH.Merijn Brand <h.m.brand@xs4all.nl>2008-12-03 14:55:52 +0000
commitfcdf39cfa40f83fdbf75ada879210410f127eef1 (patch)
treea5c1c9a2bd4338d7bd11cb05bc71ed2f23d46ac8 /Configure
parent302c0c93356e52f02a8925ac90ae96bf8db31000 (diff)
downloadperl-fcdf39cfa40f83fdbf75ada879210410f127eef1.tar.gz
Configure detection of __attribute__((deprecated))
From: "Rafael Garcia-Suarez" <rgarciasuarez@gmail.com> Message-ID: <b77c1dce0812030351j33d7b75ci3e2640b33f36acd9@mail.gmail.com> p4raw-id: //depot/perl@34994
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure32
1 files changed, 31 insertions, 1 deletions
diff --git a/Configure b/Configure
index e5ce51144c..1e0c25463d 100755
--- a/Configure
+++ b/Configure
@@ -25,7 +25,7 @@
# $Id: Head.U 6 2006-08-25 22:21:46Z rmanfredi $
#
-# Generated on Fri Nov 28 08:39:51 CET 2008 [metaconfig 3.5 PL0]
+# Generated on Wed Dec 3 15:26:54 CET 2008 [metaconfig 3.5 PL0]
# (with additional metaconfig patches by perlbug@perl.org)
cat >c1$$ <<EOF
@@ -361,6 +361,7 @@ d_aintl=''
d_alarm=''
asctime_r_proto=''
d_asctime_r=''
+d_attribute_deprecated=''
d_attribute_format=''
d_attribute_malloc=''
d_attribute_nonnull=''
@@ -10500,6 +10501,34 @@ set d_attribute_unused
eval $setvar
$rm -f attrib*
+: Look for GCC-style attribute deprecated
+case "$d_attribute_deprecated" in
+'')
+echo " "
+echo "Checking whether your compiler can handle __attribute__((deprecated)) ..." >&4
+$cat >attrib.c <<'EOCP'
+#include <stdio.h>
+int I_am_deprecated(void) __attribute__((deprecated));
+EOCP
+if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
+ if $contains 'warning' attrib.out >/dev/null 2>&1; then
+ echo "Your C compiler doesn't support __attribute__((deprecated))."
+ val="$undef"
+ else
+ echo "Your C compiler supports __attribute__((deprecated))."
+ val="$define"
+ fi
+else
+ echo "Your C compiler doesn't seem to understand __attribute__ at all."
+ val="$undef"
+fi
+;;
+*) val="$d_attribute_deprecated" ;;
+esac
+set d_attribute_deprecated
+eval $setvar
+$rm -f attrib*
+
: Look for GCC-style attribute warn_unused_result
case "$d_attribute_warn_unused_result" in
'')
@@ -22136,6 +22165,7 @@ d_asctime64='$d_asctime64'
d_asctime_r='$d_asctime_r'
d_atolf='$d_atolf'
d_atoll='$d_atoll'
+d_attribute_deprecated='$d_attribute_deprecated'
d_attribute_format='$d_attribute_format'
d_attribute_malloc='$d_attribute_malloc'
d_attribute_nonnull='$d_attribute_nonnull'