diff options
| author | Paul Eggert | 2012-07-16 19:09:58 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-07-16 19:09:58 -0700 |
| commit | 5dad233cb8553df9b37da260dd9cc350f781b2df (patch) | |
| tree | 121a213d19600e5d8e91afaa13e9dccdfeff8ee6 | |
| parent | 758e556a7ab8f61c007e34310ba399a9aaf15362 (diff) | |
| download | emacs-5dad233cb8553df9b37da260dd9cc350f781b2df.tar.gz emacs-5dad233cb8553df9b37da260dd9cc350f781b2df.zip | |
Fix regression with pthread_sigmask on FreeBSD.
* configure.ac: Configure gnulib at the end, not before running
pkg-config. This restores the behavior before 2012-06-22, when
higher-resolution time stamps were added, and fixes a bug whereby
LIB_PTHREAD was not used and gnulib's part of 'configure'
therefore incorrectly assumed that pthread_sigmask wasn't working.
Fix the problem with -lrt and clock_gettime a different way.
This should complete the fix for Bug#11884.
(pre_PKG_CONFIG_CFLAGS, pre_PKG_CONFIG_LIBS): New shell vars.
| -rw-r--r-- | ChangeLog | 12 | ||||
| -rw-r--r-- | configure.ac | 32 |
2 files changed, 35 insertions, 9 deletions
| @@ -1,3 +1,15 @@ | |||
| 1 | 2012-07-17 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Fix regression with pthread_sigmask on FreeBSD (Bug#11884). | ||
| 4 | * configure.ac: Configure gnulib at the end, not before running | ||
| 5 | pkg-config. This restores the behavior before 2012-06-22, when | ||
| 6 | higher-resolution time stamps were added, and fixes a bug whereby | ||
| 7 | LIB_PTHREAD was not used and gnulib's part of 'configure' | ||
| 8 | therefore incorrectly assumed that pthread_sigmask wasn't working. | ||
| 9 | Fix the problem with -lrt and clock_gettime a different way. | ||
| 10 | This should complete the fix for Bug#11884. | ||
| 11 | (pre_PKG_CONFIG_CFLAGS, pre_PKG_CONFIG_LIBS): New shell vars. | ||
| 12 | |||
| 1 | 2012-07-15 Paul Eggert <eggert@cs.ucla.edu> | 13 | 2012-07-15 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 14 | ||
| 3 | Merge from gnulib, incorporating: | 15 | Merge from gnulib, incorporating: |
diff --git a/configure.ac b/configure.ac index a553c340b85..12869e14e77 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -1104,12 +1104,8 @@ case $opsys in | |||
| 1104 | esac | 1104 | esac |
| 1105 | 1105 | ||
| 1106 | 1106 | ||
| 1107 | # Configure gnulib before invoking PKG_CHECK_MODULES, as the latter might | 1107 | pre_PKG_CONFIG_CFLAGS=$CFLAGS |
| 1108 | # for example add -lrt to RSVG_LIBS, which would then cause gnulib to | 1108 | pre_PKG_CONFIG_LIBS=$LIBS |
| 1109 | # incorrectly conclude that -lrt is not needed to link clock_gettime. | ||
| 1110 | gl_ASSERT_NO_GNULIB_POSIXCHECK | ||
| 1111 | gl_ASSERT_NO_GNULIB_TESTS | ||
| 1112 | gl_INIT | ||
| 1113 | 1109 | ||
| 1114 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) | 1110 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
| 1115 | 1111 | ||
| @@ -3156,7 +3152,7 @@ case $opsys in | |||
| 3156 | aix4-2) | 3152 | aix4-2) |
| 3157 | dnl Unfortunately without libXmu we cannot support EditRes. | 3153 | dnl Unfortunately without libXmu we cannot support EditRes. |
| 3158 | if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then | 3154 | if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then |
| 3159 | AC_DEFINE(NO_EDITRES, 1) | 3155 | AC_DEFINE(NO_EDITRES, 1) |
| 3160 | fi | 3156 | fi |
| 3161 | ;; | 3157 | ;; |
| 3162 | 3158 | ||
| @@ -3405,7 +3401,7 @@ case $opsys in | |||
| 3405 | dnl Not used, because PTY_ITERATION is defined. | 3401 | dnl Not used, because PTY_ITERATION is defined. |
| 3406 | AC_DEFINE(FIRST_PTY_LETTER, ['q']) | 3402 | AC_DEFINE(FIRST_PTY_LETTER, ['q']) |
| 3407 | AC_DEFINE(PTY_OPEN, [ { struct sigaction ocstat, cstat; struct stat stb; char * name; sigemptyset(&cstat.sa_mask); cstat.sa_handler = SIG_DFL; cstat.sa_flags = 0; sigaction(SIGCLD, &cstat, &ocstat); name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); sigaction(SIGCLD, &ocstat, (struct sigaction *)0); if (name == 0) return -1; if (fd < 0) return -1; if (fstat (fd, &stb) < 0) return -1; strcpy (pty_name, name); }] ) | 3403 | AC_DEFINE(PTY_OPEN, [ { struct sigaction ocstat, cstat; struct stat stb; char * name; sigemptyset(&cstat.sa_mask); cstat.sa_handler = SIG_DFL; cstat.sa_flags = 0; sigaction(SIGCLD, &cstat, &ocstat); name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); sigaction(SIGCLD, &ocstat, (struct sigaction *)0); if (name == 0) return -1; if (fd < 0) return -1; if (fstat (fd, &stb) < 0) return -1; strcpy (pty_name, name); }] ) |
| 3408 | dnl No need to get the pty name at all. | 3404 | dnl No need to get the pty name at all. |
| 3409 | AC_DEFINE(PTY_NAME_SPRINTF, [] ) | 3405 | AC_DEFINE(PTY_NAME_SPRINTF, [] ) |
| 3410 | dnl No need to use sprintf to get the tty name--we get that from _getpty. | 3406 | dnl No need to use sprintf to get the tty name--we get that from _getpty. |
| 3411 | AC_DEFINE(PTY_TTY_NAME_SPRINTF, [] ) | 3407 | AC_DEFINE(PTY_TTY_NAME_SPRINTF, [] ) |
| @@ -3450,7 +3446,7 @@ case $opsys in | |||
| 3450 | AC_DEFINE(SIGNALS_VIA_CHARACTERS, 1) | 3446 | AC_DEFINE(SIGNALS_VIA_CHARACTERS, 1) |
| 3451 | ;; | 3447 | ;; |
| 3452 | 3448 | ||
| 3453 | dnl 21 Jun 06: Eric Hanchrow <offby1@blarg.net> says this works. | 3449 | dnl 21 Jun 06: Eric Hanchrow <offby1@blarg.net> says this works. |
| 3454 | dnl FIXME Does gnu-kfreebsd have linux/version.h? It seems unlikely... | 3450 | dnl FIXME Does gnu-kfreebsd have linux/version.h? It seems unlikely... |
| 3455 | gnu-linux | gnu-kfreebsd ) | 3451 | gnu-linux | gnu-kfreebsd ) |
| 3456 | 3452 | ||
| @@ -4006,6 +4002,24 @@ AC_SUBST(CYGWIN_OBJ) | |||
| 4006 | AC_SUBST(PRE_ALLOC_OBJ) | 4002 | AC_SUBST(PRE_ALLOC_OBJ) |
| 4007 | AC_SUBST(POST_ALLOC_OBJ) | 4003 | AC_SUBST(POST_ALLOC_OBJ) |
| 4008 | 4004 | ||
| 4005 | # Configure gnulib. Although this does not affect CFLAGS or LIBS permanently. | ||
| 4006 | # it temporarily reverts them to their pre-pkg-config values, | ||
| 4007 | # because gnulib needs to work with both src (which uses the | ||
| 4008 | # pkg-config stuff) and lib-src (which does not). For example, gnulib | ||
| 4009 | # may need to determine whether LIB_CLOCK_GETTIME should contain -lrt, | ||
| 4010 | # and it therefore needs to run in an environment where LIBS does not | ||
| 4011 | # already contain -lrt merely because 'pkg-config --libs' printed '-lrt' | ||
| 4012 | # for some package unrelated to lib-src. | ||
| 4013 | SAVE_CFLAGS=$CFLAGS | ||
| 4014 | SAVE_LIBS=$LIBS | ||
| 4015 | CFLAGS=$pre_PKG_CONFIG_CFLAGS | ||
| 4016 | LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS" | ||
| 4017 | gl_ASSERT_NO_GNULIB_POSIXCHECK | ||
| 4018 | gl_ASSERT_NO_GNULIB_TESTS | ||
| 4019 | gl_INIT | ||
| 4020 | CFLAGS=$SAVE_CFLAGS | ||
| 4021 | LIBS=$SAVE_LIBS | ||
| 4022 | |||
| 4009 | case "$opsys" in | 4023 | case "$opsys" in |
| 4010 | aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;; | 4024 | aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;; |
| 4011 | 4025 | ||