@@ -2985,15 +2985,6 @@ AC_CHECK_HEADERS([ \
29852985AC_HEADER_DIRENT
29862986AC_HEADER_MAJOR
29872987
2988- # for faulthandler
2989- AC_CHECK_HEADERS ( [ execinfo.h link.h dlfcn.h] , [
2990- AC_CHECK_FUNCS ( [ backtrace dladdr1] , [
2991- # dladdr1 requires -ldl
2992- ac_cv_require_ldl=yes
2993- ] )
2994- ] )
2995- AS_VAR_IF ( [ ac_cv_require_ldl] , [ yes] , [ AS_VAR_APPEND ( [ LDFLAGS] , [ " -ldl"] ) ] )
2996-
29972988# bluetooth/bluetooth.h has been known to not compile with -std=c99.
29982989# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
29992990SAVE_CFLAGS=$CFLAGS
@@ -3715,6 +3706,22 @@ AC_CHECK_LIB([dl], [dlopen]) # Dynamic linking for SunOS/Solaris and SYSV
37153706AC_CHECK_LIB ( [ dld] , [ shl_load] ) # Dynamic linking for HP-UX
37163707
37173708
3709+ dnl for faulthandler
3710+ AC_CHECK_HEADERS ( [ execinfo.h link.h dlfcn.h] , [
3711+ AC_CHECK_FUNCS ( [ backtrace dladdr1] , [
3712+ # dladdr1 requires -ldl
3713+ ac_cv_require_ldl=yes
3714+ ] )
3715+ ] )
3716+
3717+ dnl only add -ldl to LDFLAGS if it isn't already part of LIBS (GH-133081)
3718+ AS_VAR_IF ( [ ac_cv_require_ldl] , [ yes] , [
3719+ AS_VAR_IF ( [ ac_cv_lib_dl_dlopen] , [ yes] , [ ] , [
3720+ AS_VAR_APPEND ( [ LDFLAGS] , [ " -ldl"] )
3721+ ] )
3722+ ] )
3723+
3724+
37183725dnl check for uuid dependencies
37193726AH_TEMPLATE ( [ HAVE_UUID_H] , [ Define to 1 if you have the <uuid.h> header file.] )
37203727AH_TEMPLATE ( [ HAVE_UUID_UUID_H] , [ Define to 1 if you have the <uuid/uuid.h> header file.] )
0 commit comments