1 Star 0 Fork 0

hzcc / czmq

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
configure.ac 42.54 KB
一键复制 编辑 原始数据 按行查看 历史
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162
################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Read the zproject/README.md for information about making permanent changes. #
################################################################################
# Note: if your project needs a customized configure script (compared to
# the code below 100% generated by zproject), please check first if your
# use-case can be handled by acinclude.m4 support in zproject_autotools.gsl
# (to AC_DEFUN an AX_PROJECT_LOCAL_HOOK, AX_PROJECT_LOCAL_HOOK_CONFIGVARS
# and/or AX_PROJECT_LOCAL_HOOK_FINAL) so you can avoid changing this file
# which would complicate re-generation of your project in the future.
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
#
AC_INIT([czmq],[4.2.1],[zeromq-dev@lists.zeromq.org])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(config)
AC_CONFIG_HEADERS([src/platform.h])
AM_INIT_AUTOMAKE([subdir-objects tar-ustar dist-zip foreign])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# This defines PACKAGE_VERSION_... in src/platform.h
PV_MAJOR=`echo $PACKAGE_VERSION | cut -d . -f 1`
PV_MINOR=`echo $PACKAGE_VERSION | cut -d . -f 2`
PV_PATCH=`echo $PACKAGE_VERSION | cut -d . -f 3`
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],[$PV_MAJOR],
[CZMQ major version])
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],[$PV_MINOR],
[CZMQ minor version])
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCH],[$PV_PATCH],
[CZMQ patchlevel])
# This lets us use PACKAGE_VERSION in Makefiles
AC_SUBST(PACKAGE_VERSION)
#
# Libtool -version-info (ABI version)
#
# Currently 6:1:2 ("stable"). Don't change this unless you
# know exactly what you're doing and have read and understand
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
#
# libczmq -version-info
LTVER="6:1:2"
AC_SUBST(LTVER)
# building in a subdirectory?
AM_CONDITIONAL([USING_VPATH], [test "x${srcdir}" != "x."])
# Capture c flags
CZMQ_ORIG_CFLAGS="${CFLAGS:-none}"
# Checks for programs
AC_PROG_CC
AC_PROG_CC_C99
AM_PROG_CC_C_O
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
AC_PROG_SED
AC_PROG_AWK
PKG_PROG_PKG_CONFIG
# Check endianess of the system
AC_C_BIGENDIAN
# Optional project-local hook (acinclude.m4, add AC_DEFUN([AX_PROJECT_LOCAL_HOOK], [whatever]) )
ifdef([AX_PROJECT_LOCAL_HOOK],
[AX_PROJECT_LOCAL_HOOK])
# See if cppcheck is in PATH; this variable unblocks the "cppcheck" recipe
# (note that "make cppcheck.xml" can be used - and perhaps fail - regardless)
AC_CHECK_PROG([WITH_CPPCHECK], [cppcheck], [true], [false])
AM_CONDITIONAL(WITH_CPPCHECK, $WITH_CPPCHECK)
# Code coverage
AC_MSG_CHECKING([whether to enable GCov])
AC_ARG_WITH(gcov, [AS_HELP_STRING([--with-gcov=yes/no],
[With GCC Code Coverage reporting])],
[CZMQ_GCOV="$withval"])
if test "x${CZMQ_GCOV}" == "xyes"; then
CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
if test "x${CZMQ_ORIG_CFLAGS}" != "xnone"; then
CFLAGS="${CFLAGS} ${CZMQ_ORIG_CFLAGS}"
fi
AM_CONDITIONAL(WITH_GCOV, true)
AC_MSG_RESULT([yes])
else
AM_CONDITIONAL(WITH_GCOV, false)
AC_MSG_RESULT([no])
fi
# Memory mis-use detection
AC_MSG_CHECKING([whether to enable ASan])
AC_ARG_ENABLE(address-sanitizer, [AS_HELP_STRING([--enable-address-sanitizer=yes/no],
[Build with GCC Address Sanitizer instrumentation])],
[CZMQ_ASAN="$enableval"])
if test "x${CZMQ_ASAN}" == "xyes"; then
CFLAGS="${CFLAGS} -fsanitize=address"
CXXFLAGS="${CXXFLAGS} -fsanitize=address"
AM_CONDITIONAL(ENABLE_ASAN, true)
AC_MSG_RESULT([yes])
else
AM_CONDITIONAL(ENABLE_ASAN, false)
AC_MSG_RESULT([no])
fi
# Install Python Bindings
AC_MSG_CHECKING([whether to install Python bindings])
AC_ARG_ENABLE([bindings-python],
AS_HELP_STRING([--enable-bindings-python=yes/no],
[Install Python Bindings [default=no]]),
[ZPROJECT_BINDINGS_PYTHON=$enableval],
[ZPROJECT_BINDINGS_PYTHON=no])
if test "x$ZPROJECT_BINDINGS_PYTHON" == "xyes"; then
AM_CONDITIONAL(ENABLE_BINDINGS_PYTHON, true)
AC_MSG_RESULT([yes])
else
AM_CONDITIONAL(ENABLE_BINDINGS_PYTHON, false)
AC_MSG_RESULT([no])
fi
# See if clang-format is in PATH; the result unblocks the relevant recipes
WITH_CLANG_FORMAT=""
AS_IF([test x"$CLANG_FORMAT" = x],
[AC_PATH_PROG([CLANG_FORMAT], [clang-format], [])],
[AC_CHECK_PROG([WITH_CLANG_FORMAT], [$CLANG_FORMAT], [true], [fail])])
AS_IF([test x"$CLANG_FORMAT" != x && test x"$WITH_CLANG_FORMAT" = x],
[AS_IF([test -x "$CLANG_FORMAT"],
[WITH_CLANG_FORMAT=true],
[AC_CHECK_PROG([WITH_CLANG_FORMAT], [$CLANG_FORMAT], [true], [false])])])
AS_IF([test "$WITH_CLANG_FORMAT" = fail],
[AC_MSG_ERROR([Caller explicitly referenced CLANG_FORMAT=$CLANG_FORMAT which was not found])])
AM_CONDITIONAL([WITH_CLANG_FORMAT], [$WITH_CLANG_FORMAT])
# Set pkgconfigdir
AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH],
[Path to the pkgconfig directory [[LIBDIR/pkgconfig]]]),
[pkgconfigdir="$withval"], [pkgconfigdir='${libdir}/pkgconfig'])
AC_SUBST([pkgconfigdir])
# Use the provided pkgconfigdir not only to write our pkg-config data,
# but also as an additional location to look for other packages metadata.
AS_IF([test -n "${pkgconfigdir}" -a -d "${pkgconfigdir}"],
[AS_IF([test -z "${PKG_CONFIG_PATH}"],
[PKG_CONFIG_PATH="${pkgconfigdir}"],
[PKG_CONFIG_PATH="${pkgconfigdir}:${PKG_CONFIG_PATH}"])
export PKG_CONFIG_PATH
])
# Will be used to add flags to pkg-config useful when apps want to statically link
PKGCFG_LIBS_PRIVATE=""
PKGCFG_NAMES_PRIVATE=""
# Archive user supplied flags
PREVIOUS_CFLAGS="${CFLAGS}"
PREVIOUS_LIBS="${LIBS}"
was_libzmq_check_lib_detected=no
search_libzmq="yes"
AC_ARG_WITH([libzmq],
[
AS_HELP_STRING([--with-libzmq],
[yes or no. Optionally specify libzmq prefix (directory where its include/ and lib/ are located), but that is only used if pkgconfig metadata is not found first])
],
[
search_libzmq="yes"
],
[
search_libzmq="yes"
])
AS_CASE([x"${with_libzmq}"],
[xyes], [search_libzmq="yes"],
[xno], [search_libzmq="no"])
dnl We do not abort right now, because the maintainer/developer may have
dnl something particular in mind, e.g. to build just parts of a project.
AS_IF([test x"${search_libzmq}" = xno],
[AC_MSG_WARN([Required dependency on libzmq was explicitly disabled during configuration by '--with-libzmq=no'; subsequent full build of czmq may fail])])
AS_IF([test x"${search_libzmq}" = xyes], [
# Archive previously detected and supplied flags
PRE_SEARCH_CFLAGS="${CFLAGS}"
PRE_SEARCH_LIBS="${LIBS}"
found_pkgconfig=""
PKG_CHECK_MODULES([libzmq], [libzmq >= 0.0.0],
[
was_libzmq_check_lib_detected=pkgcfg
found_pkgconfig="libzmq"
],
[
AC_MSG_NOTICE([Package libzmq not found; falling back to defined compilability tests])
libzmq_synthetic_cflags=""
libzmq_synthetic_libs="-lzmq"
if test -n "${with_libzmq}" && test x"${with_libzmq}" != xyes && test x"${with_libzmq}" != xno; then
if test -r "${with_libzmq}/include/zmq.h"; then
libzmq_synthetic_cflags="-I${with_libzmq}/include"
libzmq_synthetic_libs="-L${with_libzmq}/lib -lzmq"
else
AC_MSG_ERROR([Header file ${with_libzmq}/include/zmq.h was not found. Please check libzmq prefix])
fi
else
AC_CHECK_HEADER([zmq.h], [],
AC_MSG_ERROR([Header file zmq.h was not found in default search paths])
)
fi
AC_CHECK_LIB([zmq], [zmq_init],
[
was_libzmq_check_lib_detected=yes
PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE -lzmq"
],
[AC_MSG_ERROR([cannot link with -lzmq, install libzmq])])
])
dnl END of PKG_CHECK_MODULES and/or direct tests for libzmq
AS_CASE(["x${was_libzmq_check_lib_detected}"],
[xpkgcfg], [
PKGCFG_NAMES_PRIVATE="$PKGCFG_NAMES_PRIVATE ${found_pkgconfig}"
CFLAGS="${libzmq_CFLAGS} ${CFLAGS}"
LIBS="${libzmq_LIBS} ${LIBS}"
],
[xyes], [
CFLAGS="${libzmq_synthetic_cflags} ${CFLAGS}"
LDFLAGS="${libzmq_synthetic_libs} ${LDFLAGS}"
LIBS="${libzmq_synthetic_libs} ${LIBS}"
AC_SUBST([libzmq_CFLAGS],[${libzmq_synthetic_cflags}])
AC_SUBST([libzmq_LIBS],[${libzmq_synthetic_libs}])
],
[xno], [
AC_MSG_ERROR([Cannot find pkg-config metadata for libzmq 0.0.0 or higher])
])
])
dnl END of enabled attempts to search for libzmq
was_uuid_check_lib_detected=no
search_uuid="no"
AC_ARG_WITH([uuid],
[
AS_HELP_STRING([--with-uuid],
[yes or no. Optionally specify uuid prefix (directory where its include/ and lib/ are located), but that is only used if pkgconfig metadata is not found first])
],
[
search_uuid="yes"
],
[
search_uuid="yes"
])
AS_CASE([x"${with_uuid}"],
[xyes], [search_uuid="yes"],
[xno], [search_uuid="no"])
AS_IF([test x"${search_uuid}" = xyes], [
# Archive previously detected and supplied flags
PRE_SEARCH_CFLAGS="${CFLAGS}"
PRE_SEARCH_LIBS="${LIBS}"
found_pkgconfig=""
PKG_CHECK_MODULES([uuid], [uuid >= 0.0.0],
[
AC_DEFINE(HAVE_UUID, 1, [The optional uuid library is to be used])
was_uuid_check_lib_detected=pkgcfg
found_pkgconfig="uuid"
],
[
AC_MSG_NOTICE([Package uuid not found; falling back to defined compilability tests])
uuid_synthetic_cflags=""
uuid_synthetic_libs="-luuid"
if test -n "${with_uuid}" && test x"${with_uuid}" != xyes && test x"${with_uuid}" != xno; then
if test -r "${with_uuid}/include/uuid/uuid.h"; then
uuid_synthetic_cflags="-I${with_uuid}/include"
uuid_synthetic_libs="-L${with_uuid}/lib -luuid"
else
AC_MSG_WARN([Header file ${with_uuid}/include/uuid/uuid.h was not found. Please check uuid prefix])
fi
else
AC_CHECK_HEADER([uuid/uuid.h], [],
AC_MSG_WARN([Header file uuid/uuid.h was not found in default search paths])
)
fi
AC_CHECK_LIB([uuid], [uuid_generate],
[
was_uuid_check_lib_detected=yes
PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE -luuid"
AC_DEFINE(HAVE_UUID, 1, [The optional uuid library is to be used (as -luuid)])
],
[])
])
dnl END of PKG_CHECK_MODULES and/or direct tests for uuid
AS_CASE(["x${was_uuid_check_lib_detected}"],
[xpkgcfg], [
PKGCFG_NAMES_PRIVATE="$PKGCFG_NAMES_PRIVATE ${found_pkgconfig}"
CFLAGS="${uuid_CFLAGS} ${CFLAGS}"
LIBS="${uuid_LIBS} ${LIBS}"
],
[xyes], [
CFLAGS="${uuid_synthetic_cflags} ${CFLAGS}"
LDFLAGS="${uuid_synthetic_libs} ${LDFLAGS}"
LIBS="${uuid_synthetic_libs} ${LIBS}"
AC_SUBST([uuid_CFLAGS],[${uuid_synthetic_cflags}])
AC_SUBST([uuid_LIBS],[${uuid_synthetic_libs}])
],
[xno], [
AC_MSG_WARN([Cannot find pkg-config metadata for uuid 0.0.0 or higher])
])
])
dnl END of enabled attempts to search for uuid
was_systemd_check_lib_detected=no
search_libsystemd="no"
AC_ARG_WITH([libsystemd],
[
AS_HELP_STRING([--with-libsystemd],
[yes or no. Optionally specify libsystemd prefix (directory where its include/ and lib/ are located), but that is only used if pkgconfig metadata is not found first])
],
[
search_libsystemd="yes"
],
[
search_libsystemd="yes"
])
AS_CASE([x"${with_libsystemd}"],
[xyes], [search_libsystemd="yes"],
[xno], [search_libsystemd="no"])
AS_IF([test x"${search_libsystemd}" = xyes], [
# Archive previously detected and supplied flags
PRE_SEARCH_CFLAGS="${CFLAGS}"
PRE_SEARCH_LIBS="${LIBS}"
found_pkgconfig=""
PKG_CHECK_MODULES([systemd], [libsystemd >= 200.0.0],
[
AC_DEFINE(HAVE_LIBSYSTEMD, 1, [The optional libsystemd library is to be used])
was_systemd_check_lib_detected=pkgcfg
found_pkgconfig="libsystemd"
],
[
AC_MSG_NOTICE([Package libsystemd not found with needed constraints; falling back to defined compilability tests])
systemd_synthetic_cflags=""
systemd_synthetic_libs="-lsystemd"
if test -n "${with_libsystemd}" && test x"${with_libsystemd}" != xyes && test x"${with_libsystemd}" != xno; then
if test -r "${with_libsystemd}/include/systemd/sd-daemon.h"; then
systemd_synthetic_cflags="-I${with_libsystemd}/include"
systemd_synthetic_libs="-L${with_libsystemd}/lib -lsystemd"
else
AC_MSG_WARN([Header file ${with_libsystemd}/include/systemd/sd-daemon.h was not found. Please check libsystemd prefix])
fi
else
AC_CHECK_HEADER([systemd/sd-daemon.h], [],
AC_MSG_WARN([Header file systemd/sd-daemon.h was not found in default search paths])
)
fi
AC_CHECK_LIB([libsystemd], [sd_listen_fds],
[
was_systemd_check_lib_detected=yes
PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE -lsystemd"
AC_DEFINE(HAVE_LIBSYSTEMD, 1, [The optional libsystemd library is to be used (as -lsystemd)])
],
[])
])
dnl END of PKG_CHECK_MODULES and/or direct tests for libsystemd
AS_CASE(["x${was_systemd_check_lib_detected}"],
[xpkgcfg], [
PKGCFG_NAMES_PRIVATE="$PKGCFG_NAMES_PRIVATE ${found_pkgconfig} >= 200.0.0"
CFLAGS="${systemd_CFLAGS} ${CFLAGS}"
LIBS="${systemd_LIBS} ${LIBS}"
],
[xyes], [
CFLAGS="${systemd_synthetic_cflags} ${CFLAGS}"
LDFLAGS="${systemd_synthetic_libs} ${LDFLAGS}"
LIBS="${systemd_synthetic_libs} ${LIBS}"
AC_SUBST([systemd_CFLAGS],[${systemd_synthetic_cflags}])
AC_SUBST([systemd_LIBS],[${systemd_synthetic_libs}])
],
[xno], [
AC_MSG_WARN([Cannot find pkg-config metadata for libsystemd 200.0.0 or higher])
])
])
dnl END of enabled attempts to search for libsystemd
was_lz4_check_lib_detected=no
search_liblz4="no"
AC_ARG_WITH([liblz4],
[
AS_HELP_STRING([--with-liblz4],
[yes or no. Optionally specify liblz4 prefix (directory where its include/ and lib/ are located), but that is only used if pkgconfig metadata is not found first])
],
[
search_liblz4="yes"
],
[
search_liblz4="yes"
])
AS_CASE([x"${with_liblz4}"],
[xyes], [search_liblz4="yes"],
[xno], [search_liblz4="no"])
AS_IF([test x"${search_liblz4}" = xyes], [
# Archive previously detected and supplied flags
PRE_SEARCH_CFLAGS="${CFLAGS}"
PRE_SEARCH_LIBS="${LIBS}"
found_pkgconfig=""
PKG_CHECK_MODULES([lz4], [liblz4 >= 0.0.0],
[
AC_DEFINE(HAVE_LIBLZ4, 1, [The optional liblz4 library is to be used])
was_lz4_check_lib_detected=pkgcfg
found_pkgconfig="liblz4"
],
[
AC_MSG_NOTICE([Package liblz4 not found; falling back to defined compilability tests])
lz4_synthetic_cflags=""
lz4_synthetic_libs="-llz4"
if test -n "${with_liblz4}" && test x"${with_liblz4}" != xyes && test x"${with_liblz4}" != xno; then
if test -r "${with_liblz4}/include/lz4.h"; then
lz4_synthetic_cflags="-I${with_liblz4}/include"
lz4_synthetic_libs="-L${with_liblz4}/lib -llz4"
else
AC_MSG_WARN([Header file ${with_liblz4}/include/lz4.h was not found. Please check liblz4 prefix])
fi
else
AC_CHECK_HEADER([lz4.h], [],
AC_MSG_WARN([Header file lz4.h was not found in default search paths])
)
fi
AC_CHECK_LIB([lz4], [LZ4_decompress_safe],
[
was_lz4_check_lib_detected=yes
PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE -llz4"
AC_DEFINE(HAVE_LIBLZ4, 1, [The optional liblz4 library is to be used (as -llz4)])
],
[])
])
dnl END of PKG_CHECK_MODULES and/or direct tests for liblz4
AS_CASE(["x${was_lz4_check_lib_detected}"],
[xpkgcfg], [
PKGCFG_NAMES_PRIVATE="$PKGCFG_NAMES_PRIVATE ${found_pkgconfig}"
CFLAGS="${lz4_CFLAGS} ${CFLAGS}"
LIBS="${lz4_LIBS} ${LIBS}"
],
[xyes], [
CFLAGS="${lz4_synthetic_cflags} ${CFLAGS}"
LDFLAGS="${lz4_synthetic_libs} ${LDFLAGS}"
LIBS="${lz4_synthetic_libs} ${LIBS}"
AC_SUBST([lz4_CFLAGS],[${lz4_synthetic_cflags}])
AC_SUBST([lz4_LIBS],[${lz4_synthetic_libs}])
],
[xno], [
AC_MSG_WARN([Cannot find pkg-config metadata for liblz4 0.0.0 or higher])
])
])
dnl END of enabled attempts to search for liblz4
was_libcurl_check_lib_detected=no
search_libcurl="no"
AC_ARG_WITH([libcurl],
[
AS_HELP_STRING([--with-libcurl],
[yes or no. Optionally specify libcurl prefix (directory where its include/ and lib/ are located), but that is only used if pkgconfig metadata is not found first])
],
[
search_libcurl="yes"
],
[
search_libcurl="yes"
])
AS_CASE([x"${with_libcurl}"],
[xyes], [search_libcurl="yes"],
[xno], [search_libcurl="no"])
AS_IF([test x"${search_libcurl}" = xyes], [
# Archive previously detected and supplied flags
PRE_SEARCH_CFLAGS="${CFLAGS}"
PRE_SEARCH_LIBS="${LIBS}"
found_pkgconfig=""
PKG_CHECK_MODULES([libcurl], [libcurl >= 7.28.0],
[
AC_DEFINE(HAVE_LIBCURL, 1, [The optional libcurl library is to be used])
was_libcurl_check_lib_detected=pkgcfg
found_pkgconfig="libcurl"
],
[
AC_MSG_NOTICE([Package libcurl not found with needed constraints; falling back to defined compilability tests])
libcurl_synthetic_cflags=""
libcurl_synthetic_libs="-lcurl"
if test -n "${with_libcurl}" && test x"${with_libcurl}" != xyes && test x"${with_libcurl}" != xno; then
if test -r "${with_libcurl}/include/curl/curl.h"; then
libcurl_synthetic_cflags="-I${with_libcurl}/include"
libcurl_synthetic_libs="-L${with_libcurl}/lib -lcurl"
else
AC_MSG_WARN([Header file ${with_libcurl}/include/curl/curl.h was not found. Please check libcurl prefix])
fi
else
AC_CHECK_HEADER([curl/curl.h], [],
AC_MSG_WARN([Header file curl/curl.h was not found in default search paths])
)
fi
AC_CHECK_LIB([curl], [curl_easy_init],
[
was_libcurl_check_lib_detected=yes
PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE -lcurl"
AC_DEFINE(HAVE_LIBCURL, 1, [The optional libcurl library is to be used (as -lcurl)])
],
[])
])
dnl END of PKG_CHECK_MODULES and/or direct tests for libcurl
AS_CASE(["x${was_libcurl_check_lib_detected}"],
[xpkgcfg], [
PKGCFG_NAMES_PRIVATE="$PKGCFG_NAMES_PRIVATE ${found_pkgconfig} >= 7.28.0"
CFLAGS="${libcurl_CFLAGS} ${CFLAGS}"
LIBS="${libcurl_LIBS} ${LIBS}"
],
[xyes], [
CFLAGS="${libcurl_synthetic_cflags} ${CFLAGS}"
LDFLAGS="${libcurl_synthetic_libs} ${LDFLAGS}"
LIBS="${libcurl_synthetic_libs} ${LIBS}"
AC_SUBST([libcurl_CFLAGS],[${libcurl_synthetic_cflags}])
AC_SUBST([libcurl_LIBS],[${libcurl_synthetic_libs}])
],
[xno], [
AC_MSG_WARN([Cannot find pkg-config metadata for libcurl 7.28.0 or higher])
])
])
dnl END of enabled attempts to search for libcurl
was_nss_check_lib_detected=no
search_nss="no"
AC_ARG_WITH([nss],
[
AS_HELP_STRING([--with-nss],
[yes or no. Optionally specify nss prefix (directory where its include/ and lib/ are located), but that is only used if pkgconfig metadata is not found first])
],
[
search_nss="yes"
],
[
search_nss="yes"
])
AS_CASE([x"${with_nss}"],
[xyes], [search_nss="yes"],
[xno], [search_nss="no"])
AS_IF([test x"${search_nss}" = xyes], [
# Archive previously detected and supplied flags
PRE_SEARCH_CFLAGS="${CFLAGS}"
PRE_SEARCH_LIBS="${LIBS}"
found_pkgconfig=""
PKG_CHECK_MODULES([nss], [nss >= 0.0.0],
[
AC_DEFINE(HAVE_NSS, 1, [The optional nss library is to be used])
was_nss_check_lib_detected=pkgcfg
found_pkgconfig="nss"
],
[
AC_MSG_NOTICE([Package nss not found; falling back to defined compilability tests])
nss_synthetic_cflags=""
nss_synthetic_libs="-lnss"
if test -n "${with_nss}" && test x"${with_nss}" != xyes && test x"${with_nss}" != xno; then
if test -r "${with_nss}/include/sechash.h"; then
nss_synthetic_cflags="-I${with_nss}/include"
nss_synthetic_libs="-L${with_nss}/lib -lnss"
else
AC_MSG_WARN([Header file ${with_nss}/include/sechash.h was not found. Please check nss prefix])
fi
else
AC_CHECK_HEADER([sechash.h], [],
AC_MSG_WARN([Header file sechash.h was not found in default search paths])
)
fi
AC_CHECK_LIB([nss], [HASH_Create],
[
was_nss_check_lib_detected=yes
PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE -lnss"
AC_DEFINE(HAVE_NSS, 1, [The optional nss library is to be used (as -lnss)])
],
[])
])
dnl END of PKG_CHECK_MODULES and/or direct tests for nss
AS_CASE(["x${was_nss_check_lib_detected}"],
[xpkgcfg], [
PKGCFG_NAMES_PRIVATE="$PKGCFG_NAMES_PRIVATE ${found_pkgconfig}"
CFLAGS="${nss_CFLAGS} ${CFLAGS}"
LIBS="${nss_LIBS} ${LIBS}"
],
[xyes], [
CFLAGS="${nss_synthetic_cflags} ${CFLAGS}"
LDFLAGS="${nss_synthetic_libs} ${LDFLAGS}"
LIBS="${nss_synthetic_libs} ${LIBS}"
AC_SUBST([nss_CFLAGS],[${nss_synthetic_cflags}])
AC_SUBST([nss_LIBS],[${nss_synthetic_libs}])
],
[xno], [
AC_MSG_WARN([Cannot find pkg-config metadata for nss 0.0.0 or higher])
])
])
dnl END of enabled attempts to search for nss
was_libmicrohttpd_check_lib_detected=no
search_libmicrohttpd="no"
AC_ARG_WITH([libmicrohttpd],
[
AS_HELP_STRING([--with-libmicrohttpd],
[yes or no. Optionally specify libmicrohttpd prefix (directory where its include/ and lib/ are located), but that is only used if pkgconfig metadata is not found first])
],
[
search_libmicrohttpd="yes"
],
[
search_libmicrohttpd="yes"
])
AS_CASE([x"${with_libmicrohttpd}"],
[xyes], [search_libmicrohttpd="yes"],
[xno], [search_libmicrohttpd="no"])
AS_IF([test x"${search_libmicrohttpd}" = xyes], [
# Archive previously detected and supplied flags
PRE_SEARCH_CFLAGS="${CFLAGS}"
PRE_SEARCH_LIBS="${LIBS}"
found_pkgconfig=""
PKG_CHECK_MODULES([libmicrohttpd], [libmicrohttpd >= 0.0.0],
[
AC_DEFINE(HAVE_LIBMICROHTTPD, 1, [The optional libmicrohttpd library is to be used])
was_libmicrohttpd_check_lib_detected=pkgcfg
found_pkgconfig="libmicrohttpd"
],
[
AC_MSG_NOTICE([Package libmicrohttpd not found; falling back to defined compilability tests])
libmicrohttpd_synthetic_cflags=""
libmicrohttpd_synthetic_libs="-lmicrohttpd"
if test -n "${with_libmicrohttpd}" && test x"${with_libmicrohttpd}" != xyes && test x"${with_libmicrohttpd}" != xno; then
if test -r "${with_libmicrohttpd}/include/microhttpd.h"; then
libmicrohttpd_synthetic_cflags="-I${with_libmicrohttpd}/include"
libmicrohttpd_synthetic_libs="-L${with_libmicrohttpd}/lib -lmicrohttpd"
else
AC_MSG_WARN([Header file ${with_libmicrohttpd}/include/microhttpd.h was not found. Please check libmicrohttpd prefix])
fi
else
AC_CHECK_HEADER([microhttpd.h], [],
AC_MSG_WARN([Header file microhttpd.h was not found in default search paths])
)
fi
AC_CHECK_LIB([microhttpd], [MHD_start_daemon],
[
was_libmicrohttpd_check_lib_detected=yes
PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE -lmicrohttpd"
AC_DEFINE(HAVE_LIBMICROHTTPD, 1, [The optional libmicrohttpd library is to be used (as -lmicrohttpd)])
],
[])
])
dnl END of PKG_CHECK_MODULES and/or direct tests for libmicrohttpd
AS_CASE(["x${was_libmicrohttpd_check_lib_detected}"],
[xpkgcfg], [
PKGCFG_NAMES_PRIVATE="$PKGCFG_NAMES_PRIVATE ${found_pkgconfig}"
CFLAGS="${libmicrohttpd_CFLAGS} ${CFLAGS}"
LIBS="${libmicrohttpd_LIBS} ${LIBS}"
],
[xyes], [
CFLAGS="${libmicrohttpd_synthetic_cflags} ${CFLAGS}"
LDFLAGS="${libmicrohttpd_synthetic_libs} ${LDFLAGS}"
LIBS="${libmicrohttpd_synthetic_libs} ${LIBS}"
AC_SUBST([libmicrohttpd_CFLAGS],[${libmicrohttpd_synthetic_cflags}])
AC_SUBST([libmicrohttpd_LIBS],[${libmicrohttpd_synthetic_libs}])
],
[xno], [
AC_MSG_WARN([Cannot find pkg-config metadata for libmicrohttpd 0.0.0 or higher])
])
])
dnl END of enabled attempts to search for libmicrohttpd
CFLAGS="${PREVIOUS_CFLAGS}"
LIBS="${PREVIOUS_LIBS}"
AC_SUBST(pkg_config_libs_private, $PKGCFG_LIBS_PRIVATE)
AC_SUBST(pkg_config_names_private, $PKGCFG_NAMES_PRIVATE)
# Platform specific checks
czmq_on_mingw32="no"
czmq_on_cygwin="no"
czmq_on_android="no"
czmq_on_linux="no"
czmq_on_gnu="no"
# Host specific checks
AC_CANONICAL_HOST
# Man pages are built/installed if asciidoc and xmlto are present
# --with-docs=no overrides this
AC_ARG_WITH([docs],
AS_HELP_STRING([--with-docs],
[Build and install man pages [default=yes]]),
[with_docs=$withval])
if test "x$with_docs" = "xno"; then
czmq_build_doc="no"
czmq_install_man="no"
else
# Determine whether or not documentation should be built and installed.
czmq_build_doc="yes"
czmq_install_man="yes"
# Check for asciidoc and xmlto and don't build the docs if these are not installed.
AC_CHECK_PROG(czmq_have_asciidoc, asciidoc, yes, no)
AC_CHECK_PROG(czmq_have_xmlto, xmlto, yes, no)
if test "x$czmq_have_asciidoc" = "xno" -o "x$czmq_have_xmlto" = "xno"; then
if test "x$with_docs" = "xyes" ; then
AC_MSG_ERROR([Build with docs was explicitly requested, but tools are not available])
fi
czmq_build_doc="no"
# Tarballs built with 'make dist' ship with prebuilt documentation.
if ! test -f doc/czmq.7; then
czmq_install_man="no"
AC_MSG_WARN([You are building an unreleased version of CZMQ and asciidoc or xmlto are not installed.])
AC_MSG_WARN([Documentation will not be built and manual pages will not be installed.])
fi
fi
fi
AC_MSG_CHECKING([whether to build documentation])
AC_MSG_RESULT([$czmq_build_doc])
AC_MSG_CHECKING([whether to install manpages])
AC_MSG_RESULT([$czmq_install_man])
# Set some default features required by libczmq code.
CPPFLAGS="-DCZMQ_INTERNAL_BUILD -D_REENTRANT -D_THREAD_SAFE $CPPFLAGS"
# OS-specific tests
case "${host_os}" in
*linux*)
# Define on Linux to enable all library features
CPPFLAGS="-D_GNU_SOURCE -DLINUX $CPPFLAGS"
AC_DEFINE(CZMQ_HAVE_LINUX, 1, [Have Linux OS])
czmq_on_linux="yes"
case "${host_os}" in
*android*)
AC_DEFINE(CZMQ_HAVE_ANDROID, 1, [Have Android OS])
czmq_on_android="yes"
;;
esac
;;
*solaris*)
# Define on Solaris to enable all library features
CPPFLAGS="-D_PTHREADS $CPPFLAGS"
# Allow definitions of common OS-provided functions that are not in old standards
CPPFLAGS="-D__EXTENSIONS__ $CPPFLAGS"
AC_DEFINE(CZMQ_HAVE_SOLARIS, 1, [Have Solaris OS])
CFLAGS="${CFLAGS} -lsocket -lssp"
;;
*freebsd*)
# Define on FreeBSD to enable all library features
CPPFLAGS="-D__BSD_VISIBLE $CPPFLAGS"
AC_DEFINE(CZMQ_HAVE_FREEBSD, 1, [Have FreeBSD OS])
;;
*darwin*)
# Define on Darwin to enable all library features
CPPFLAGS="-D_DARWIN_C_SOURCE $CPPFLAGS"
AC_DEFINE(CZMQ_HAVE_OSX, 1, [Have DarwinOSX OS])
;;
*netbsd*)
# Define on NetBSD to enable all library features
CPPFLAGS="-D_NETBSD_SOURCE $CPPFLAGS"
AC_DEFINE(CZMQ_HAVE_NETBSD, 1, [Have NetBSD OS])
;;
*openbsd*)
# Define on OpenBSD to enable all library features
CPPFLAGS="-D_BSD_SOURCE $CPPFLAGS"
AC_DEFINE(CZMQ_HAVE_OPENBSD, 1, [Have OpenBSD OS])
;;
*nto-qnx*)
AC_DEFINE(CZMQ_HAVE_QNXNTO, 1, [Have QNX Neutrino OS])
;;
*aix*)
AC_DEFINE(CZMQ_HAVE_AIX, 1, [Have AIX OS])
;;
*hpux*)
# Define on HP-UX to enable all library features
CPPFLAGS="-D_POSIX_C_SOURCE=200112L"
AC_DEFINE(CZMQ_HAVE_HPUX, 1, [Have HPUX OS])
;;
*mingw32*)
# Disable format error due to incomplete ANSI C
CFLAGS="-Wno-error=format -Wno-unused-function -Wno-unused-variable -D_XOPEN_SOURCE $CFLAGS"
CPPFLAGS="-Wno-error=format -Wno-unused-function -Wno-unused-variable -D_XOPEN_SOURCE $CPPFLAGS"
AC_DEFINE(CZMQ_HAVE_WINDOWS, 1, [Have Windows OS])
AC_DEFINE(CZMQ_HAVE_MINGW32, 1, [Have MinGW32])
AC_CHECK_HEADERS(windows.h)
czmq_on_mingw32="yes"
czmq_install_man="no"
;;
*mingw64*)
# Define on MINGW64 to enable all libeary features
# Disable format error due to incomplete ANSI C
CFLAGS="-Wno-error=format -Wno-unused-function -Wno-unused-variable -D_XOPEN_SOURCE $CFLAGS"
CPPFLAGS="-Wno-error=format -Wno-unused-function -Wno-unused-variable -D_XOPEN_SOURCE $CPPFLAGS"
AC_DEFINE(CZMQ_HAVE_WINDOWS, 1, [Have Windows OS])
AC_DEFINE(CZMQ_HAVE_MINGW32, 1, [Have MinGW32])
AC_CHECK_HEADERS(windows.h)
czmq_on_mingw32="yes"
czmq_install_man="no"
;;
*cygwin*)
# Define on Cygwin to enable all library features
CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS"
AC_DEFINE(CZMQ_HAVE_CYGWIN, 1, [Have Cygwin])
czmq_on_cygwin="yes"
;;
gnu*)
# Define on GNU/Hurd to enable all library features
if test "x$GXX" = "xyes"; then
CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS"
fi
AC_DEFINE(CZMQ_HAVE_GNU, 1, [Have GNU/Hurd OS])
czmq_on_gnu="yes"
;;
*)
AC_MSG_ERROR([unsupported system: ${host_os}])
;;
esac
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(errno.h arpa/inet.h netinet/tcp.h netinet/in.h stddef.h \
stdlib.h string.h sys/socket.h sys/time.h unistd.h \
limits.h ifaddrs.h)
AC_CHECK_HEADERS([net/if.h net/if_media.h linux/wireless.h], [], [],
[
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#include <stdint.h>
])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_HEADER_TIME
AC_TYPE_UINT32_T
AC_C_VOLATILE
AC_C_BIGENDIAN
AM_CONDITIONAL(ENABLE_SHARED, test "x$enable_shared" = "xyes")
AM_CONDITIONAL(ON_MINGW, test "x$czmq_on_mingw32" = "xyes")
AM_CONDITIONAL(ON_CYGWIN, test "x$czmq_on_cygwin" = "xyes")
AM_CONDITIONAL(ON_ANDROID, test "x$czmq_on_android" = "xyes")
AM_CONDITIONAL(ON_LINUX, test "x$czmq_on_linux" = "xyes")
AM_CONDITIONAL(ON_GNU, test "x$czmq_on_gnu" = "xyes")
AM_CONDITIONAL(INSTALL_MAN, test "x$czmq_install_man" = "xyes")
AM_CONDITIONAL(BUILD_DOC, test "x$czmq_build_doc" = "xyes")
AC_ARG_ENABLE([dist_cmakefiles],
AS_HELP_STRING([--enable-dist_cmakefiles],
[Distribute CMakeLists.txt and related files [default depends: on if present and not cross compiling]]),
[enable_dist_cmakefiles=$enableval],
[AC_MSG_CHECKING([for presence of CMake recipes])
if test "x$cross_compiling" = "xyes"; then
enable_dist_cmakefiles=no
else
AC_CHECK_FILE($srcdir/CMakeLists.txt, [enable_dist_cmakefiles=yes], [enable_dist_cmakefiles=no])
fi
AC_MSG_RESULT([$enable_dist_cmakefiles])])
AM_CONDITIONAL(ENABLE_DIST_CMAKEFILES, test "x$enable_dist_cmakefiles" = "xyes")
# Check for zmakecert intent
AC_ARG_ENABLE([zmakecert],
AS_HELP_STRING([--enable-zmakecert],
[Compile and install 'zmakecert' [default=yes]]),
[enable_zmakecert=$enableval],
[enable_zmakecert=yes])
AM_CONDITIONAL([ENABLE_ZMAKECERT], [test x$enable_zmakecert != xno])
AM_COND_IF([ENABLE_ZMAKECERT], [AC_MSG_NOTICE([ENABLE_ZMAKECERT defined])])
# Check for zsp intent
AC_ARG_ENABLE([zsp],
AS_HELP_STRING([--enable-zsp],
[Compile 'zsp' in src [default=yes]]),
[enable_zsp=$enableval],
[enable_zsp=yes])
AM_CONDITIONAL([ENABLE_ZSP], [test x$enable_zsp != xno])
AM_COND_IF([ENABLE_ZSP], [AC_MSG_NOTICE([ENABLE_ZSP defined])])
# Check for test_randof intent
AC_ARG_ENABLE([test_randof],
AS_HELP_STRING([--enable-test_randof],
[Compile 'test_randof' in src [default=yes]]),
[enable_test_randof=$enableval],
[enable_test_randof=yes])
AM_CONDITIONAL([ENABLE_TEST_RANDOF], [test x$enable_test_randof != xno])
AM_COND_IF([ENABLE_TEST_RANDOF], [AC_MSG_NOTICE([ENABLE_TEST_RANDOF defined])])
# Check for czmq_selftest intent
AC_ARG_ENABLE([czmq_selftest],
AS_HELP_STRING([--enable-czmq_selftest],
[Compile 'czmq_selftest' in src [default=yes]]),
[enable_czmq_selftest=$enableval],
[enable_czmq_selftest=yes])
AM_CONDITIONAL([ENABLE_CZMQ_SELFTEST], [test x$enable_czmq_selftest != xno])
AM_COND_IF([ENABLE_CZMQ_SELFTEST], [AC_MSG_NOTICE([ENABLE_CZMQ_SELFTEST defined])])
# Checks for library functions.
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(perror gettimeofday memset getifaddrs)
# enable specific system integration features
if test "x$cross_compiling" = "xyes"; then
# Enable draft by default when cross-compiling
defaultval=yes
else
# enable draft API by default if we're in a git repository
# else disable it by default; then allow --enable-drafts=yes/no override
AC_CHECK_FILE($srcdir/.git, [defaultval=yes],
[AC_MSG_CHECKING([running under a git repository workspace])
AS_IF([git rev-parse --show-toplevel 2>/dev/null],
[defaultval=yes],
[defaultval=no])
AC_MSG_RESULT($defaultval)
])
fi
AC_ARG_ENABLE([drafts],
AS_HELP_STRING([--enable-drafts],
[Build and install draft classes and methods [default=yes]]),
[enable_drafts=$enableval],
[enable_drafts=$defaultval])
AM_CONDITIONAL([ENABLE_DRAFTS], [test x$enable_drafts != xno])
if test "x$enable_drafts" = "xyes"; then
AC_MSG_NOTICE([Building stable and legacy API + draft API])
AC_DEFINE(CZMQ_BUILD_DRAFT_API, 1, [Provide draft classes and methods])
AC_SUBST(pkg_config_defines, "-DCZMQ_BUILD_DRAFT_API=1")
else
AC_MSG_NOTICE([Building stable and legacy API (no draft API)])
AC_SUBST(pkg_config_defines, "")
fi
AC_ARG_ENABLE([Werror],
AS_HELP_STRING([--enable-Werror],
[Add -Wall -Werror to GCC/GXX arguments [default=no; default=auto if nothing specified as the specific argument value]]),
[AS_IF([test -n "$enableval"], [enable_Werror=$enableval], [enable_Werror=auto])],
[enable_Werror=no])
# These options are GNU compiler specific.
AS_IF([test "x$enable_Werror" = "xyes" || test "x$enable_Werror" = "xauto"],
[AS_IF([test -n "$CC"],[AS_IF([$CC --version 2>&1 | grep 'Free Software Foundation' > /dev/null && test "x$GCC" = "xyes"],
[AC_MSG_NOTICE([Enabling pedantic errors for GNU C])
CFLAGS="$CFLAGS -pedantic -Wall -Werror -Werror=format-security"],
[AS_IF([$CC --version 2>&1 | grep 'clang version' > /dev/null],
[AC_MSG_NOTICE([Enabling pedantic errors for clang C])
CFLAGS="$CFLAGS -pedantic -Wall -Werror -Werror=format-security"],
[AC_MSG_NOTICE([Not enabling pedantic errors: compiler not supported by this recipe (not GNU or clang C)])
AS_IF([test "x$enable_Werror" = "xyes"], [AC_MSG_ERROR([--enable-Werror=yes was requested and can not be satisfied for C: $CC])])
])])])
AS_IF([test -n "$CXX"],[AS_IF([$CXX --version 2>&1 | grep 'Free Software Foundation' > /dev/null && test "x$GCC" = "xyes"],
[AC_MSG_NOTICE([Enabling pedantic errors for GNU C++])
CXXFLAGS="$CXXFLAGS -pedantic -Wall -Werror -Werror=format-security"],
[AS_IF([$CXX --version 2>&1 | grep 'clang version' > /dev/null],
[AC_MSG_NOTICE([Enabling pedantic errors for clang C++])
CXXFLAGS="$CXXFLAGS -pedantic -Wall -Werror -Werror=format-security"],
[AC_MSG_NOTICE([Not enabling pedantic errors: compiler not supported by this recipe (not GNU or clang C++)])
AS_IF([test "x$enable_Werror" = "xyes"], [AC_MSG_ERROR([--enable-Werror=yes was requested and can not be satisfied for C++: $CXX])])
])])])
AS_IF([test -n "$CPP"],[AS_IF([$CPP --version 2>&1 | grep 'Free Software Foundation' > /dev/null && test "x$GCC" = "xyes"],
[AC_MSG_NOTICE([Enabling pedantic errors for GNU CPP preprocessor])
CPPFLAGS="$CPPFLAGS -pedantic -Werror -Wall -Wc++-compat"
],
[AS_IF([$CXX --version 2>&1 | grep 'clang version' > /dev/null],
[AC_MSG_NOTICE([Enabling pedantic errors for clang CPP preprocessor])
CPPFLAGS="$CPPFLAGS -pedantic -Werror -Wall -Wc++-compat"
],
[AC_MSG_NOTICE([Not enabling pedantic errors: preprocessor not supported by this recipe (not GNU or clang CPP)])
AS_IF([test "x$enable_Werror" = "xyes"], [AC_MSG_ERROR([--enable-Werror=yes was requested and can not be satisfied for CPP: $CPP])])
])])])
])
# Optional project-local hook to (re-)define some variables that can be used
# in your project files generated from .in templates - in your acinclude.m4,
# add AC_DEFUN([AX_PROJECT_LOCAL_HOOK_CONFIGVARS], [whatever])
ifdef([AX_PROJECT_LOCAL_HOOK_CONFIGVARS],
[AX_PROJECT_LOCAL_HOOK_CONFIGVARS])
# Specify output files
AC_CONFIG_FILES([Makefile
doc/Makefile
include/Makefile
src/libczmq.pc
])
# Optional project-local hook to put some finishing touches in your configure
# script, override something compared to zproject-generated code, etc. - in
# your acinclude.m4, add AC_DEFUN([AX_PROJECT_LOCAL_HOOK_FINAL], [whatever])
ifdef([AX_PROJECT_LOCAL_HOOK_FINAL],
[AX_PROJECT_LOCAL_HOOK_FINAL])
AC_OUTPUT
# Print configure summary and list make options
AC_DEFUN([AX_SUMMARIZE_ENV],
[
BUILD_USER=${USER}
BUILD_ARCH=${host}
BUILD_HOST=${ac_hostname}
BUILD_DATE=$(date +'%F %H:%M')
AC_DEFINE_UNQUOTED([BUILD_USER], "${BUILD_USER}", [The fine user who built the package])
AC_DEFINE_UNQUOTED([BUILD_ARCH], "${BUILD_ARCH}", [Architecture of the build host])
AC_DEFINE_UNQUOTED([BUILD_HOST], "${BUILD_HOST}", [Build host name])
AC_DEFINE_UNQUOTED([BUILD_DATE], "${BUILD_DATE}", [Build date])
AC_SUBST(BUILD_USER)
AC_SUBST(BUILD_ARCH)
AC_SUBST(BUILD_HOST)
AC_SUBST(BUILD_DATE)
AC_SUBST(BUILD_VERSION)
])
AC_DEFUN([AX_SUMMARIZE_CONFIG],
[
echo
echo '##########################################################################'
echo '# SUMMARY #'
echo '##########################################################################'
echo
echo Package version............... : $PACKAGE-$VERSION
echo
echo C compiler.................... : $CC
echo C compiler flags.............. : $CFLAGS
echo C++ compiler.................. : $CXX
echo C++ compiler flags............ : $CXXFLAGS
echo Configure date................ : $BUILD_DATE
echo Build architecture............ : $BUILD_ARCH
echo Build docs.................... : $czmq_build_doc
echo Build host.................... : $BUILD_HOST
echo Build user.................... : $USER
echo Draft API..................... : $enable_drafts
echo Python Bindings............... : $ZPROJECT_BINDINGS_PYTHON
echo Install dir................... : $prefix
echo Install man pages............. : $czmq_install_man
echo
echo Help:
echo Use the Draft API \(default = yes\):
echo --enable-drafts=\(yes\|no\)
echo
echo Build the docs and install the man pages \(default = yes\):
echo --with-docs=\(yes\|no\) *requires asciidoc and xmlto
echo
echo '##########################################################################'
echo
echo Configure complete! Now proceed with:
echo " - 'make' compile the project"
echo " - 'make check' run the project's selftest"
echo " - 'make check-<test-name>' run the project's selftest"
echo " - 'make install' install the project to $prefix"
echo " - 'make bindings install enabled language bindings (Python, etc)"
echo
echo Further options are:
echo " - 'make callcheck' run the project's selftest with valgrind to"
echo " check for performance leaks"
echo " - 'make check-verbose' run the project's selftest in verbose mode"
echo " - 'make code' generate code from models in src directory"
echo " (requires zproject and zproto)"
echo " - 'make debug' run the project's selftest under gdb"
echo " - 'make memcheck' run the project's selftest with valgrind to"
echo " check for memory leaks"
echo " - 'make coverage' generate project's selftest coverage report"
echo " expects --with-gcov option for configure"
echo " - 'make clang-format-check' check if project sources conform"
echo " to style requirements"
echo " - 'make clang-format' modify project sources to conform"
echo " to style requirements"
echo " - 'make clang-format-diff' modify as above and print 'git diff'"
echo
])
AX_SUMMARIZE_ENV
AX_SUMMARIZE_CONFIG
################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Read the zproject/README.md for information about making permanent changes. #
################################################################################
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hwang_zc/czmq.git
git@gitee.com:hwang_zc/czmq.git
hwang_zc
czmq
czmq
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891