author | Paul Cercueil <paul@crapouillou.net> | 2023年01月20日 16:52:18 +0000 |
---|---|---|
committer | pcpa <paulo.cesar.pereira.de.andrade@gmail.com> | 2023年01月20日 15:22:27 -0300 |
commit | 35413a15327fe67e3e7f57286f5d9562e9852b05 (patch) | |
tree | 51a4d26fec2e8b39b2d7323ad4df931036b630d3 | |
parent | 7e919226dd8c8d6b74bcb9564dc2c6f8454ed2cb (diff) | |
download | lightning-35413a15327fe67e3e7f57286f5d9562e9852b05.tar.gz |
-rw-r--r-- | configure.ac | 15 |
diff --git a/configure.ac b/configure.ac index e764808..8100162 100644 --- a/configure.ac +++ b/configure.ac @@ -196,11 +196,16 @@ else fi AM_CONDITIONAL(strong_type_checking, [test $STRONG_TYPE_CHECKING = yes]) -case "$host_os" in - *bsd*|osf*) SHLIB="" ;; - *hpux*) SHLIB="-ldld" ;; - *) SHLIB="-ldl" ;; -esac +AC_CHECK_LIB(dl, dlopen, [HAVE_LIBDL="yes"]) +AC_CHECK_LIB(dld, dlopen, [HAVE_LIBDLD="yes"]) + +if test "x$HAVE_LIBDL" = xyes; then + SHLIB="-ldl"; +elif test "x$HAVE_LIBDLD" = xyes; then + SHLIB="-ldld"; +else + SHLIB=""; +fi AC_SUBST(SHLIB) cpu= |