aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2025-12-08 18:05:13 -0800
committerPaul Eggert2025-12-08 18:19:41 -0800
commit4990849514899d1f4c7c8e4d92f83b0e1f62d95e (patch)
tree4266db9f6613f1416ec63aeeca101f049036a654
parent238c2dc3b65dac13bfdf6759a8141d8b645bb1ed (diff)
downloademacs-4990849514899d1f4c7c8e4d92f83b0e1f62d95e.tar.gz
emacs-4990849514899d1f4c7c8e4d92f83b0e1f62d95e.zip
Move Gnulib configuration back to where it was
* configure.ac: Move the gl_INIT call back to where it was, as Mattias Engdegård reported the following problem: checking whether pthread_sigmask is a macro... no ./configure: line 32767: test: =: unary operator expected because moving gl_INIT up made the check for pthread_sigmask’s availability appear later than Gnulib’s check whether it’s a macro. Instead of moving gl_INIT up, call gl_ALIGNASOF earlier, as that’s the only part of gl_INIT that is needed earlier.
-rw-r--r--configure.ac53
1 files changed, 28 insertions, 25 deletions
diff --git a/configure.ac b/configure.ac
index 2c29633a6a9..eeb3f4bbd7d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3226,31 +3226,6 @@ to configure.])
3226 fi 3226 fi
3227fi 3227fi
3228 3228
3229# Configure gnulib.
3230#
3231# Do this after any CC or CFLAGS changes that affect Gnulib,
3232# and before any tests that depend on gnulib tests,
3233# e.g., the system_malloc=no test below.
3234#
3235# Do not affect CFLAGS or LIBS permanently.
3236# Instead, temporarily revert them to their pre-pkg-config values,
3237# because gnulib needs to work with both src (which uses the
3238# pkg-config stuff) and lib-src (which does not). For example, gnulib
3239# may need to determine whether CLOCK_TIME_LIB should contain -lrt,
3240# and it therefore needs to run in an environment where LIBS does not
3241# already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
3242# for some package unrelated to lib-src.
3243SAVE_CFLAGS=$CFLAGS
3244SAVE_LIBS=$LIBS
3245CFLAGS=$pre_PKG_CONFIG_CFLAGS
3246LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"
3247gl_ASSERT_NO_GNULIB_POSIXCHECK
3248gl_ASSERT_NO_GNULIB_TESTS
3249gl_EEMALLOC
3250gl_INIT
3251CFLAGS=$SAVE_CFLAGS
3252LIBS=$SAVE_LIBS
3253
3254# Does the opsystem file prohibit the use of the GNU malloc? 3229# Does the opsystem file prohibit the use of the GNU malloc?
3255# Assume not, until told otherwise. 3230# Assume not, until told otherwise.
3256GNU_MALLOC=yes 3231GNU_MALLOC=yes
@@ -3302,6 +3277,15 @@ if test "$emacs_cv_struct_alignment" = yes; then
3302 structure to an N-byte boundary.]) 3277 structure to an N-byte boundary.])
3303fi 3278fi
3304 3279
3280# Check for alignas now rather than waiting for gl_INIT to do it,
3281# as the system_malloc=no test below needs $gl_cv_header_working_stdalign_h.
3282# Do not simply call gl_INIT here, as the ac_cv_func_pthread_sigmask=yes
3283# assignment below affects how gl_INIT works.
3284# Instead, call gl_ALIGNASOF, the only part of gl_INIT needed here.
3285# Then make gl_ALIGNASOF a no-op so gl_INIT does not duplicate its code.
3286gl_ALIGNASOF
3287AC_DEFUN([gl_ALIGNASOF])
3288
3305system_malloc=yes 3289system_malloc=yes
3306 3290
3307# If it appears as if the system malloc can't be trusted to return 3291# If it appears as if the system malloc can't be trusted to return
@@ -7384,6 +7368,25 @@ if test "$with_features" = no && test "$enable_acl" != yes; then
7384 enable_acl=no 7368 enable_acl=no
7385fi 7369fi
7386 7370
7371# Configure gnulib. Although this does not affect CFLAGS or LIBS permanently,
7372# it temporarily reverts them to their pre-pkg-config values,
7373# because gnulib needs to work with both src (which uses the
7374# pkg-config stuff) and lib-src (which does not). For example, gnulib
7375# may need to determine whether CLOCK_TIME_LIB should contain -lrt,
7376# and it therefore needs to run in an environment where LIBS does not
7377# already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
7378# for some package unrelated to lib-src.
7379SAVE_CFLAGS=$CFLAGS
7380SAVE_LIBS=$LIBS
7381CFLAGS=$pre_PKG_CONFIG_CFLAGS
7382LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"
7383gl_ASSERT_NO_GNULIB_POSIXCHECK
7384gl_ASSERT_NO_GNULIB_TESTS
7385gl_EEMALLOC
7386gl_INIT
7387CFLAGS=$SAVE_CFLAGS
7388LIBS=$SAVE_LIBS
7389
7387# Set up libgmp on Android. Make sure to override what gnulib has 7390# Set up libgmp on Android. Make sure to override what gnulib has
7388# found. 7391# found.
7389LIBGMP_CFLAGS= 7392LIBGMP_CFLAGS=