From c2adf3f87462a92bccb66c60c9329f17694c1b72 Mon Sep 17 00:00:00 2001 From: DRC Date: Thu, 30 Sep 2010 04:25:40 +0000 Subject: [PATCH] Attempt to link statically with gnutls if -static is specified, so that Xvnc and other binaries will be cross-compatible with other Linux distros git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4146 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- unix/build-xorg | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/unix/build-xorg b/unix/build-xorg index 97eac3c0..78c991da 100755 --- a/unix/build-xorg +++ b/unix/build-xorg @@ -332,6 +332,12 @@ if [ $STATIC = 1 -a "$MODE" = "build" ]; then if [ -f ./xorg.build/syslib/libz.a ]; then rm -f ./xorg.build/syslib/libz.a fi + if [ -f ./xorg.build/syslib/libgcrypt.a ]; then + rm -f ./xorg.build/syslib/libgcrypt.a + fi + if [ -f ./xorg.build/syslib/libgnutls.a ]; then + rm -f ./xorg.build/syslib/libgnutls.a + fi IS64BIT=`echo -e "#ifdef __x86_64__\nis64bit_yes\n#else\nis64bit_no\n#endif" | $CC $CFLAGS -E - | grep is64bit` STATICLIBDIR= case $IS64BIT in @@ -360,6 +366,16 @@ if [ $STATIC = 1 -a "$MODE" = "build" ]; then else ln -fs $STATICLIBDIR/libz.a ./xorg.build/syslib fi + if [ ! -f $STATICLIBDIR/libgcrypt.a ]; then + echo WARNING: Cannot find suitable libgcrypt.a. Xvnc will depend on libgcrypt.so ... + else + ln -fs $STATICLIBDIR/libgcrypt.a ./xorg.build/syslib + fi + if [ ! -f $STATICLIBDIR/libgnutls.a ]; then + echo WARNING: Cannot find suitable libgnutls.a. Xvnc will depend on libgnutls.so ... + else + ln -fs $STATICLIBDIR/libgnutls.a ./xorg.build/syslib + fi fi export ACLOCAL="aclocal -I ${PREFIX}/share/aclocal" -- 2.39.5