diff --git a/Config b/Config index c35c7a7db..ecba7de22 100755 --- a/Config +++ b/Config @@ -66,7 +66,7 @@ if [ "$MYSQL" != "yes" ] ; then fi -echo "./configure $WITH_BIN $WITH_DATA $WITH_ENC $WITH_RUN $WITH_PERM $WITH_MYSQL" +echo "./configure $WITH_BIN $WITH_DATA $WITH_ENC $WITH_RUN $WITH_PERM $WITH_MYSQL --with-debugsym" ./configure $WITH_BIN $WITH_DATA $WITH_ENC $WITH_RUN $WITH_PERM $WITH_MYSQL } diff --git a/configure b/configure index b0e45b19f..b0dd773e3 100755 --- a/configure +++ b/configure @@ -1260,6 +1260,8 @@ Optional Packages: --with-bindir=bindir Specify the default binary dir for anope --with-makebin=run-cc.pl Specify the default make binary to use --with-datadir=datadir Specify the location of the services data folder + --with-optimisation=1|2|3|4|5 Specify the optimisation level + --with-debugsym Include debugging symbols Some influential environment variables: CC C compiler command @@ -1694,6 +1696,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +# Clear out any CFLAGS (cept -g) the os is using, usually -g -O2 +CFLAGS="-g" + # If no bindir, we tell him to run ./Config. if test "${with_bindir+set}" != set || test "${with_datadir+set}" != set; then echo "You might want to run ./Config or provide some parameters to this script." @@ -4179,7 +4184,6 @@ fi - { echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } if test "${ac_cv_func_dlopen+set}" = set; then @@ -7734,6 +7738,7 @@ fi + # Check whether --with-permissions was given. if test "${with_permissions+set}" = set; then withval=$with_permissions; @@ -7801,6 +7806,25 @@ fi + +# Check whether --with-optimization was given. +if test "${with_optimization+set}" = set; then + withval=$with_optimization; + CFLAGS="$CFLAGS -O$withval" + +fi + + + +# Check whether --with-debugsym was given. +if test "${with_debugsym+set}" = set; then + withval=$with_debugsym; + CFLAGS="$CFLAGS -g" + +fi + + + ac_config_files="$ac_config_files Makefile src/bin/anoperc" @@ -8914,6 +8938,8 @@ cat <