--- a/src/test/resources/golden-sample/configure Tue Sep 12 22:42:12 2023 +0200 +++ b/src/test/resources/golden-sample/configure Tue Sep 12 23:36:45 2023 +0200 @@ -66,6 +66,7 @@ # # parse arguments # +BUILD_TYPE="default" for ARG in "$@" do case "$ARG" in @@ -83,6 +84,8 @@ "--infodir="*) INFODIR=${ARG#--infodir=} ;; "--mandir"*) MANDIR=${ARG#--mandir} ;; "--help"*) printhelp; rm -Rf "$TEMP_DIR"; exit 1 ;; + "--debug") BUILD_TYPE="debug" ;; + "--release") BUILD_TYPE="release" ;; "--enable-pg") FEATURE_PG=on ;; "--disable-pg") unset FEATURE_PG ;; "-"*) echo "unknown option: $ARG"; rm -Rf "$TEMP_DIR"; exit 1 ;; @@ -415,6 +418,14 @@ if [ -n "${TEMP_CXXFLAGS}" ]; then echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/config.mk" fi +if [ "$BUILD_TYPE" = "debug" ]; then + echo 'CFLAGS += ${DEBUG_FLAGS}' >> "$TEMP_DIR/config.mk" + echo 'CXXFLAGS += ${DEBUG_FLAGS}' >> "$TEMP_DIR/config.mk" +fi +if [ "$BUILD_TYPE" = "release" ]; then + echo 'CFLAGS += ${RELEASE_FLAGS}' >> "$TEMP_DIR/config.mk" + echo 'CXXFLAGS += ${RELEASE_FLAGS}' >> "$TEMP_DIR/config.mk" +fi if [ -n "${TEMP_LDFLAGS}" ]; then echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/config.mk" fi