configure: Pass compiler flag to enable ICU only when building util.encodings

Passing it in CFLAGS applied to all modules, which was not needed.
This commit is contained in:
Kim Alvefur 2020-07-12 23:28:04 +02:00
parent 68b6e79bd6
commit 57c5c4ddbe
3 changed files with 5 additions and 1 deletions

3
configure vendored
View file

@ -524,7 +524,7 @@ fi
if [ "$IDN_LIBRARY" = "icu" ]
then
IDNA_LIBS="$ICU_FLAGS"
CFLAGS="$CFLAGS -DUSE_STRINGPREP_ICU"
IDNA_FLAGS="-DUSE_STRINGPREP_ICU"
fi
if [ "$IDN_LIBRARY" = "idn" ]
then
@ -569,6 +569,7 @@ LUA_INCDIR=$LUA_INCDIR
LUA_LIBDIR=$LUA_LIBDIR
LUA_BINDIR=$LUA_BINDIR
IDN_LIB=$IDN_LIB
IDNA_FLAGS=$IDNA_FLAGS
IDNA_LIBS=$IDNA_LIBS
OPENSSL_LIBS=$OPENSSL_LIBS
CFLAGS=$CFLAGS

View file

@ -24,6 +24,7 @@ install: $(ALL)
clean:
rm -f $(ALL) $(patsubst %.so,%.o,$(ALL))
encodings.o: CFLAGS+=$(IDNA_FLAGS)
encodings.so: LDLIBS+=$(IDNA_LIBS)
hashes.so: LDLIBS+=$(OPENSSL_LIBS)

View file

@ -23,6 +23,8 @@ install: $(ALL)
clean:
rm -f $(ALL) $(patsubst %.so,%.o,$(ALL))
encodings.o: encodings.c
$(CC) $(CFLAGS) $(IDNA_FLAGS) -c -o $@ $<
encodings.so: encodings.o
$(LD) $(LDFLAGS) -o $@ $< $(LDLIBS) $(IDNA_LIBS)