From 3463063001f36c16e5f6ce9ad33cd12a376fc874 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Fri, 5 May 2023 17:34:57 -0400 Subject: [PATCH] autoconf: fix iconv library paths and pass cflags when building executables See 0f77167f for prior related work --- Makefile.am | 3 ++- configure.ac | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index c3ba886b..1c08480d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -145,11 +145,12 @@ runsuite_DEPENDENCIES = $(DEPS) runsuite_LDADD= $(LDADDS) xmllint_SOURCES=xmllint.c -xmllint_CFLAGS = $(AM_CFLAGS) $(RDL_CFLAGS) +xmllint_CFLAGS = $(AM_CFLAGS) $(RDL_CFLAGS) $(ICONV_CFLAGS) xmllint_DEPENDENCIES = $(DEPS) xmllint_LDADD= $(RDL_LIBS) $(LDADDS) xmlcatalog_SOURCES=xmlcatalog.c +xmlcatalog_CFLAGS = $(AM_CFLAGS) $(RDL_CFLAGS) $(ICONV_CFLAGS) xmlcatalog_DEPENDENCIES = $(DEPS) xmlcatalog_LDADD = $(RDL_LIBS) $(LDADDS) diff --git a/configure.ac b/configure.ac index 9c9ad572..51b58eb5 100644 --- a/configure.ac +++ b/configure.ac @@ -1036,7 +1036,7 @@ else if test "$with_iconv" != "yes" && test "$with_iconv" != "" ; then ICONV_DIR=$with_iconv CPPFLAGS="$CPPFLAGS -I$ICONV_DIR/include" - LIBS="$LIBS -L$ICONV_DIR/libs" + LIBS="$LIBS -L$ICONV_DIR/lib" # Export this since our headers include iconv.h XML_INCLUDEDIR="$XML_INCLUDEDIR -I$ICONV_DIR/include" fi @@ -1052,12 +1052,13 @@ else ICONV_LIBS="-liconv"])])]) if test "$WITH_ICONV" = "1" && test "$ICONV_DIR" != ""; then ICONV_CFLAGS="-I$ICONV_DIR/include" - ICONV_LIBS="-L$ICONV_DIR/libs $ICONV_LIBS" + ICONV_LIBS="-L$ICONV_DIR/lib $ICONV_LIBS" fi CPPFLAGS=$_cppflags LIBS=$_libs fi AC_SUBST(WITH_ICONV) +AC_SUBST(ICONV_CFLAGS) dnl dnl Checks for ICU library. @@ -1100,7 +1101,7 @@ else ICU_LIBS=-licucore if test "$ICU_DIR" != ""; then ICU_CFLAGS="-I$ICU_DIR/include" - ICU_LIBS="-L$ICU_DIR/libs $ICU_LIBS" + ICU_LIBS="-L$ICU_DIR/lib $ICU_LIBS" fi])]) CPPFLAGS=$_cppflags LIBS=$_libs