diff options
| author | Paul Eggert | 2025-12-08 18:05:13 -0800 |
|---|---|---|
| committer | Paul Eggert | 2025-12-08 18:19:41 -0800 |
| commit | 4990849514899d1f4c7c8e4d92f83b0e1f62d95e (patch) | |
| tree | 4266db9f6613f1416ec63aeeca101f049036a654 | |
| parent | 238c2dc3b65dac13bfdf6759a8141d8b645bb1ed (diff) | |
| download | emacs-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.ac | 53 |
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 |
| 3227 | fi | 3227 | fi |
| 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. | ||
| 3243 | SAVE_CFLAGS=$CFLAGS | ||
| 3244 | SAVE_LIBS=$LIBS | ||
| 3245 | CFLAGS=$pre_PKG_CONFIG_CFLAGS | ||
| 3246 | LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS" | ||
| 3247 | gl_ASSERT_NO_GNULIB_POSIXCHECK | ||
| 3248 | gl_ASSERT_NO_GNULIB_TESTS | ||
| 3249 | gl_EEMALLOC | ||
| 3250 | gl_INIT | ||
| 3251 | CFLAGS=$SAVE_CFLAGS | ||
| 3252 | LIBS=$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. |
| 3256 | GNU_MALLOC=yes | 3231 | GNU_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.]) |
| 3303 | fi | 3278 | fi |
| 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. | ||
| 3286 | gl_ALIGNASOF | ||
| 3287 | AC_DEFUN([gl_ALIGNASOF]) | ||
| 3288 | |||
| 3305 | system_malloc=yes | 3289 | system_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 |
| 7385 | fi | 7369 | fi |
| 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. | ||
| 7379 | SAVE_CFLAGS=$CFLAGS | ||
| 7380 | SAVE_LIBS=$LIBS | ||
| 7381 | CFLAGS=$pre_PKG_CONFIG_CFLAGS | ||
| 7382 | LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS" | ||
| 7383 | gl_ASSERT_NO_GNULIB_POSIXCHECK | ||
| 7384 | gl_ASSERT_NO_GNULIB_TESTS | ||
| 7385 | gl_EEMALLOC | ||
| 7386 | gl_INIT | ||
| 7387 | CFLAGS=$SAVE_CFLAGS | ||
| 7388 | LIBS=$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. |
| 7389 | LIBGMP_CFLAGS= | 7392 | LIBGMP_CFLAGS= |