use efl_fnmatch m4 macro
[framework/uifw/eet.git] / configure.ac
index f91e2fc..dbc0ad5 100644 (file)
@@ -65,6 +65,8 @@ AC_ARG_ENABLE([amalgamation],
 )
 AM_CONDITIONAL(EET_AMALGAMATION, test "x${do_amalgamation}" = "xyes")
 
+EFL_ENABLE_BIN([eet])
+
 # Old eet file format support
 
 old_eet_file_format="yes"
@@ -95,11 +97,11 @@ AC_MSG_RESULT([${want_gnutls}])
 
 # Specific GNUTLS improvement
 
-new_gnutls_api="no"
+new_gnutls_api="yes"
 AC_ARG_ENABLE(new-gnutls-api,
    [AC_HELP_STRING(
-      [--enable-new-gnutls-api],
-      [enable use of gnutls_x509_crt_verify_hash. [[default=disable]]]
+      [--disable-new-gnutls-api],
+      [enable use of gnutls_x509_crt_verify_hash. [[default=enable]]]
     )],
    [new_gnutls_api=$enableval]
 )
@@ -107,9 +109,14 @@ AC_MSG_CHECKING([whether to use gnutls_x509_crt_verify_hash])
 AC_MSG_RESULT([${new_gnutls_api}])
 
 if test "x${new_gnutls_api}" = "xyes" ; then
-   AC_DEFINE(EET_USE_NEW_GNUTLS_API, 1, [use gnutls_x509_crt_verify_hash])
-else
-   AC_DEFINE(EET_USE_NEW_GNUTLS_API, 0, [don't use gnutls_x509_crt_verify_hash])
+   AC_CHECK_LIB(gnutls, gnutls_x509_crt_verify_hash,
+                [ new_gnutls_api="yes" ],
+               [ new_gnutls_api="no" ]
+               )
+
+   if test "x${new_gnutls_api}" = "xyes"; then
+      AC_DEFINE(EET_USE_NEW_GNUTLS_API, 1, [use gnutls_x509_crt_verify_hash])
+   fi
 fi
 
 # Openssl support
@@ -269,7 +276,7 @@ AC_MSG_RESULT(${have_signature})
 
 # pthread library
 
-EFL_CHECK_PTHREAD([have_pthread="yes"], [have_pthread="no"])
+EFL_CHECK_PTHREAD(["no"], [have_pthread="yes"], [have_pthread="no"])
 
 
 ### Checks for header files
@@ -284,10 +291,6 @@ AC_CHECK_HEADER([jpeglib.h],
 
 AC_CHECK_HEADERS(netinet/in.h)
 
-AC_CHECK_HEADER([fnmatch.h],
-   [dummy="yes"],
-   [AC_MSG_ERROR([Cannot find fnmatch.h. Make sure your CFLAGS environment variable contains include lines for the location of this file. MinGW users: see the INSTALL file])])
-
 
 ### Checks for types
 
@@ -378,19 +381,7 @@ AC_FUNC_ALLOCA
 
 AC_CHECK_FUNCS(fmemopen open_memstream realpath)
 
-fnmatch_libs=""
-AC_CHECK_FUNCS([fnmatch], [res="yes"], [res="no"])
-if test "x$res" = "xno"; then
-   AC_SEARCH_LIBS([fnmatch],
-      [fnmatch evil iberty],
-      [res="yes"],
-      [res="no"])
-   if test "x$res" = "xno"; then
-      AC_MSG_ERROR([Cannot find fnmatch() in neither libc nor libfnmatch, nor libiberty, nor libevil])
-   fi
-   fnmatch_libs="${ac_cv_search_fnmatch}"
-fi
-AC_SUBST(fnmatch_libs)
+EFL_CHECK_FNMATCH([], [AC_MSG_ERROR([Cannot find fnmatch()])])
 
 
 AC_SUBST(requirement_eet)
@@ -421,22 +412,27 @@ echo "------------------------------------------------------------------------"
 echo
 echo "Configuration Options Summary:"
 echo
+echo "  Amalgamation.........: ${do_amalgamation}"
 echo "  Gnutls...............: ${have_gnutls}"
 echo "  Openssl..............: ${have_openssl}"
 echo "    Cipher support.....: ${have_cipher}"
 echo "    Signature..........: ${have_signature}"
 echo "  Thread Support.......: ${have_pthread}"
 echo
-echo "  Amalgamation.........: ${do_amalgamation}"
-echo "  Documentation........: ${build_doc}"
+echo "  Old eet file format..: ${old_eet_file_format}"
+echo
 echo "  Tests................: ${enable_tests}"
 echo "  Coverage.............: ${enable_coverage}"
 echo
-echo "  Old eet file format..: ${old_eet_file_format}"
+echo "  Build eet............: $have_eet"
 echo
-echo "  Compilation..........: make"
+echo "  Documentation........: ${build_doc}"
 echo
-echo "  Installation.........: make install"
+echo "Compilation............: make (or gmake)"
+echo "  CPPFLAGS.............: $CPPFLAGS"
+echo "  CFLAGS...............: $CFLAGS"
+echo "  LDFLAGS..............: $LDFLAGS"
 echo
-echo "    prefix.............: $prefix"
+echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
+echo "  prefix...............: $prefix"
 echo