From: Art Cancro Date: Sat, 2 Sep 2023 02:42:03 +0000 (-0400) Subject: Include -lintl where we need it on systems that have it X-Git-Tag: v992~3 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=ee28f6d766f86a39bfe0e0ffcebb374f3ae8f587;p=citadel.git Include -lintl where we need it on systems that have it --- diff --git a/citadel/GNUmakefile b/citadel/GNUmakefile index 5209a31cd..49dc6fad7 100644 --- a/citadel/GNUmakefile +++ b/citadel/GNUmakefile @@ -36,7 +36,7 @@ citserver: $(SERVER_OBJECTS) $(BACKEND_OBJECTS) -o citserver setup: utils/setup.c server/citadel_dirs.c utils/*.h server/*.h - ${CC} ${CFLAGS} ${LDFLAGS} utils/setup.c -lcitadel -lintl -o setup + ${CC} ${CFLAGS} ${LDFLAGS} utils/setup.c -lcitadel ${LINTL} -o setup ctdlmigrate: utils/ctdlmigrate.c server/citadel_dirs.c utils/*.h server/*.h ${CC} ${CFLAGS} ${LDFLAGS} utils/ctdlmigrate.c -lcitadel -lreadline -o ctdlmigrate diff --git a/citadel/configure b/citadel/configure index 8f6804489..b36064620 100755 --- a/citadel/configure +++ b/citadel/configure @@ -137,6 +137,29 @@ $CC $CFLAGS $CPPFLAGS $tempcc -lresolv -o $tempfile && { } +######################################################################## +# Test for -lintl +######################################################################## +echo Testing for lintl... +tempfile=`tempfile 2>/dev/null` || tempfile=/tmp/configure.$$ +tempcc=${tempfile}.c +cat >$tempcc < +#include +#include +#include +int main(int argc, char **argv) { + return(0); +} +! + +$CC $CFLAGS $CPPFLAGS $tempcc -lintl -o $tempfile && { + LINTL='-lintl' +} || { + LINTL='' +} + + ######################################################################## # This is needed to link Berkeley DB. We will add more here later. ######################################################################## @@ -160,6 +183,7 @@ CFLAGS=${CFLAGS}' -DCTDLDIR=\"'${CTDLDIR}'\"' echo "CFLAGS := ${CFLAGS} ${CPPFLAGS}" echo "LDFLAGS := ${LDFLAGS}" echo "LRESOLV := ${LRESOLV}" + echo "LINTL := ${LINTL}" echo "BACKEND_LDFLAGS := ${BACKEND_LDFLAGS}" ) >config.mk