summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2011-04-02 05:43:24 +0000
committerMorgan Deters <mdeters@gmail.com>2011-04-02 05:43:24 +0000
commit41362e76ebc0073c1801700da574b6265dcbc6a9 (patch)
tree7b7e35e857bbfc2728316d75c028347c1833a6f0 /configure.ac
parent80154c23a16b43b67723781a4b6268e684a4b307 (diff)
with --with-google-perftools, don't just take it on blind faith, require a successful link at configure time
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac41
1 files changed, 23 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac
index fae1ec329..25108adcc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -173,24 +173,6 @@ AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
-# Whether to compile with google profiling tools
-cvc4_use_google_perftools=0
-AC_ARG_WITH(
- [google_perftools],
- AS_HELP_STRING(
- [--with-google-perftools],
- [use Google Performance Tools]
- ),
- [if test "$withval" != no; then
- cvc4_use_google_perftools=1
- fi
- ]
-)
-
-if test $cvc4_use_google_perftools = 1; then
- LIBS="${LIBS:+$LIBS } -ltcmalloc -lpthread "
-fi
-
# [chris 8/24/2010] The user *must* specify --with-cln to get CLN
# (and, thus, opt in to the GPL dependency).
@@ -722,6 +704,28 @@ AC_CHECK_HEADERS([getopt.h unistd.h])
#AC_TYPE_UINT64_T
#AC_TYPE_SIZE_T
+# Whether to compile with google profiling tools
+cvc4_use_google_perftools=0
+AC_ARG_WITH(
+ [google_perftools],
+ AS_HELP_STRING(
+ [--with-google-perftools],
+ [use Google Performance Tools]
+ ),
+ [if test "$withval" != no; then
+ cvc4_use_google_perftools=1
+ fi
+ ]
+)
+
+AC_MSG_CHECKING([whether to link in google perftools libraries])
+if test $cvc4_use_google_perftools = 1; then
+ AC_MSG_RESULT([yes])
+ AC_CHECK_LIB([tcmalloc], [MallocExtension_GetAllocatedSize], , [AC_MSG_ERROR([cannot link google-perftools test program])], [-lpthread])
+else
+ AC_MSG_RESULT([no (user didn't request it)])
+fi
+
# Check for availability of TLS support (e.g. __thread storage class)
AC_MSG_CHECKING([whether to use compiler-supported TLS if available])
AC_ARG_ENABLE([tls], AS_HELP_STRING([--disable-tls], [don't use compiler-native TLS]))
@@ -881,6 +885,7 @@ MP library : $mplibrary
CPPFLAGS : $CPPFLAGS
CXXFLAGS : $CXXFLAGS
CFLAGS : $CFLAGS
+LIBS : $LIBS
LDFLAGS : $LDFLAGS
libcvc4 version : $CVC4_LIBRARY_VERSION
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback