mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-04 20:38:50 +01:00
42 lines
1.4 KiB
Plaintext
42 lines
1.4 KiB
Plaintext
dnl Check for libcurl and dependencies
|
|
dnl Copyright (C) 2004 Free Software Foundation, Inc.
|
|
dnl
|
|
dnl This file is free software, distributed under the terms of the GNU
|
|
dnl General Public License. As a special exception to the GNU General
|
|
dnl Public License, this file may be distributed as part of a program
|
|
dnl that contains a configuration script generated by Autoconf, under
|
|
dnl the same distribution terms as the rest of that program.
|
|
dnl
|
|
dnl Defines HAVE_LIBCURL to 1 if a working curl setup is found, and sets
|
|
dnl @LIBCURL@ and @LIBCURL_INCLUDES@ to the necessary values.
|
|
dnl $have_libcurl is set to yes or no so other things in configure can
|
|
dnl make use of it.
|
|
|
|
AC_DEFUN([GNUPG_CHECK_LIBCURL],
|
|
[
|
|
AC_ARG_WITH(libcurl,
|
|
AC_HELP_STRING([--with-libcurl=DIR],[look for the curl library in DIR]),
|
|
[_do_libcurl=$withval],[_do_libcurl=yes])
|
|
|
|
if test "$_do_libcurl" != "no" ; then
|
|
if test -d "$withval" ; then
|
|
CPPFLAGS="${CPPFLAGS} -I$withval/include"
|
|
LDFLAGS="${LDFLAGS} -L$withval/lib"
|
|
fi
|
|
|
|
AC_MSG_CHECKING([for libcurl])
|
|
|
|
if eval curl-config --version 2>/dev/null >/dev/null; then
|
|
AC_SUBST([LIBCURL_INCLUDES],[`curl-config --cflags`])
|
|
AC_SUBST([LIBCURL],[`curl-config --libs`])
|
|
have_libcurl=yes
|
|
else
|
|
have_libcurl=no
|
|
fi
|
|
|
|
AC_MSG_RESULT([$have_libcurl])
|
|
|
|
unset _do_libcurl
|
|
fi
|
|
])dnl
|