@@ -139,13 +139,9 @@ LT_INIT
139139
140140# Checks for libraries.
141141
142- case "$host_os" in
143- darwin*) shared_library_ext="dylib" ;;
144- cygwin*|mingw*) shared_library_ext="dll" ;;
145- *) shared_library_ext="so" ;;
146- esac
147-
148- AC_DEFINE_UNQUOTED ( [ SHARED_LIBRARY_EXTENSION] , [ "$shared_library_ext"] , [ The extension shared libraries use on this platform] )
142+ AC_CHECK_LIB ( [ dl] , [ dlopen] , [ have_libdl=yes] , [
143+ AC_MSG_ERROR ( [ libdl is required for loading dynamic modules] )
144+ ] )
149145
150146FEATURE_SYSTEMD_SUPPORT_CHECK
151147FEATURE_RAPIDHASH_CHECK
@@ -157,13 +153,21 @@ AC_SUBST([ABS_SRCDIR])
157153AC_SUBST ( [ ABS_BUILDDIR] )
158154
159155# Define macros
156+ case "$host_os" in
157+ darwin*) shared_library_ext="dylib" ;;
158+ cygwin*|mingw*) shared_library_ext="dll" ;;
159+ *) shared_library_ext="so" ;;
160+ esac
161+
162+ AC_DEFINE_UNQUOTED ( [ SHARED_LIBRARY_EXTENSION] , [ "$shared_library_ext"] , [ The extension shared libraries use on this platform] )
160163
161164# Checks for header files.
162165AC_CHECK_HEADERS ( [ arpa/inet.h fcntl.h netdb.h netinet/in.h sys/socket.h sys/time.h] )
163166AC_CHECK_HEADERS ( [ stdnoreturn.h] )
164167
165168# Checks for typedefs, structures, and compiler characteristics.
166- STDC_CHECK_VLA_SUPPORT
169+ CC_CHECK_VLA_SUPPORT
170+ CCLD_CHECK_RDYNAMIC_SUPPORT
167171
168172AC_CHECK_HEADER_STDBOOL
169173AC_TYPE_OFF_T
@@ -188,10 +192,6 @@ AC_FUNC_STRTOD
188192AC_CHECK_FUNCS ( [ atexit clock_gettime gettimeofday memchr memmove memset socket strcasecmp strdup strerror strndup strrchr strtoull] )
189193AC_CHECK_FUNCS ( [ realpath strchr strncasecmp strtoul getopt_long] )
190194
191- AC_CHECK_LIB ( [ dl] , [ dlopen] , [ have_libdl=yes] , [
192- AC_MSG_ERROR ( [ libdl is required for loading dynamic modules] )
193- ] )
194-
195195# Enable modules
196196m4_foreach ( [ name] , [ AVAILABLE_MODULES] , [
197197 AM_CONDITIONAL([ ENABLE_MOD_] m4_toupper ( name ) , [ test "x$enable_mod_] name[ " = "xyes" || test "x$enable_mod_all" = "xyes"] )
0 commit comments