Commit 2b26eb98 authored by Colin Hogben's avatar Colin Hogben Committed by Daniel Stenberg
Browse files

configure: add option disable --libcurl output

parent e71ac0c6
Loading
Loading
Loading
Loading
+47 −26
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
#                            | (__| |_| |  _ <| |___
#                             \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
# Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -155,6 +155,7 @@ curl_tls_srp_msg="no (--enable-tls-srp)"
   curl_ipv6_msg="no      (--enable-ipv6)"
    curl_idn_msg="no      (--with-libidn)"
 curl_manual_msg="no      (--enable-manual)"
curl_libcurl_msg="enabled (--disable-libcurl-option)"
curl_verbose_msg="enabled (--disable-verbose)"
   curl_sspi_msg="no      (--enable-sspi)"
   curl_ldap_msg="no      (--enable-ldap / --with-ldap-lib / --with-lber-lib)"
@@ -651,6 +652,25 @@ AC_HELP_STRING([--disable-manual],[Disable built-in manual]),
dnl The actual use of the USE_MANUAL variable is done much later in this
dnl script to allow other actions to disable it as well.

dnl ************************************************************
dnl disable C code generation support
dnl
AC_MSG_CHECKING([whether to enable generation of C code])
AC_ARG_ENABLE(libcurl_option,
AC_HELP_STRING([--enable-libcurl-option],[Enable --libcurl C code generation support])
AC_HELP_STRING([--disable-libcurl-option],[Disable --libcurl C code generation support]),
[ case "$enableval" in
  no)
       AC_MSG_RESULT(no)
       AC_DEFINE(CURL_DISABLE_LIBCURL_OPTION, 1, [to disable --libcurl C code generation option])
       curl_libcurl_msg="no"
       ;;
  *)   AC_MSG_RESULT(yes)
       ;;
  esac ],
       AC_MSG_RESULT(yes)
)

dnl **********************************************************************
dnl Checks for libraries.
dnl **********************************************************************
@@ -3322,6 +3342,7 @@ AC_MSG_NOTICE([Configured to build curl/libcurl:
  IDN support:      ${curl_idn_msg}
  Build libcurl:    Shared=${enable_shared}, Static=${enable_static}
  Built-in manual:  ${curl_manual_msg}
  --libcurl option: ${curl_libcurl_msg}
  Verbose errors:   ${curl_verbose_msg}
  SSPI support:     ${curl_sspi_msg}
  ca cert bundle:   ${ca}
+4 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
 * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
@@ -23,6 +23,8 @@

#include <curl/curl.h>

#ifndef CURL_DISABLE_LIBCURL_OPTION

#define ENABLE_CURLX_PRINTF
/* use our own printf() functions */
#include "curlx.h"
@@ -110,3 +112,4 @@ void dumpeasysrc(struct Configurable *config)
  easysrc = NULL;
}

#endif /* CURL_DISABLE_LIBCURL_OPTION */
+4 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
 * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
@@ -22,6 +22,7 @@
 *
 ***************************************************************************/
#include "setup.h"
#ifndef CURL_DISABLE_LIBCURL_OPTION

/* global variable declarations, for easy-interface source code generation */

@@ -30,5 +31,7 @@ extern struct curl_slist *easysrc_remarks;

void dumpeasysrc(struct Configurable *config);

#endif /* CURL_DISABLE_LIBCIRL_CMD */

#endif /* HEADER_CURL_TOOL_EASYSRC_H */
+6 −0
Original line number Diff line number Diff line
@@ -739,8 +739,14 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
        config->ftp_ssl_ccc_mode = ftpcccmethod(config, nextarg);
        break;
      case 'z': /* --libcurl */
#ifdef CURL_DISABLE_LIBCURL_OPTION
        warnf(config,
              "--libcurl option was disabled at build-time!\n");
        return PARAM_OPTION_UNKNOWN;
#else
        GetStr(&config->libcurl, nextarg);
        break;
#endif
      case '#': /* --raw */
        config->raw = toggle;
        break;
+2 −0
Original line number Diff line number Diff line
@@ -110,7 +110,9 @@ static const char *const helptext[] = {
  "     --key KEY       Private key file name (SSL/SSH)",
  "     --key-type TYPE Private key file type (DER/PEM/ENG) (SSL)",
  "     --krb LEVEL     Enable Kerberos with specified security level (F)",
#ifndef CURL_DISABLE_LIBCURL_OPTION
  "     --libcurl FILE  Dump libcurl equivalent code of this command line",
#endif
  "     --limit-rate RATE  Limit transfer speed to this rate",
  " -l, --list-only     List only names of an FTP directory (F)",
  "     --local-port RANGE  Force use of these local port numbers",
Loading