Skip to content

Commit ccf4058

Browse files
committed
Link instead of run certain test programs
The build system attempts to run certain test code when it can actually just link the code. This is a minor performance optimization but is really a semantic correctness issue.
1 parent b4bc5ca commit ccf4058

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

configure.ac

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1901,7 +1901,7 @@ fi
19011901
# options before we can check whether -Kpthread improves anything.
19021902
AC_MSG_CHECKING(whether pthreads are available without options)
19031903
AC_CACHE_VAL(ac_cv_pthread_is_default,
1904-
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
1904+
[AC_LINK_IFELSE([AC_LANG_SOURCE([[
19051905
#include <stdio.h>
19061906
#include <pthread.h>
19071907
@@ -1930,13 +1930,13 @@ else
19301930
# -Kpthread, if available, provides the right #defines
19311931
# and linker options to make pthread_create available
19321932
# Some compilers won't report that they do not support -Kpthread,
1933-
# so we need to run a program to see whether it really made the
1933+
# so we need to link a program to see whether it really made the
19341934
# function available.
19351935
AC_MSG_CHECKING(whether $CC accepts -Kpthread)
19361936
AC_CACHE_VAL(ac_cv_kpthread,
19371937
[ac_save_cc="$CC"
19381938
CC="$CC -Kpthread"
1939-
AC_RUN_IFELSE([AC_LANG_SOURCE([[
1939+
AC_LINK_IFELSE([AC_LANG_SOURCE([[
19401940
#include <stdio.h>
19411941
#include <pthread.h>
19421942
@@ -1959,13 +1959,13 @@ then
19591959
# -Kthread, if available, provides the right #defines
19601960
# and linker options to make pthread_create available
19611961
# Some compilers won't report that they do not support -Kthread,
1962-
# so we need to run a program to see whether it really made the
1962+
# so we need to link a program to see whether it really made the
19631963
# function available.
19641964
AC_MSG_CHECKING(whether $CC accepts -Kthread)
19651965
AC_CACHE_VAL(ac_cv_kthread,
19661966
[ac_save_cc="$CC"
19671967
CC="$CC -Kthread"
1968-
AC_RUN_IFELSE([AC_LANG_SOURCE([[
1968+
AC_LINK_IFELSE([AC_LANG_SOURCE([[
19691969
#include <stdio.h>
19701970
#include <pthread.h>
19711971
@@ -1988,13 +1988,13 @@ then
19881988
# -pthread, if available, provides the right #defines
19891989
# and linker options to make pthread_create available
19901990
# Some compilers won't report that they do not support -pthread,
1991-
# so we need to run a program to see whether it really made the
1991+
# so we need to link a program to see whether it really made the
19921992
# function available.
19931993
AC_MSG_CHECKING(whether $CC accepts -pthread)
19941994
AC_CACHE_VAL(ac_cv_pthread,
19951995
[ac_save_cc="$CC"
19961996
CC="$CC -pthread"
1997-
AC_RUN_IFELSE([AC_LANG_SOURCE([[
1997+
AC_LINK_IFELSE([AC_LANG_SOURCE([[
19981998
#include <stdio.h>
19991999
#include <pthread.h>
20002000

0 commit comments

Comments
 (0)