vcpkg/ports/libx11/add_dl_pc.patch
Alexander Neumann 6f7ffeb18f
[many ports] Add X windows part 11/N (#27441)
* [libice] replace macros with typedefs

* [libx11] fix dl linkage on linux and cleanup the cmake wrapper.

* [libxxf86vm] add port

* [libxtst] add port

* [libxt] add port

* [libxmu] add port

* [libxaw] add port

* bump port version

* v db

* fix libxpm and maybe cross libxt

* malloc returns null for cross builds

* fix typo

* fix stuff

* v db

* fix stuff ?

* WIP commit

* libxt cross fix

* add todo

* fix libxaw

* xcb add some fixes.

* fix todos

* fix arm ?

* fix path

* bump some versions

* shorten comment

* format manifest

* v db

* fix stuff

* ci baseline

* v db

* adjust libx11 wrapper again

* v db

* add license

* remove doubled entry from v db

* v db

* libxmu remove global variable.

* correctly split unistd.patch and apply it

* disable thread safe init in libx11 on windows

* v db

* libx11 append options correctly.

* v db

* still not correct.

* v db
2022-11-11 17:32:25 -08:00

37 lines
1.1 KiB
Diff

diff --git a/configure.ac b/configure.ac
index 92b740b88..083e37ee5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -106,8 +106,12 @@ if test "x$ac_cv_search_dlopen" = xno; then
AC_DEFINE(HAVE_SHL_LOAD,1,
[Use shl_load to load shared libraries])
AC_CHECK_HEADERS([dl.h])
+ XLDLIB="$ac_cv_search_shl_load"
fi
else
+ if test "x$ac_cv_search_dlopen" != 'xnone required'; then
+ XLDLIB="$ac_cv_search_dlopen"
+ fi
AC_DEFINE(HAVE_DLOPEN,1,[Use dlopen to load shared libraries])
AC_CHECK_HEADERS([dlfcn.h])
fi
@@ -116,6 +120,7 @@ if test "x$ac_cv_header_dlfcn_h" = xyes -o "x$ac_cv_header_dl_h" = xyes; then
else
HAVE_LOADABLE_MODULES=no
fi
+AC_SUBST(XLDLIB)
AC_MSG_RESULT($HAVE_LOADABLE_MODULES)
AC_MSG_CHECKING([if loadable i18n module support should be enabled])
diff --git a/x11.pc.in b/x11.pc.in
index 25c7e7cd0..4ecf23e8d 100644
--- a/x11.pc.in
+++ b/x11.pc.in
@@ -11,5 +11,5 @@ Version: @PACKAGE_VERSION@
Requires: xproto @XKBPROTO_REQUIRES@
Requires.private: @X11_EXTRA_DEPS@
Cflags: -I${includedir} @XTHREAD_CFLAGS@
-Libs: -L${libdir} -lX11
+Libs: -L${libdir} -lX11 @XLDLIB@
Libs.private: @XTHREADLIB@