AC_CANONICAL_SYSTEM
AC_CANONICAL_HOST
-AM_INIT_AUTOMAKE(1.11 foreign dist-bzip2)
+AM_INIT_AUTOMAKE([1.11 foreign dist-bzip2])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
MAJOR_NR=OPJ_MAJOR
AC_MSG_CHECKING([whether to build the JPWL library])
AC_MSG_RESULT([${want_jpwl}])
-if test "x${want_jpwl}" = "xyes" ; then
- AC_DEFINE(USE_JPWL, [1], [define to 1 if you use jpwl])
-fi
-
AM_CONDITIONAL([WANT_JPWL], [test "x${want_jpwl}" = "xyes"])
# JPIP
fi
+# libcurl
+
+if test "x${want_jpip}" = "xyes" ; then
+
+ PKG_CHECK_MODULES([LIBCURL], [libcurl],
+ [have_libcurl="yes"],
+ [have_libcurl="no"])
+
+ if ! test "x${have_libcurl}" = "xyes" ; then
+ AC_MSG_WARN([libcurl library not found. OpenJPIP will not be compiled.])
+ want_jpip="no"
+ fi
+
+fi
+
if test "x${want_jpip}" = "xyes" ; then
AC_DEFINE(USE_JPIP, [1], [define to 1 if you use jpip])
fi
### Checks for compiler characteristics
+AM_PROG_CC_C_O
AC_C_BIGENDIAN
#OPJ_COMPILER_FLAG([-Wall])
### Checks for library functions
+
+### Post configuration
+
+AM_CONDITIONAL([BUILD_SHARED], [test "x${enable_shared}" = "xyes"])
+AM_CONDITIONAL([BUILD_STATIC], [test "x${enable_static}" = "xyes"])
+
+
AC_CONFIG_FILES([
Makefile
libopenjpeg1.pc
applications/mj2/Makefile
applications/jpip/Makefile
applications/jpip/libopenjpip/Makefile
-applications/jpip/opj_server/Makefile
-applications/jpip/opj_client/Makefile
-applications/jpip/opj_client/opj_dec_server/Makefile
-applications/jpip/tools/Makefile
-applications/jpip/tools/indexer/Makefile
+applications/jpip/util/Makefile
doc/Makefile
])