X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=configure.ac;h=c261f49e1a93a77edd368e27f72176cdf1211992;hb=refs%2Fchanges%2F81%2F175781%2F1;hp=798fa5f1e6a49de2fe1e543efc1093c8ded63817;hpb=cfd75dcdb18d0a4291f48020211c65507a97d9eb;p=platform%2Fupstream%2Fcurl.git diff --git a/configure.ac b/configure.ac index 798fa5f..c261f49 100755 --- a/configure.ac +++ b/configure.ac @@ -3234,6 +3234,146 @@ dnl Let's hope this split URL remains working: dnl http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/ \ dnl genprogc/thread_quick_ref.htm +dnl ********************************************************************** +dnl Check for ICU-UC (IDN support) +dnl ********************************************************************** + +AC_MSG_CHECKING([whether to build with icu-uc]) +OPT_IDN="default" +AC_ARG_WITH(icu-uc, +AC_HELP_STRING([--with-icu-uc=PATH],[Enable icu-uc usage]) +AC_HELP_STRING([--without-icu-uc],[Disable icu-uc usage]), + [OPT_IDN=$withval]) +case "$OPT_IDN" in + no) + dnl --without-icu-uc option used + want_idn="no" + AC_MSG_RESULT([no]) + ;; + default) + dnl configure option not specified + want_idn="yes" + want_idn_path="default" + AC_MSG_RESULT([(assumed) yes]) + ;; + yes) + dnl --with-icu-uc option used without path + want_idn="yes" + want_idn_path="default" + AC_MSG_RESULT([yes]) + ;; + *) + dnl --with-icu-uc option used with path + want_idn="yes" + want_idn_path="$withval" + AC_MSG_RESULT([yes ($withval)]) + ;; +esac + +if test "$want_idn" = "yes"; then + dnl idn library support has been requested + clean_CPPFLAGS="$CPPFLAGS" + clean_LDFLAGS="$LDFLAGS" + clean_LIBS="$LIBS" + PKGCONFIG="no" + # + if test "$want_idn_path" != "default"; then + dnl path has been specified + IDN_PCDIR="$want_idn_path/lib$libsuff/pkgconfig" + CURL_CHECK_PKGCONFIG(icu-uc, [$IDN_PCDIR]) + if test "$PKGCONFIG" != "no"; then + IDN_LIBS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl + $PKGCONFIG --libs-only-l icu-uc 2>/dev/null` + IDN_LDFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl + $PKGCONFIG --libs-only-L icu-uc 2>/dev/null` + IDN_CPPFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl + $PKGCONFIG --cflags-only-I icu-uc 2>/dev/null` + IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/-L//'` + else + dnl pkg-config not available or provides no info + IDN_LIBS="-licu-uc" + IDN_LDFLAGS="-L$want_idn_path/lib$libsuff" + IDN_CPPFLAGS="-I$want_idn_path/include" + IDN_DIR="$want_idn_path/lib$libsuff" + fi + else + dnl path not specified + CURL_CHECK_PKGCONFIG(icu-uc) + if test "$PKGCONFIG" != "no"; then + IDN_LIBS=`$PKGCONFIG --libs-only-l icu-uc 2>/dev/null` + IDN_LDFLAGS=`$PKGCONFIG --libs-only-L icu-uc 2>/dev/null` + IDN_CPPFLAGS=`$PKGCONFIG --cflags-only-I icu-uc 2>/dev/null` + IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/-L//'` + else + dnl pkg-config not available or provides no info + IDN_LIBS="-licu-uc" + fi + fi + # + if test "$PKGCONFIG" != "no"; then + AC_MSG_NOTICE([pkg-config: IDN_LIBS: "$IDN_LIBS"]) + AC_MSG_NOTICE([pkg-config: IDN_LDFLAGS: "$IDN_LDFLAGS"]) + AC_MSG_NOTICE([pkg-config: IDN_CPPFLAGS: "$IDN_CPPFLAGS"]) + AC_MSG_NOTICE([pkg-config: IDN_DIR: "$IDN_DIR"]) + else + AC_MSG_NOTICE([IDN_LIBS: "$IDN_LIBS"]) + AC_MSG_NOTICE([IDN_LDFLAGS: "$IDN_LDFLAGS"]) + AC_MSG_NOTICE([IDN_CPPFLAGS: "$IDN_CPPFLAGS"]) + AC_MSG_NOTICE([IDN_DIR: "$IDN_DIR"]) + fi + # + CPPFLAGS="$IDN_CPPFLAGS $CPPFLAGS" + LDFLAGS="$IDN_LDFLAGS $LDFLAGS" + LIBS="$IDN_LIBS $LIBS" + # + AC_MSG_CHECKING([if uidna_nameToASCII_UTF8 can be linked]) + AC_LINK_IFELSE([ + AC_LANG_FUNC_LINK_TRY([uidna_nameToASCII_UTF8]) + ],[ + AC_MSG_RESULT([yes]) + tst_links_icu="yes" + ],[ + AC_MSG_RESULT([no]) + tst_links_icu="no" + ]) + # + if test "$tst_links_icu" = "yes"; then + AC_DEFINE(USE_ICU_IDNA, 1, [Define to 1 if you have the `icu-uc' library (-licu-uc).]) + dnl different versions of libidn have different setups of these: + + AC_SUBST([IDN_ENABLED], [1]) + curl_idn_msg="enabled (icu-uc)" + if test -n "$IDN_DIR" -a "x$cross_compiling" != "xyes"; then + LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$IDN_DIR" + export LD_LIBRARY_PATH + AC_MSG_NOTICE([Added $IDN_DIR to LD_LIBRARY_PATH]) + fi + else + AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled]) + CPPFLAGS="$clean_CPPFLAGS" + LDFLAGS="$clean_LDFLAGS" + LIBS="$clean_LIBS" + fi + +fi + +dnl Let's hope this split URL remains working: +dnl http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/ \ +dnl genprogc/thread_quick_ref.htm + +dnl ********************************************************************** +dnl Check for DLP +dnl ********************************************************************** + +AC_ARG_ENABLE([dlp], + AS_HELP_STRING([--enable-dlp], [Enable DLP usage])) + +AS_IF([test "x$enable_dlp" = "xyes"], [ + CPPFLAGS+=" -DUSE_TIZEN_FEATURE_DLP" +]) + +AM_CONDITIONAL(USE_TIZEN_FEATURE_DLP, test "x$enable_dlp" = "xyes") + dnl ********************************************************************** dnl Check for nghttp2 @@ -4180,6 +4320,7 @@ AC_CONFIG_FILES([Makefile \ include/curl/Makefile \ src/Makefile \ lib/Makefile \ + extensions/Makefile \ scripts/Makefile \ lib/libcurl.vers \ tests/Makefile \