summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authordoko <doko@ubuntu.com>2012-06-30 16:52:05 +0200
committerdoko <doko@ubuntu.com>2012-06-30 16:52:05 +0200
commit57de52b75470d96889a351bc4a56585b6e247378 (patch)
tree59458420b643ca2515dcf34fa29e8e91ec53c7cf /configure
parentbbf70e3c42d5cf5c2f9fd767576ac14540f17377 (diff)
downloadcpython-57de52b75470d96889a351bc4a56585b6e247378.tar.gz
- Issue #14324: use a linker test to check for profiling support
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure42
1 files changed, 20 insertions, 22 deletions
diff --git a/configure b/configure
index 72c33e5192..9d247ae0c5 100755
--- a/configure
+++ b/configure
@@ -3211,7 +3211,7 @@ then
linux*) MACHDEP="linux";;
cygwin*) MACHDEP="cygwin";;
darwin*) MACHDEP="darwin";;
- irix646) MACHDEP="irix6";;
+ irix646) MACHDEP="irix6";;
'') MACHDEP="unknown";;
esac
fi
@@ -5424,37 +5424,35 @@ $as_echo "$enable_shared" >&6; }
$as_echo_n "checking for --enable-profiling... " >&6; }
# Check whether --enable-profiling was given.
if test "${enable_profiling+set}" = set; then :
- enableval=$enable_profiling; ac_save_cc="$CC"
- CC="$CC -pg"
- if test "$cross_compiling" = yes; then :
- ac_enable_profiling="no"
-else
+ enableval=$enable_profiling;
+fi
+
+if test "x$enable_profiling" = xyes; then
+ ac_save_cc="$CC"
+ CC="$(CC) -pg"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int main() { return 0; }
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ac_enable_profiling="yes"
+if ac_fn_c_try_link "$LINENO"; then :
+
else
- ac_enable_profiling="no"
+ enable_profiling=no
fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CC="$ac_save_cc"
+else
+ enable_profiling=no
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
+$as_echo "$enable_profiling" >&6; }
- CC="$ac_save_cc"
+if test "x$enable_profiling" = xyes; then
+ BASECFLAGS="-pg $BASECFLAGS"
+ LDFLAGS="-pg $LDFLAGS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
-$as_echo "$ac_enable_profiling" >&6; }
-
-case "$ac_enable_profiling" in
- "yes")
- BASECFLAGS="-pg $BASECFLAGS"
- LDFLAGS="-pg $LDFLAGS"
- ;;
-esac
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
$as_echo_n "checking LDLIBRARY... " >&6; }