From 989aa254283d5b3f29245da23418fcb9d95a5c9f Mon Sep 17 00:00:00 2001 From: Renato Botelho do Couto Date: Mon, 3 Jul 2023 18:35:25 +0000 Subject: [PATCH] configure.ac: Fix --with-cligen=dir Fix CFLAGS and LDFLAGS when this option is used. It needs to look for headers under $includedir and for libraries under $libdir. --- configure.ac | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index b8f06d4e..def549cc 100644 --- a/configure.ac +++ b/configure.ac @@ -179,15 +179,14 @@ SH_SUFFIX=".so" LIBSTATIC_SUFFIX=".a" # This is for cligen -AC_ARG_WITH([cligen], AS_HELP_STRING([--with-cligen=dir],[Use CLIGEN installation in this dir])) +AC_ARG_WITH([cligen], [AS_HELP_STRING([--with-cligen=dir], [Use CLIGEN installation in this dir])], [ + CLIGEN_DIR="$withval" +]) +AC_SUBST(CLIGEN_DIR) if test -n "${CLIGEN_DIR}" -a -d "${CLIGEN_DIR}"; then - with_cligen=${CLIGEN_DIR} -fi -if test -d "${with_cligen}"; then - echo "Using CLIGEN here: ${with_cligen}" - CPPFLAGS="-I${with_cligen}/include ${CPPFLAGS}" - LDFLAGS="-L${with_cligen}/lib ${LDFLAGS}" - test -d "$with_cligen" && CLIGEN_PREFIX="$with_cligen" + echo "Using CLIGEN here: ${CLIGEN_DIR}" + CPPFLAGS="-I${CLIGEN_DIR}$(eval echo ${includedir}) ${CPPFLAGS}" + LDFLAGS="-L${CLIGEN_DIR}$(eval echo ${libdir}) ${LDFLAGS}" fi # Disable/enable yang patch