fix libopenjpip link on Windows
This commit is contained in:
parent
f3f86e1eb7
commit
aab317eb8c
1
CHANGES
1
CHANGES
|
@ -6,6 +6,7 @@ What's New for OpenJPEG
|
|||
+ : added
|
||||
|
||||
January 25, 2012
|
||||
* [vincent] fix libopenjpip link on Windows
|
||||
* [vincent] follow latest JPIP changes in the autotools side (pthread dependency, conditional compilation of JPIP server and client)
|
||||
|
||||
December 8, 2011
|
||||
|
|
|
@ -84,8 +84,8 @@ libopenjpip_server_la_CPPFLAGS = \
|
|||
@FCGI_CFLAGS@ \
|
||||
@LIBCURL_CFLAGS@ \
|
||||
-DSERVER
|
||||
libopenjpip_server_la_CFLAGS = @PTHREAD_CFLAGS@
|
||||
libopenjpip_server_la_LIBADD = @FCGI_LIBS@ @LIBCURL_LIBS@ @PTHREAD_LIBS@ -lm
|
||||
libopenjpip_server_la_CFLAGS = @THREAD_CFLAGS@
|
||||
libopenjpip_server_la_LIBADD = @FCGI_LIBS@ @LIBCURL_LIBS@ @THREAD_LIBS@ -lm
|
||||
libopenjpip_server_la_LDFLAGS = -no-undefined -version-info @lt_version@
|
||||
libopenjpip_server_la_SOURCES = $(JPIP_SRC)
|
||||
|
||||
|
@ -96,8 +96,8 @@ libopenjpip_local_la_CPPFLAGS = \
|
|||
-I$(top_srcdir)/applications/jpip/libopenjpip \
|
||||
-I$(top_builddir)/applications/jpip/libopenjpip \
|
||||
@LIBCURL_CFLAGS@
|
||||
libopenjpip_local_la_CFLAGS = @PTHREAD_CFLAGS@
|
||||
libopenjpip_local_la_LIBADD = @PTHREAD_LIBS@ $(top_builddir)/libopenjpeg/libopenjpeg.la -lm
|
||||
libopenjpip_local_la_CFLAGS = @THREAD_CFLAGS@
|
||||
libopenjpip_local_la_LIBADD = @THREAD_LIBS@ $(top_builddir)/libopenjpeg/libopenjpeg.la -lm
|
||||
libopenjpip_local_la_LDFLAGS = -no-undefined -version-info @lt_version@
|
||||
libopenjpip_local_la_SOURCES = $(JPIP_SRC) $(LOCAL_SRC)
|
||||
|
||||
|
|
57
configure.ac
57
configure.ac
|
@ -348,42 +348,49 @@ fi
|
|||
|
||||
# pthread
|
||||
|
||||
if test "x${want_jpip}" = "xyes" && test "x${have_win32}" = "xno" ; then
|
||||
if test "x${want_jpip}" = "xyes" ; then
|
||||
|
||||
SAVE_CFLAGS=${CFLAGS}
|
||||
CFLAGS="${CFLAGS} -pthread"
|
||||
SAVE_LIBS=${LIBS}
|
||||
LIBS="${LIBS} -pthread"
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([[
|
||||
if test "x${have_win32}" = "xno" ; then
|
||||
|
||||
SAVE_CFLAGS=${CFLAGS}
|
||||
CFLAGS="${CFLAGS} -pthread"
|
||||
SAVE_LIBS=${LIBS}
|
||||
LIBS="${LIBS} -pthread"
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([[
|
||||
#include <pthread.h>
|
||||
]],
|
||||
[[
|
||||
]],
|
||||
[[
|
||||
pthread_t id;
|
||||
id = pthread_self();
|
||||
]])],
|
||||
[have_pthread="yes"],
|
||||
[have_pthread="no"])
|
||||
CFLAGS=${SAVE_CFLAGS}
|
||||
LIBS=${SAVE_LIBS}
|
||||
]])],
|
||||
[have_pthread="yes"],
|
||||
[have_pthread="no"])
|
||||
CFLAGS=${SAVE_CFLAGS}
|
||||
LIBS=${SAVE_LIBS}
|
||||
|
||||
AC_MSG_CHECKING([whether Pthread library is available])
|
||||
AC_MSG_RESULT([${have_pthread}])
|
||||
AC_MSG_CHECKING([whether Pthread library is available])
|
||||
AC_MSG_RESULT([${have_pthread}])
|
||||
|
||||
if ! test "x${have_pthread}" = "xyes" ; then
|
||||
AC_MSG_WARN([Pthread library not found. OpenJPIP library will not be compiled.])
|
||||
want_jpip="no"
|
||||
else
|
||||
THREAD_CFLAGS="-pthread"
|
||||
THREAD_LIBS="-pthread"
|
||||
fi
|
||||
|
||||
if ! test "x${have_pthread}" = "xyes" ; then
|
||||
AC_MSG_WARN([Pthread library not found. OpenJPIP library will not be compiled.])
|
||||
want_jpip="no"
|
||||
else
|
||||
PTHREAD_CFLAGS="-pthread"
|
||||
AC_ARG_VAR([PTHREAD_CFLAGS], [compiler flag for Pthread])
|
||||
AC_SUBST([PTHREAD_CFLAGS])
|
||||
PTHREAD_LIBS="-pthread"
|
||||
AC_ARG_VAR([PTHREAD_LIBS], [linker flags for Pthread])
|
||||
AC_SUBST([PTHREAD_LIBS])
|
||||
THREAD_LIBS="-lws2_32"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
AC_ARG_VAR([THREAD_CFLAGS], [compiler flag for the thread library])
|
||||
AC_SUBST([THREAD_CFLAGS])
|
||||
AC_ARG_VAR([THREAD_LIBS], [linker flags for thread library])
|
||||
AC_SUBST([THREAD_LIBS])
|
||||
|
||||
# libfcgi
|
||||
|
||||
if test "x${want_jpip_server}" = "xyes" ; then
|
||||
|
|
Loading…
Reference in New Issue