Hi all,

after r3958 I'm unable to build libvnc.so module to Xorg.

Main problem is that linking libjpeg into libvnc.so requires libjpeg
objects to be built as PIC. Unfortunately AC_DISABLE_SHARED macro
completely disables PIC building and builds only non-PIC code.

I recommend to add new option to jpeg configure.ac script called
--enable-shared-libjpeg which controls building of shared libjpeg.so.
Proposed patch is attached.

Do you have any comments?

Regards, Adam

-- 
Adam Tkac, Red Hat, Inc.
Index: common/jpeg/configure.ac
===================================================================
--- common/jpeg/configure.ac    (revision 3962)
+++ common/jpeg/configure.ac    (working copy)
@@ -11,8 +11,6 @@
 # Don't use undefined types
 AC_DEFINE([INCOMPLETE_TYPES_BROKEN], 1, [Define if you want use complete 
types])
 
-AC_DISABLE_SHARED
-
 # Checks for programs.
 AC_PROG_CPP
 AC_PROG_CC
@@ -112,10 +110,14 @@
   fi
 fi
 
+AC_ARG_ENABLE([shared-libjpeg],
+       AC_HELP_STRING([--enable-shared-libjpeg], [Build shared libjpeg.so])],
+       [], [enable_shared_libjpeg=no])
+
 AM_CONDITIONAL([WITH_SIMD], [test "x$with_simd" != "xno"])
 AM_CONDITIONAL([SIMD_I386], [test "x$simd_arch" = "xi386"])
 AM_CONDITIONAL([SIMD_X86_64], [test "x$simd_arch" = "xx86_64"])
-AM_CONDITIONAL([WITH_SHARED], [test "x$enable_shared" != "xno"])
+AM_CONDITIONAL([WITH_SHARED], [test "x$enable_shared_libjpeg" != "xno"])
 
 # jconfig.h is the file we use, but we have another before that to
 # fool autoheader. the reason is that we include this header in our
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Tigervnc-devel mailing list
Tigervnc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-devel

Reply via email to