diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 57 |
1 files changed, 29 insertions, 28 deletions
@@ -32,7 +32,6 @@ configure_args="$@" # If the user sets one of these to 1, purple won't disable them. # Otherwise, if it's still default-on, it gets included in normal builds, # but not purple ones. -msn="default-on" jabber="default-on" oscar="default-on" @@ -47,8 +46,6 @@ gcov=0 asan=0 plugins=1 otr=0 -skype=0 -devel=0 events=glib ssl=auto @@ -130,7 +127,6 @@ Option Description Default --verbose=0/1 Disable/enable verbose build $verbose ---msn=0/1 Disable/enable MSN part $msn --jabber=0/1 Disable/enable Jabber part $jabber --oscar=0/1 Disable/enable Oscar part (ICQ, AIM) $oscar --twitter=0/1 Disable/enable Twitter part $twitter @@ -150,9 +146,6 @@ Option Description Default --plugins=0/1 Disable/enable plugins support $plugins --otr=0/1/auto/plugin Disable/enable OTR encryption support $otr ---skype=0/1/plugin - Disable/enable Skype support $skype ---devel=0/1 Disable/enable header install $devel --events=... Event handler (glib, libevent) $events --ssl=... SSL library to use (gnutls, nss, openssl, auto) @@ -345,9 +338,9 @@ else fi echo "CC=$CC" >> Makefile.settings; -if echo $CC | grep -qw gcc; then +if echo $CC | grep -qw 'gcc\|clang'; then # Apparently -Wall is gcc-specific? - echo CFLAGS+=-Wall >> Makefile.settings + echo CFLAGS+=-Wall -Wformat -Werror=format-security >> Makefile.settings fi if [ -z "$LD" ]; then @@ -495,6 +488,16 @@ int main() } ' +BACKTRACE_TESTCODE=' +#include <execinfo.h> + +int main() +{ + void *trace[16]; + return backtrace(trace, 16); +} +' + detect_resolv_dynamic() { case "$arch" in @@ -592,6 +595,19 @@ detect_nameser_has_ns_types() return $ret } +detect_backtrace() +{ + TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX) + ret=1 + echo "$BACKTRACE_TESTCODE" | $CC -o $TMPFILE -x c - >/dev/null 2>/dev/null + if [ "$?" = "0" ]; then + ret=0 + fi + + rm -f $TMPFILE + return $ret +} + if [ "$ssl" = "auto" ]; then detect_gnutls if [ "$ret" = "0" ]; then @@ -661,6 +677,10 @@ else echo 'Insufficient resolv routines. Jabber server must be set explicitly' fi +if detect_backtrace; then + echo '#define HAVE_BACKTRACE' >> config.h + echo '#define CRASHFILE "'$config'crash.log"' >> config.h +fi STORAGES="xml" @@ -764,16 +784,6 @@ elif [ "$otr" = "plugin" ]; then echo 'OTR_PI=otr.so' >> Makefile.settings fi -if [ "$skype" = "1" -o "$skype" = "plugin" ]; then - if [ "$arch" = "Darwin" ]; then - echo "SKYPEFLAGS=-dynamiclib -undefined dynamic_lookup" >> Makefile.settings - else - echo "SKYPEFLAGS=-fPIC -shared" >> Makefile.settings - fi - echo 'SKYPE_PI=skype.so' >> Makefile.settings - protocols_mods="$protocol_mods skype(plugin)" -fi - if [ -z "$PYTHON" ]; then PYTHON=python fi @@ -855,7 +865,6 @@ EOF protoobjs=$protoobjs'purple_mod.o ' # only disable these if the user didn't enable them explicitly - [ "$msn" = "default-on" ] && msn=0 [ "$jabber" = "default-on" ] && jabber=0 [ "$oscar" = "default-on" ] && oscar=0 @@ -878,14 +887,6 @@ case "$CC" in done esac -if [ "$msn" = 0 ]; then - echo '#undef WITH_MSN' >> config.h -else - echo '#define WITH_MSN' >> config.h - protocols=$protocols'msn ' - protoobjs=$protoobjs'msn_mod.o ' -fi - if [ "$jabber" = 0 ]; then echo '#undef WITH_JABBER' >> config.h else |