From 90ea2fabe6b5b4ddeeddc6c67f33bda5df42599d Mon Sep 17 00:00:00 2001 From: Paul Fertser Date: Sun, 27 Mar 2022 20:40:27 +0300 Subject: [PATCH 1/2] Fix autoconf warning about AC_CANONICAL_TARGET ordering AM_INIT_AUTOMAKE requires AC_ARG_PROGRAM so should go after AC_CANONICAL_TARGET for proper program name mangling. This fixes "AC_ARG_PROGRAM was called before AC_CANONICAL_TARGET" warning as emitted by autoconf 2.69. --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 5f543c4c..1bb94df6 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,6 @@ AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([src/main.c]) AC_CONFIG_HEADERS([src/config.h]) -AM_INIT_AUTOMAKE([foreign subdir-objects]) AC_PROG_CC LT_INIT @@ -23,6 +22,8 @@ AS_CASE([$target_os], [cygwin], [PLATFORM="cygwin"], [PLATFORM="nix"]) +AM_INIT_AUTOMAKE([foreign subdir-objects]) + PACKAGE_STATUS="development" ## Get git branch and revision if in development From 08212a839acd1c9002c4cf324944f7ee72189f3e Mon Sep 17 00:00:00 2001 From: Paul Fertser Date: Sun, 27 Mar 2022 20:49:19 +0300 Subject: [PATCH 2/2] Fix AM_CFLAGS assignments (including libstrophe flags) Autoconf can pre-populate this variable with essential parameters so it should be appended to rather than overridden. While at it, don't miss to append CFLAGS for libstrope which is needed if it's installed to a non-default location. --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 1bb94df6..e0a33ec8 100644 --- a/configure.ac +++ b/configure.ac @@ -348,7 +348,7 @@ AC_CHECK_LIB([expect], [exp_expectl], [AM_CONDITIONAL([HAVE_EXPECT], [true])], [AC_MSG_NOTICE([libexpect not found, will not be able to run functional tests])]) ## Default parameters -AM_CFLAGS="-Wall -Wno-deprecated-declarations -std=gnu99" +AM_CFLAGS="$AM_CFLAGS -Wall -Wno-deprecated-declarations -std=gnu99" AM_LDFLAGS="$AM_LDFLAGS -export-dynamic" AS_IF([test "x$PACKAGE_STATUS" = xdevelopment], @@ -356,7 +356,7 @@ AS_IF([test "x$PACKAGE_STATUS" = xdevelopment], AS_IF([test "x$PLATFORM" = xosx], [AM_CFLAGS="$AM_CFLAGS -Qunused-arguments"]) -AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS $glib_CFLAGS $gio_CFLAGS $curl_CFLAGS ${SQLITE_CFLAGS}" +AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS $glib_CFLAGS $gio_CFLAGS $curl_CFLAGS ${SQLITE_CFLAGS} $libstrophe_CFLAGS" AM_CFLAGS="$AM_CFLAGS $libnotify_CFLAGS ${GTK_CFLAGS} $python_CFLAGS" AM_CFLAGS="$AM_CFLAGS -DTHEMES_PATH=\"\\\"$THEMES_PATH\\\"\" -DICONS_PATH=\"\\\"$ICONS_PATH\\\"\" -DGLOBAL_PYTHON_PLUGINS_PATH=\"\\\"$GLOBAL_PYTHON_PLUGINS_PATH\\\"\" -DGLOBAL_C_PLUGINS_PATH=\"\\\"$GLOBAL_C_PLUGINS_PATH\\\"\"" LIBS="$glib_LIBS $gio_LIBS $PTHREAD_LIBS $curl_LIBS $libnotify_LIBS $python_LIBS ${GTK_LIBS} ${SQLITE_LIBS} $LIBS"