summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-06-09 11:43:41 +0200
committerDaniel Stenberg <daniel@haxx.se>2021-06-10 08:42:46 +0200
commit71da3f8307168e92c4f2d6cf737e435d226fa055 (patch)
treeec27a8f527cbed1954a2c2c4f61522b7fd618abb /configure.ac
parent75391045cf4863a56f6e06928d9095ceaddecd01 (diff)
downloadcurl-71da3f8307168e92c4f2d6cf737e435d226fa055.tar.gz
configure: disable RTSP when hyper is selected
Makes test 1013 work Closes #7209
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac206
1 files changed, 107 insertions, 99 deletions
diff --git a/configure.ac b/configure.ac
index 1bc85af28..050d2b84b 100755
--- a/configure.ac
+++ b/configure.ac
@@ -597,31 +597,127 @@ AS_HELP_STRING([--disable-ldaps],[Disable LDAPS support]),
fi ]
)
-AC_MSG_CHECKING([whether to support rtsp])
-AC_ARG_ENABLE(rtsp,
-AS_HELP_STRING([--enable-rtsp],[Enable RTSP support])
-AS_HELP_STRING([--disable-rtsp],[Disable RTSP support]),
-[ case "$enableval" in
+dnl **********************************************************************
+dnl Check for Hyper
+dnl **********************************************************************
+
+OPT_HYPER="no"
+
+AC_ARG_WITH(hyper,
+AS_HELP_STRING([--with-hyper=PATH],[Enable hyper usage])
+AS_HELP_STRING([--without-hyper],[Disable hyper usage]),
+ [OPT_HYPER=$withval])
+case "$OPT_HYPER" in
no)
+ dnl --without-hyper option used
+ want_hyper="no"
+ ;;
+ yes)
+ dnl --with-hyper option used without path
+ want_hyper="default"
+ want_hyper_path=""
+ ;;
+ *)
+ dnl --with-hyper option used with path
+ want_hyper="yes"
+ want_hyper_path="$withval"
+ ;;
+esac
+
+if test X"$want_hyper" != Xno; then
+ if test "x$disable_http" = "xyes"; then
+ AC_MSG_ERROR([--with-hyper is not compatible with --disable-http])
+ fi
+
+ dnl backup the pre-hyper variables
+ CLEANLDFLAGS="$LDFLAGS"
+ CLEANCPPFLAGS="$CPPFLAGS"
+ CLEANLIBS="$LIBS"
+
+ CURL_CHECK_PKGCONFIG(hyper, $want_hyper_path)
+
+ if test "$PKGCONFIG" != "no" ; then
+ LIB_HYPER=`CURL_EXPORT_PCDIR([$want_hyper_path])
+ $PKGCONFIG --libs-only-l hyper`
+ CPP_HYPER=`CURL_EXPORT_PCDIR([$want_hyper_path]) dnl
+ $PKGCONFIG --cflags-only-I hyper`
+ LD_HYPER=`CURL_EXPORT_PCDIR([$want_hyper_path])
+ $PKGCONFIG --libs-only-L hyper`
+ else
+ dnl no hyper pkg-config found
+ LIB_HYPER="-lhyper -ldl -lpthread -lm"
+ if test X"$want_hyper" != Xdefault; then
+ CPP_HYPER=-I"$want_hyper_path/capi/include"
+ LD_HYPER="-L$want_hyper_path/target/debug"
+ fi
+ fi
+ if test -n "$LIB_HYPER"; then
+ AC_MSG_NOTICE([-l is $LIB_HYPER])
+ AC_MSG_NOTICE([-I is $CPP_HYPER])
+ AC_MSG_NOTICE([-L is $LD_HYPER])
+
+ LDFLAGS="$LDFLAGS $LD_HYPER"
+ CPPFLAGS="$CPPFLAGS $CPP_HYPER"
+ LIBS="$LIB_HYPER $LIBS"
+
+ if test "x$cross_compiling" != "xyes"; then
+ DIR_HYPER=`echo $LD_HYPER | $SED -e 's/^-L//'`
+ fi
+
+ AC_CHECK_LIB(hyper, hyper_io_new,
+ [
+ AC_CHECK_HEADERS(hyper.h,
+ experimental="$experimental Hyper"
+ AC_MSG_NOTICE([Hyper support is experimental])
+ curl_h1_msg="enabled (Hyper)"
+ curl_h2_msg=$curl_h1_msg
+ HYPER_ENABLED=1
+ AC_DEFINE(USE_HYPER, 1, [if hyper is in use])
+ AC_SUBST(USE_HYPER, [1])
+ CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_HYPER"
+ export CURL_LIBRARY_PATH
+ AC_MSG_NOTICE([Added $DIR_HYPER to CURL_LIBRARY_PATH]),
+ )
+ ],
+ AC_MSG_ERROR([--with-hyper but hyper was not found. See docs/HYPER.md.])
+ )
+ fi
+fi
+
+if test X"$want_hyper" != Xno; then
+ AC_MSG_NOTICE([Disable RTSP support with hyper])
+ AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP])
+ AC_SUBST(CURL_DISABLE_RTSP, [1])
+
+else
+
+ AC_MSG_CHECKING([whether to support rtsp])
+ AC_ARG_ENABLE(rtsp,
+ AS_HELP_STRING([--enable-rtsp],[Enable RTSP support])
+ AS_HELP_STRING([--disable-rtsp],[Disable RTSP support]),
+ [ case "$enableval" in
+ no)
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP])
AC_SUBST(CURL_DISABLE_RTSP, [1])
;;
- *) if test x$CURL_DISABLE_HTTP = x1 ; then
- AC_MSG_ERROR(HTTP support needs to be enabled in order to enable RTSP support!)
+ *)
+ if test x$CURL_DISABLE_HTTP = x1 ; then
+ AC_MSG_ERROR(HTTP support needs to be enabled in order to enable RTSP support!)
else
- AC_MSG_RESULT(yes)
- curl_rtsp_msg="enabled"
+ AC_MSG_RESULT(yes)
+ curl_rtsp_msg="enabled"
fi
;;
- esac ],
+ esac ],
if test "x$CURL_DISABLE_HTTP" != "x1"; then
AC_MSG_RESULT(yes)
curl_rtsp_msg="enabled"
else
AC_MSG_RESULT(no)
fi
-)
+ )
+fi
AC_MSG_CHECKING([whether to support proxies])
AC_ARG_ENABLE(proxy,
@@ -2858,94 +2954,6 @@ AC_INCLUDES_DEFAULT
fi
dnl **********************************************************************
-dnl Check for Hyper
-dnl **********************************************************************
-
-OPT_HYPER="no"
-
-AC_ARG_WITH(hyper,
-AS_HELP_STRING([--with-hyper=PATH],[Enable hyper usage])
-AS_HELP_STRING([--without-hyper],[Disable hyper usage]),
- [OPT_HYPER=$withval])
-case "$OPT_HYPER" in
- no)
- dnl --without-hyper option used
- want_hyper="no"
- ;;
- yes)
- dnl --with-hyper option used without path
- want_hyper="default"
- want_hyper_path=""
- ;;
- *)
- dnl --with-hyper option used with path
- want_hyper="yes"
- want_hyper_path="$withval"
- ;;
-esac
-
-if test X"$want_hyper" != Xno; then
- if test "x$disable_http" = "xyes"; then
- AC_MSG_ERROR([--with-hyper is not compatible with --disable-http])
- fi
-
- dnl backup the pre-hyper variables
- CLEANLDFLAGS="$LDFLAGS"
- CLEANCPPFLAGS="$CPPFLAGS"
- CLEANLIBS="$LIBS"
-
- CURL_CHECK_PKGCONFIG(hyper, $want_hyper_path)
-
- if test "$PKGCONFIG" != "no" ; then
- LIB_HYPER=`CURL_EXPORT_PCDIR([$want_hyper_path])
- $PKGCONFIG --libs-only-l hyper`
- CPP_HYPER=`CURL_EXPORT_PCDIR([$want_hyper_path]) dnl
- $PKGCONFIG --cflags-only-I hyper`
- LD_HYPER=`CURL_EXPORT_PCDIR([$want_hyper_path])
- $PKGCONFIG --libs-only-L hyper`
- else
- dnl no hyper pkg-config found
- LIB_HYPER="-lhyper -ldl -lpthread -lm"
- if test X"$want_hyper" != Xdefault; then
- CPP_HYPER=-I"$want_hyper_path/capi/include"
- LD_HYPER="-L$want_hyper_path/target/debug"
- fi
- fi
- if test -n "$LIB_HYPER"; then
- AC_MSG_NOTICE([-l is $LIB_HYPER])
- AC_MSG_NOTICE([-I is $CPP_HYPER])
- AC_MSG_NOTICE([-L is $LD_HYPER])
-
- LDFLAGS="$LDFLAGS $LD_HYPER"
- CPPFLAGS="$CPPFLAGS $CPP_HYPER"
- LIBS="$LIB_HYPER $LIBS"
-
- if test "x$cross_compiling" != "xyes"; then
- DIR_HYPER=`echo $LD_HYPER | $SED -e 's/^-L//'`
- fi
-
- AC_CHECK_LIB(hyper, hyper_io_new,
- [
- AC_CHECK_HEADERS(hyper.h,
- experimental="$experimental Hyper"
- AC_MSG_NOTICE([Hyper support is experimental])
- curl_h1_msg="enabled (Hyper)"
- curl_h2_msg=$curl_h1_msg
- HYPER_ENABLED=1
- AC_DEFINE(USE_HYPER, 1, [if hyper is in use])
- AC_SUBST(USE_HYPER, [1])
- CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_HYPER"
- export CURL_LIBRARY_PATH
- AC_MSG_NOTICE([Added $DIR_HYPER to CURL_LIBRARY_PATH]),
- )
- ],
- AC_MSG_ERROR([--with-hyper but hyper was not found. See docs/HYPER.md.])
- )
- fi
-fi
-
-
-dnl **********************************************************************
dnl Check for zsh completion path
dnl **********************************************************************