summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2014-03-29 11:22:29 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2014-03-29 11:22:29 +0100
commitcd5f3bea4c6ce15832badd350d35d5f13dd899f7 (patch)
tree235a81f28ab7ac99ae59a0c422b21d2bfe51333e
parent24d570d6635c918dd2d2b26a7c4195231d2268f5 (diff)
Disable assert() code when compiling for powerpc-apple-darwin
-rwxr-xr-xcompile.sh2
-rw-r--r--configure.ac14
2 files changed, 15 insertions, 1 deletions
diff --git a/compile.sh b/compile.sh
index c948c6b..39fcfc0 100755
--- a/compile.sh
+++ b/compile.sh
@@ -311,7 +311,7 @@ then
# libewf should work under MacOSX but it hasn't been tested
# use --with-ncurses-lib=$prefix/usr/lib to get binaries that don't need libncurses
# but users may be unable to navigate...
- $confdir/configure --host=$crosscompile_target --prefix=$prefix $CONFIGUREOPT --without-ewf --enable-sudo --with-sudo-bin=/usr/bin/sudo --disable-qt
+ $confdir/configure --host=$crosscompile_target --prefix=$prefix $CONFIGUREOPT --without-ewf --enable-sudo --with-sudo-bin=/usr/bin/sudo --disable-qt --disable-assert
;;
i686-apple-darwin9)
$confdir/configure --host=$crosscompile_target --prefix=$prefix $CONFIGUREOPT --enable-sudo --with-sudo-bin=/usr/bin/sudo --disable-qt
diff --git a/configure.ac b/configure.ac
index ed8e1e4..1d19808 100644
--- a/configure.ac
+++ b/configure.ac
@@ -179,6 +179,15 @@ AC_ARG_WITH([uuid],
# AS_HELP_STRING(--with-carvpath-includes=DIR,location of the carvpath includes files),
# [CPPFLAGS="${CPPFLAGS} -I${withval}"])
+AC_ARG_ENABLE([assert],
+ AS_HELP_STRING(--enable-assert, enable compilation of assert code (default is YES)),
+ [case "${enableval}" in
+ yes) use_assert=true ;;
+ no) use_assert=false ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-assert]) ;;
+ esac],
+ [use_assert=true])
+
AC_ARG_ENABLE([sudo],
AS_HELP_STRING(--enable-sudo,enable use of sudo (default is NO)),
[case "${enableval}" in
@@ -809,6 +818,11 @@ then
AC_DEFINE_UNQUOTED([SUDO_BIN], "$SUDO_BIN", [Path to sudo for privileged operations])
fi
+if test "$use_assert" = "false";
+then
+ AC_DEFINE(NDEBUG, 1, [Disable the assert error checking])
+fi
+
#reiserfs_fs_open_fast may not been detected because of lack of -ldal
OLDLIBS="$LIBS"
LIBS="$OLDLIBS $testdisk_LDADD -ldal"