From 31fc3970e53409f71ed7d09e277e0e33461ad571 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 27 Dec 2025 03:21:03 +0100 Subject: Use simpler flags for gcov. --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 22989f60..02f01225 100755 --- a/configure +++ b/configure @@ -374,8 +374,8 @@ else fi if [ "$gcov" = "1" ]; then - echo "CFLAGS+=-ftest-coverage -fprofile-arcs" >> Makefile.settings - echo "EFLAGS+=-lgcov" >> Makefile.settings + echo "CFLAGS+=--coverage" >> Makefile.settings + echo "EFLAGS+=--coverage" >> Makefile.settings fi if [ "$plugins" = 0 ]; then -- cgit v1.2.3 From 4af7b4fa9b0cc85ea8b7a00f748c324d5f56b47b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 2 Apr 2008 16:34:57 +0200 Subject: Use pkg-config file for gnutls if possible. This allows building against a gnutls built for a an architecture other than the host architecture. --- configure | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 22989f60..9b393156 100755 --- a/configure +++ b/configure @@ -212,7 +212,14 @@ echo 'EVENT_HANDLER=events_'$events'.o' >> Makefile.settings detect_gnutls() { - if libgnutls-config --version > /dev/null 2> /dev/null; then + if $PKG_CONFIG --exists gnutls; then + cat <>Makefile.settings +EFLAGS+=`$PKG_CONFIG --libs gnutls` +CFLAGS+=`$PKG_CONFIG --cflags gnutls` +EOF + ssl=gnutls + ret=1 + elif libgnutls-config --version > /dev/null 2> /dev/null; then cat <>Makefile.settings EFLAGS+=`libgnutls-config --libs` CFLAGS+=`libgnutls-config --cflags` -- cgit v1.2.3 From f1e74072b7a69c8ac9dd80c0ca53af72b893b08a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 2 Apr 2008 17:38:34 +0200 Subject: Add --target argument to configure to allow cross-compilation. --- configure | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 22989f60..20a39520 100755 --- a/configure +++ b/configure @@ -73,6 +73,8 @@ Option Description Default --events=... Event handler (glib, libevent) $events --ssl=... SSL library to use (gnutls, nss, openssl, bogus, auto) $ssl + +--target=... Cross compilation target same as host EOF exit; fi @@ -131,6 +133,13 @@ cat<config.h #define CPU "$cpu" EOF +if [ -n "$target" ]; then + PKG_CONFIG_PATH=/usr/$target/lib/pkgconfig + PATH=/usr/$target/bin:$PATH + CC=$target-cc + LD=$target-ld +fi + if [ "$debug" = "1" ]; then [ -z "$CFLAGS" ] && CFLAGS=-g echo 'DEBUG=1' >> Makefile.settings @@ -157,15 +166,17 @@ fi echo "CC=$CC" >> Makefile.settings; -if [ -n "$LD" ]; then - echo "LD=$LD" >> Makefile.settings; -elif type ld > /dev/null 2> /dev/null; then - echo "LD=ld" >> Makefile.settings; -else - echo 'Cannot find ld, aborting.' - exit 1; +if [ -z "$LD" ]; then + if type ld > /dev/null 2> /dev/null; then + LD=ld + else + echo 'Cannot find ld, aborting.' + exit 1; + fi fi +echo "LD=$LD" >> Makefile.settings + if [ -z "$PKG_CONFIG" ]; then PKG_CONFIG=pkg-config fi @@ -488,6 +499,10 @@ CYGWIN* ) ;; esac +if [ -n "$target" ]; then + echo "Cross-compiling for: $target" +fi + echo echo 'Configuration done:' -- cgit v1.2.3