aboutsummaryrefslogtreecommitdiffstats
path: root/conf/m4
diff options
context:
space:
mode:
authorFritz Elfert <felfert@to.com>2002-08-11 01:41:45 +0000
committerFritz Elfert <felfert@to.com>2002-08-11 01:41:45 +0000
commit0df34ec5ddb92ce7e3bcbb4f0eb24e30955ba3a1 (patch)
treebf25a83298b223ea71428b1453f3b3a04de902ef /conf/m4
parent8a6406733e385afc86d9937ff79f228ef40afc99 (diff)
downloadplptools-0df34ec5ddb92ce7e3bcbb4f0eb24e30955ba3a1.tar.gz
plptools-0df34ec5ddb92ce7e3bcbb4f0eb24e30955ba3a1.tar.bz2
plptools-0df34ec5ddb92ce7e3bcbb4f0eb24e30955ba3a1.zip
- Fixed setting of CFLAGS and CXXFLAGS: With --enable-debug, disable -O
- Removed ccmalloc support. Now using valgrind - Added missing mainainer-clean-local targets - Fixed uninitialized array in IOwatch, reported by valgrind. - Fixed missing definition of LC_ALL if compiling without -O - Fixed invalid access to datapump thread (not yet created), reported by valgrind. - Fixed wrong parameters of QRegExp when using QT 3.x - Fixed KTar initialization which has changed in KDE 3.x
Diffstat (limited to 'conf/m4')
-rw-r--r--conf/m4/plptools/PLP_CHECK_COMPILERS.m411
-rw-r--r--conf/m4/plptools/ccmalloc.m4102
2 files changed, 8 insertions, 105 deletions
diff --git a/conf/m4/plptools/PLP_CHECK_COMPILERS.m4 b/conf/m4/plptools/PLP_CHECK_COMPILERS.m4
index b665a32..278d5a8 100644
--- a/conf/m4/plptools/PLP_CHECK_COMPILERS.m4
+++ b/conf/m4/plptools/PLP_CHECK_COMPILERS.m4
@@ -39,7 +39,7 @@ AC_DEFUN(PLP_CHECK_COMPILERS,
if test "$GCC" = "yes"; then
if test "$plp_use_debug_code" = "yes"; then
- CFLAGS="-g -O2 $CFLAGS"
+ CFLAGS="-g $CFLAGS"
case $host in
*-*-linux-gnu)
CFLAGS="-Wpointer-arith $CFLAGS"
@@ -80,7 +80,7 @@ AC_DEFUN(PLP_CHECK_COMPILERS,
if test "$GXX" = "yes"; then
if test "$plp_use_debug_code" = "yes"; then
- CXXFLAGS="-g -O2 -Wpointer-arith -Wmissing-prototypes $CXXFLAGS"
+ CXXFLAGS="-g -Wpointer-arith -Wmissing-prototypes $CXXFLAGS"
PLP_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
PLP_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
@@ -156,9 +156,14 @@ AC_DEFUN(PLP_CHECK_COMPILERS,
IFS=$plp_safe_IFS
fi
+ if test "$plp_use_debug_code" = "yes"; then
+ STRIP=true
+ AC_SUBST(STRIP)
+ fi
+
AC_SUBST(NOOPT_CXXFLAGS)
THREADED_CFLAGS="-D_REENTRANT $CFLAGS"
- THREADED_CXXFLAGS="-D_REENTRANT $CFLAGS"
+ THREADED_CXXFLAGS="-D_REENTRANT $CXXFLAGS"
AC_SUBST(THREADED_CFLAGS)
AC_SUBST(THREADED_CXXFLAGS)
])
diff --git a/conf/m4/plptools/ccmalloc.m4 b/conf/m4/plptools/ccmalloc.m4
deleted file mode 100644
index 81b0a3a..0000000
--- a/conf/m4/plptools/ccmalloc.m4
+++ /dev/null
@@ -1,102 +0,0 @@
-dnl
-dnl Autoconf check for ccmalloc lib
-dnl
-dnl Adds an option --with-ccmalloc[=DIR] to your configure script
-dnl
-dnl Checks for libccmalloc and wrappers either in a specified dir or
-dnl in the default dirs /usr/lib /lib and /usr/local/lib
-dnl
-dnl If found, sets two variables:
-dnl
-dnl LIBCCMALLOC_CC link-commands to use for linking C projects
-dnl LIBCCMALLOC_CXX link-commands to use for linking C++ projects
-dnl
-dnl Example with autoconf:
-dnl
-dnl In your Makefile.in, put something like this:
-dnl
-dnl LDFLAGS=$(LIBS) @LIBCCMALLOC_CC@
-dnl
-dnl Example with automake:
-dnl
-dnl In your Makefile.am, put something like this:
-dnl
-dnl myprog_LDADD = $(LIBCCMALLOC_CC)
-dnl
-AC_DEFUN(AC_CHECK_CCMALLOC,[
- LIBCCMALLOC_CXX=
- LIBCCMALLOC_CC=
- AC_ARG_WITH(ccmalloc,
- [ --with-ccmalloc[=DIR] link against ccmalloc leak-checking lib],
- [
- search_dirs="/usr/lib /lib /usr/local/lib"
- case "${withval}" in
- yes)
- ccm_dirs=${search_dirs}
- ;;
- no)
- ccm_dirs=
- ;;
- *)
- ccm_dirs="${withval} ${search_dirs}"
- ;;
- esac
- AC_MSG_CHECKING(for libccmalloc)
- save_LIBS="$LIBS"
- AC_LANG_SAVE
- AC_LANG_C
- ccm_found=NO
- for d in ${ccm_dirs} ; do
- LIBS="$d/ccmalloc-gcc.o -L$d -lccmalloc -ldl"
- AC_TRY_LINK_FUNC(ccmalloc_report,ccm_found=$d ; break)
- done
- if test "${ccm_found}" = "NO" ; then
- AC_MSG_RESULT(not found)
- else
- libccmalloc="-L$ccm_found -lccmalloc -ldl"
- LIBCCMALLOC_CC="$LIBS"
- ccm_wrappers=gcc
- AC_LANG_CPLUSPLUS
- ccm_wrapper="$ccm_found/ccmalloc-g++.o"
- LIBS="$ccm_wrapper $libccmalloc"
- AC_TRY_LINK(
- [
- extern "C" {
- void ccmalloc_atexit(void(*)(void));
- };
- void myFoo() {}
- ],
- [ccmalloc_atexit(myFoo);],
- [ccm_wrappers="$ccm_wrappers g++"; LIBCCMALLOC_CXX="$LIBS"]
- )
- test "$ccm_wrappers" == "" && ccm_wrappers=none
- AC_MSG_RESULT([(wrappers: $ccm_wrappers) found])
- fi
- AC_LANG_RESTORE
- LIBS="$save_LIBS"
- ]
- )
- AC_SUBST(LIBCCMALLOC_CC)
- AC_SUBST(LIBCCMALLOC_CXX)
-])
-
-dnl
-dnl This function is the same like the above, with the extension, that
-dnl it adds the content of LIBCCMALLOC_CC to LIBS globally. You can
-dnl use it, if your project uses C sources only.
-dnl
-AC_DEFUN(AC_AUTO_CCMALLOC_CC,[
- AC_REQUIRE([AC_CHECK_CCMALLOC])
- LIBS="$LIBS $LIBCCMALLOC_CC"
-])
-
-dnl
-dnl This function is the same like the above, with the extension, that
-dnl it adds the content of LIBCCMALLOC_CXX to LIBS globally. You can
-dnl use it, if your project uses C++ sources only.
-dnl
-AC_DEFUN(AC_AUTO_CCMALLOC_CXX,[
- AC_REQUIRE([AC_CHECK_CCMALLOC])
- LIBS="$LIBS $LIBCCMALLOC_CXX"
-])
-