"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "configure.ac" between
htmldoc-1.9.11-source.tar.gz and htmldoc-1.9.12-source.tar.gz

About: HTMLDOC converts HTML and Markdown source files into indexed HTML, EPUB, PostScript, or PDF files (but doesn’t support CSS).

configure.ac  (htmldoc-1.9.11-source):configure.ac  (htmldoc-1.9.12-source)
# dnl
# Configuration script for HTMLDOC, an HTML document processing program. dnl Con])guration script for HTMLDOC, an HTML document processing program.
# dnl
# Copyright © 2011-2020 by Michael R Sweet. dnl Copyright © 2011-2021 by Michael R Sweet.
# Copyright © 1997-2010 by Easy Software Products. dnl Copyright © 1997-2010 by Easy Software Products.
# dnl
# This program is free software. Distribution and use rights are outlined in dnl This program is free software. Distribution and use rights are outlined in
# the file "COPYING". dnl the file "COPYING".
# dnl
dnl ***********************************************************************
dnl
dnl Note: Using autoheader or automake on this project will break the HTMLDOC
dnl build system. Use "autoconf -f" to regenerate the configure script if
dnl you make changes to this file.
dnl
dnl ***********************************************************************
AC_INIT([HTMLDOC], [1.9.11], [https://github.com/michaelrsweet/htmldoc/issues], dnl We need at least autoconf 2.69 for the AS_HELP_STRING macro...
[htmldoc], [https://michaelrsweet.github.io/htmldoc]) AC_PREREQ([2.69])
AC_CONFIG_HEADER(config.h)
dnl Define the version number... AC_INIT([HTMLDOC], [1.9.12], [https://github.com/michaelrsweet/htmldoc/issues],
[htmldoc], [https://www.msweet.org/htmldoc])
AC_CONFIG_HEADERS([config.h])
dnl De])ne the version number...
SVERSION="AC_PACKAGE_VERSION" SVERSION="AC_PACKAGE_VERSION"
AC_SUBST(SVERSION) AC_SUBST(SVERSION)
AC_DEFINE_UNQUOTED(SVERSION, "$SVERSION") AC_DEFINE_UNQUOTED(SVERSION, "$SVERSION")
dnl Get the operating system and version number... dnl GNU autoheader, automake, etc. will break the build system, this macro
uname=`uname` dnl causes the autoheader utility to fail...
uversion=`uname -r | sed -e '1,$s/[[^0-9]]//g'` AC_DEFINE([HTMLDOC_DOES_NOT_USE_AUTOHEADER_OR_AUTOMAKE])
if test "$uname" = "IRIX64"; then dnl Get the operating system and version number...
uname="IRIX" dnl Get the build and host platforms and split the host_os value
fi AC_CANONICAL_BUILD
AC_CANONICAL_HOST
[host_os_name=`echo $host_os | sed -e '1,$s/[0-9.]*$//g'`]
[host_os_version=`echo $host_os | sed -e '1,$s/^[^0-9.]*//g' | awk -F. '{print $
1 $2}'`]
# Linux often does not yield an OS version we can use...
AS_IF([test "x$host_os_version" = x], [
host_os_version="0"
])
dnl Clear the debugging options unless the user asks for them... dnl Clear the debugging options unless the user asks for them...
INSTALL_STRIP="-s" INSTALL_STRIP="-s"
AC_SUBST(INSTALL_STRIP) AC_SUBST(INSTALL_STRIP)
OPTIM="${OPTIM:=}" OPTIM="${OPTIM:=}"
AC_SUBST(OPTIM) AC_SUBST(OPTIM)
CFLAGS="${CFLAGS:=}" CFLAGS="${CFLAGS:=}"
CXXFLAGS="${CXXFLAGS:=}" CXXFLAGS="${CXXFLAGS:=}"
LDFLAGS="${LDFLAGS:=}" LDFLAGS="${LDFLAGS:=}"
AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging, default=no], AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [turn on debugging, defaul
[if eval "test x$enable_debug = xyes"; then t=no]), [
AS_IF([eval "test x$enable_debug = xyes"], [
INSTALL_STRIP="" INSTALL_STRIP=""
OPTIM="-g " OPTIM="-g "
fi]) ])
])
AC_ARG_WITH(gui, [ --without-gui do not compile the GUI version of HT MLDOC, default=yes]) AC_ARG_WITH(gui, AS_HELP_STRING([--without-gui], [do not compile the GUI version of HTMLDOC, default=yes]))
dnl Checks for programs... dnl Checks for programs...
AC_PROG_AWK AC_PROG_AWK
AC_PROG_CC(clang cc gcc) AC_PROG_CC(clang cc gcc)
AC_PROG_CXX(clang++ c++ g++) AC_PROG_CXX(clang++ c++ g++)
AC_PROG_CPP AC_PROG_CPP
AC_PROG_RANLIB AC_PROG_RANLIB
AC_PATH_PROG(AR,ar) AC_PATH_PROG(AR,ar)
AC_PATH_PROG(CHMOD,chmod) AC_PATH_PROG(CHMOD,chmod)
AC_PATH_PROG(CP,cp) AC_PATH_PROG(CP,cp)
AC_PATH_PROG(FLTKCONFIG,fltk-config) AC_PATH_PROG(FLTKCONFIG,fltk-config)
AC_MSG_CHECKING(for install-sh script) AC_MSG_CHECKING(for install-sh script)
INSTALL="`pwd`/install-sh" INSTALL="`pwd`/install-sh"
AC_SUBST(INSTALL) AC_SUBST(INSTALL)
AC_MSG_RESULT(using $INSTALL) AC_MSG_RESULT(using $INSTALL)
AC_PATH_PROG(MV,mv) AC_PATH_PROG(MV,mv)
AC_PATH_PROG(MKDIR,mkdir) AC_PATH_PROG(MKDIR,mkdir)
AC_PATH_PROG(RM,rm) AC_PATH_PROG(RM,rm)
AC_PATH_TOOL(PKGCONFIG, pkg-config) AC_PATH_TOOL(PKGCONFIG, pkg-config)
dnl See if we need a .exe extension on executables... AS_IF([test x$PKGCONFIG = x], [
AC_MSG_ERROR([pkg-config is required for library checks.])
])
dnl See whether we need a .exe extension on executables...
AC_EXEEXT AC_EXEEXT
dnl Figure out the correct "ar" command flags... dnl Figure out the correct "ar" command flags...
if test "$ac_cv_prog_ranlib" = ":"; then AS_IF([test "$ac_cv_prog_ranlib" = ":"], [
ARFLAGS="crs" ARFLAGS="crs"
else ], [
ARFLAGS="cr" ARFLAGS="cr"
fi ])
AC_SUBST(ARFLAGS) AC_SUBST(ARFLAGS)
dnl Checks for header files. dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADER(strings.h, AC_DEFINE(HAVE_STRINGS_H)) AC_CHECK_HEADER(strings.h, AC_DEFINE(HAVE_STRINGS_H))
AC_CHECK_HEADER(locale.h, AC_DEFINE(HAVE_LOCALE_H)) AC_CHECK_HEADER(locale.h, AC_DEFINE(HAVE_LOCALE_H))
dnl Checks for string functions. dnl Checks for string functions.
AC_CHECK_FUNCS(strdup strcasecmp strncasecmp strlcat strlcpy) AC_CHECK_FUNCS(strdup strcasecmp strncasecmp strlcat strlcpy snprintf vsnprintf)
if test "$uname" = "HP-UX" -a "$uversion" = "1020"; then
AC_MSG_WARN(Forcing snprintf emulation for HP-UX...)
else
AC_CHECK_FUNCS(snprintf vsnprintf)
fi
dnl Check for random number functions... dnl Check for random number functions...
AC_CHECK_FUNCS(random lrand48 arc4random) AC_CHECK_FUNCS(random lrand48 arc4random)
dnl See if the tm structure has the tm_gmtoff member... dnl See whether the tm structure has the tm_gmtoff member...
AC_MSG_CHECKING(for tm_gmtoff member in tm structure) AC_MSG_CHECKING([for tm_gmtoff member in tm structure])
AC_TRY_COMPILE([#include <time.h>],[struct tm t; AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[
int o = t.tm_gmtoff;], struct tm t;
AC_MSG_RESULT(yes) int o = t.tm_gmtoff;
AC_DEFINE(HAVE_TM_GMTOFF), ]])], [
AC_MSG_RESULT(no)) AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_TM_GMTOFF)
], [
AC_MSG_RESULT([no])
])
dnl Check for libraries... dnl Check for libraries...
LDFLAGS="${LDFLAGS:=}" LDFLAGS="${LDFLAGS:=}"
AC_SUBST(LDFLAGS) AC_SUBST(LDFLAGS)
AC_CHECK_LIB(m,pow) AC_CHECK_LIB(m,pow)
AC_CHECK_FUNC(poll, AC_DEFINE(HAVE_POLL)) AC_CHECK_FUNC(poll, AC_DEFINE(HAVE_POLL))
AC_SEARCH_LIBS(socket, socket) AC_SEARCH_LIBS(socket, socket)
AC_SEARCH_LIBS(gethostbyaddr, nsl) AC_SEARCH_LIBS(gethostbyaddr, nsl)
AC_SEARCH_LIBS(getaddrinfo, nsl, AC_DEFINE(HAVE_GETADDRINFO)) AC_SEARCH_LIBS(getaddrinfo, nsl, AC_DEFINE(HAVE_GETADDRINFO))
AC_SEARCH_LIBS(getnameinfo, nsl, AC_DEFINE(HAVE_GETNAMEINFO)) AC_SEARCH_LIBS(getnameinfo, nsl, AC_DEFINE(HAVE_GETNAMEINFO))
AC_SEARCH_LIBS(hstrerror, nsl socket resolv, AC_DEFINE(HAVE_HSTRERROR)) AC_SEARCH_LIBS(hstrerror, nsl socket resolv, AC_DEFINE(HAVE_HSTRERROR))
AC_SEARCH_LIBS(__res_init, resolv bind, AC_DEFINE(HAVE_RES_INIT), AC_SEARCH_LIBS(__res_init, resolv bind, AC_DEFINE(HAVE_RES_INIT), [
AC_SEARCH_LIBS(res_9_init, resolv bind, AC_DEFINE(HAVE_RES_INIT), AC_SEARCH_LIBS(res_9_init, resolv bind, AC_DEFINE(HAVE_RES_INIT),
AC_SEARCH_LIBS(res_init, resolv bind, AC_DEFINE(HAVE_RES_INIT)))) AC_SEARCH_LIBS(res_init, resolv bind, AC_DEFINE(HAVE_RES_INIT)))
])
AC_CHECK_HEADER(resolv.h, AC_DEFINE(HAVE_RESOLV_H)) AC_CHECK_HEADER(resolv.h, AC_DEFINE(HAVE_RESOLV_H))
dnl Check for largefile support... dnl Check for largefile support...
AC_SYS_LARGEFILE AC_SYS_LARGEFILE
dnl Define largefile options as needed... dnl Define largefile options as needed...
LARGEFILE="" LARGEFILE=""
if test x$enable_largefile != xno; then AS_IF([test x$enable_largefile != xno], [
LARGEFILE="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" LARGEFILE="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
if test x$ac_cv_sys_large_files = x1; then AS_IF([test x$ac_cv_sys_largefiles = x1], [
LARGEFILE="$LARGEFILE -D_LARGE_FILES" LARGEFILE="$LARGEFILE -D_LARGE_FILES"
fi ])
if test x$ac_cv_sys_file_offset_bits = x64; then AS_IF([test x$ac_cv_sys_file_offset_bits = x64], [
LARGEFILE="$LARGEFILE -D_FILE_OFFSET_BITS=64" LARGEFILE="$LARGEFILE -D_FILE_OFFSET_BITS=64"
fi ])
fi ])
AC_SUBST(LARGEFILE) AC_SUBST(LARGEFILE)
dnl Check for "long long" support... dnl Check for "long long" support...
AC_CACHE_CHECK(for long long int, ac_cv_c_long_long, AC_CACHE_CHECK([for long long int], ac_cv_c_long_long, [
[if test "$GCC" = yes; then AS_IF([test "$GCC" = yes], [
ac_cv_c_long_long=yes ac_cv_c_long_long=yes
else ], [
AC_TRY_COMPILE(,[long long int i;], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
ac_cv_c_long_long=yes, long long int i;
ac_cv_c_long_long=no) ]])], [
fi]) ac_cv_c_long_long=yes
], [
ac_cv_c_long_long=no
])
])
])
if test $ac_cv_c_long_long = yes; then AS_IF([test $ac_cv_c_long_long = yes], [
AC_DEFINE(HAVE_LONG_LONG) AC_DEFINE(HAVE_LONG_LONG)
fi ])
AC_CHECK_FUNC(strtoll, AC_DEFINE(HAVE_STRTOLL)) AC_CHECK_FUNC(strtoll, AC_DEFINE(HAVE_STRTOLL))
dnl Check for TLS/SSL libraries... dnl Check for TLS/SSL libraries...
AC_ARG_ENABLE(ssl, [ --enable-ssl turn on SSL/TLS support, default=y AC_ARG_ENABLE(ssl, AS_HELP_STRING([--disable-ssl], [turn off SSL/TLS support, de
es]) fault=enabled]))
AC_ARG_ENABLE(gnutls, [ --enable-gnutls use GNU TLS for SSL/TLS support AC_ARG_ENABLE(gnutls, AS_HELP_STRING([--enable-gnutls], [use GNU TLS for SSL/TLS
, default=yes]) support, default=auto]))
AC_ARG_ENABLE(cdsassl, [ --enable-cdsassl use CDSA for SSL/TLS support, AC_ARG_ENABLE(cdsassl, AS_HELP_STRING([--enable-cdsassl], [use CDSA for SSL/TLS
default=yes]) support, default=auto]))
SSLFLAGS="" SSLFLAGS=""
SSLLIBS="" SSLLIBS=""
have_ssl=0 have_ssl=0
if test x$enable_ssl != xno; then AS_IF([test x$enable_ssl], [
dnl Look for CDSA... # Look for CDSA...
if test $have_ssl = 0 -a "x$enable_cdsassl" != "xno"; then AS_IF([test $have_ssl = 0 -a "x$enable_cdsassl" != "xno"], [
if test $uname = Darwin; then AS_IF([test $host_os_name = darwin], [
AC_CHECK_HEADER(Security/SecureTransport.h, [ AC_CHECK_HEADER(Security/SecureTransport.h, [
have_ssl=1 have_ssl=1
AC_DEFINE(HAVE_SSL) AC_DEFINE(HAVE_SSL)
AC_DEFINE(HAVE_CDSASSL) AC_DEFINE(HAVE_CDSASSL)
SSLLIBS="-framework Security -framework CoreFoundation" SSLLIBS="-framework Security -framework CoreFoundation"
AC_CHECK_HEADER(Security/SecureTransportPriv.h, AC_CHECK_HEADER(Security/SecCertificate.h, AC_DEFINE(HAVE_SECCERT
AC_DEFINE(HAVE_SECURETRANSPORTPRIV_H)) IFICATE_H))
AC_CHECK_HEADER(Security/SecCertificate.h, AC_CHECK_HEADER(Security/SecItem.h, AC_DEFINE(HAVE_SECITEM_H))
AC_DEFINE(HAVE_SECCERTIFICATE_H)) AC_CHECK_HEADER(Security/SecPolicy.h, AC_DEFINE(HAVE_SECPOLICY_H)
AC_CHECK_HEADER(Security/SecItem.h, )
AC_DEFINE(HAVE_SECITEM_H)) ])
AC_CHECK_HEADER(Security/SecItemPriv.h, ])
AC_DEFINE(HAVE_SECITEMPRIV_H),, ])
[#include <Security/SecItem.h>])
AC_CHECK_HEADER(Security/SecPolicy.h,
AC_DEFINE(HAVE_SECPOLICY_H))
AC_CHECK_HEADER(Security/SecPolicyPriv.h,
AC_DEFINE(HAVE_SECPOLICYPRIV_H))
AC_CHECK_HEADER(Security/SecBasePriv.h,
AC_DEFINE(HAVE_SECBASEPRIV_H))
AC_CHECK_HEADER(Security/SecIdentitySearchPriv.h,
AC_DEFINE(HAVE_SECIDENTITYSEARCHPRIV_H))
AC_DEFINE(HAVE_CSSMERRORSTRING)
AC_DEFINE(HAVE_SECKEYCHAINOPEN)])
if test $uversion -ge 150; then
AC_DEFINE(HAVE_SSLSETENABLEDCIPHERS)
fi
fi
fi
dnl Then look for GNU TLS... # Then look for GNU TLS...
if test $have_ssl = 0 -a "x$enable_gnutls" != "xno" -a "x$PKGCONFIG" != x; t AS_IF([test $have_ssl = 0 -a "x$enable_gnutls" != "xno" -a "x$PKGCONFIG" !=
hen x], [
AC_PATH_TOOL(LIBGNUTLSCONFIG,libgnutls-config) AC_PATH_TOOL(LIBGNUTLSCONFIG,libgnutls-config)
AC_PATH_TOOL(LIBGCRYPTCONFIG,libgcrypt-config) AC_PATH_TOOL(LIBGCRYPTCONFIG,libgcrypt-config)
if $PKGCONFIG --exists gnutls; then AS_IF([$PKGCONFIG --exists gnutls], [
have_ssl=1 have_ssl=1
SSLLIBS=`$PKGCONFIG --libs gnutls` SSLLIBS=`$PKGCONFIG --libs gnutls`
SSLFLAGS=`$PKGCONFIG --cflags gnutls` SSLFLAGS=`$PKGCONFIG --cflags gnutls`
AC_DEFINE(HAVE_SSL) AC_DEFINE(HAVE_SSL)
AC_DEFINE(HAVE_GNUTLS) AC_DEFINE(HAVE_GNUTLS)
elif test "x$LIBGNUTLSCONFIG" != x; then ], [test "x$LIBGNUTLSCONFIG" != x], [
have_ssl=1 have_ssl=1
SSLLIBS=`$LIBGNUTLSCONFIG --libs` SSLLIBS=`$LIBGNUTLSCONFIG --libs`
SSLFLAGS=`$LIBGNUTLSCONFIG --cflags` SSLFLAGS=`$LIBGNUTLSCONFIG --cflags`
AC_DEFINE(HAVE_SSL) AC_DEFINE(HAVE_SSL)
AC_DEFINE(HAVE_GNUTLS) AC_DEFINE(HAVE_GNUTLS)
fi ])
if test $have_ssl = 1; then AS_IF([test $have_ssl = 1], [
SAVELIBS="$LIBS" SAVELIBS="$LIBS"
LIBS="$LIBS $SSLLIBS" LIBS="$LIBS $SSLLIBS"
AC_CHECK_FUNC(gnutls_transport_set_pull_timeout_function, AC_DEFINE(H AVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION)) AC_CHECK_FUNC(gnutls_transport_set_pull_timeout_function, AC_DEFINE(H AVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION))
AC_CHECK_FUNC(gnutls_priority_set_direct, AC_DEFINE(HAVE_GNUTLS_PRIOR ITY_SET_DIRECT)) AC_CHECK_FUNC(gnutls_priority_set_direct, AC_DEFINE(HAVE_GNUTLS_PRIOR ITY_SET_DIRECT))
LIBS="$SAVELIBS" LIBS="$SAVELIBS"
fi ])
fi ])
fi ])
AC_MSG_NOTICE([Using SSLFLAGS="$SSLFLAGS", SSLLIBS="$SSLLIBS"]) AC_MSG_NOTICE([Using SSLFLAGS="$SSLFLAGS", SSLLIBS="$SSLLIBS"])
AC_SUBST(SSLFLAGS) AC_SUBST(SSLFLAGS)
AC_SUBST(SSLLIBS) AC_SUBST(SSLLIBS)
dnl Check for GUI libraries... dnl Check for GUI libraries...
have_fltk=no
POST=: POST=:
if test "x$with_gui" != xno; then AS_IF([test "x$with_gui" != xno], [
if test "x$FLTKCONFIG" != x; then AS_IF([test "x$FLTKCONFIG" != x], [
LIBS="$LIBS `$FLTKCONFIG --use-images --ldflags`" have_fltk=yes
AC_DEFINE(HAVE_LIBFLTK) CPPFLAGS="$CPPFLAGS $($FLTKCONFIG --use-images --cflags)"
LIBS="$LIBS $($FLTKCONFIG --use-images --ldflags)"
AC_DEFINE([HAVE_LIBFLTK], [1], [Do we have the FLTK library?])
AC_DEFINE([HAVE_LIBJPEG], 1, [Have JPEG library?])
AC_DEFINE([HAVE_LIBPNG], 1, [Have PNG library?])
POST="$FLTKCONFIG --post" POST="$FLTKCONFIG --post"
AC_CHECK_LIB(Xpm,XpmCreatePixmapFromData) AC_CHECK_LIB(Xpm,XpmCreatePixmapFromData)
AC_CHECK_LIB(X11,XCreateBitmapFromData) AC_CHECK_LIB(X11,XCreateBitmapFromData)
else ], [
AC_MSG_WARN(FLTK not available so no GUI will be built.) AS_IF([test "x$with_gui" = xyes], [
fi AC_MSG_ERROR([FLTK not available.])
fi ], [
AC_MSG_WARN([FLTK not available so no GUI will be built.])
])
])
])
AC_SUBST(POST) AC_SUBST(POST)
dnl Check for image libraries... dnl Check for image libraries...
NEWLIBS="" AS_IF([test "x$PKGCONFIG" != x], [
AC_MSG_CHECKING([for libjpeg])
AC_ARG_ENABLE(localjpeg, [ --enable-localjpeg use local JPEG library, defa AS_IF([$PKGCONFIG --exists libjpeg], [
ult=auto]) AC_MSG_RESULT([yes]);
if test x$enable_localjpeg = xyes; then AC_DEFINE([HAVE_LIBJPEG], 1, [Have JPEG library?])
AC_MSG_CHECKING([for library containing jpeg_CreateCompress]) CPPFLAGS="$CPPFLAGS $($PKGCONFIG --cflags libjpeg)"
AC_MSG_RESULT([local libjpeg]) LIBS="$LIBS $($PKGCONFIG --libs libjpeg)"
JPEGINC="-I../jpeg" ], [
JPEG="jpeg" AC_MSG_RESULT([no]);
NEWLIBS="../jpeg/libjpeg.a $NEWLIBS" ])
else ])
AC_SEARCH_LIBS(jpeg_CreateCompress,turbojpeg jpeg,
JPEGINC="" AC_SEARCH_LIBS([gzgets], [z], [
JPEG="", LIBS="$LIBS -lz"
JPEGINC="-I../jpeg" ], [
JPEG="jpeg" AC_MSG_ERROR([HTMLDOC requires zlib.])
NEWLIBS="../jpeg/libjpeg.a $NEWLIBS") ])
fi
AC_MSG_CHECKING([for libpng-1.6.x])
AC_ARG_ENABLE(localzlib, [ --enable-localzlib use local ZLIB library, defa AS_IF([$PKGCONFIG --exists libpng16], [
ult=auto]) AC_MSG_RESULT([yes]);
if test x$enable_localzlib = xyes; then AC_DEFINE([HAVE_LIBPNG], 1, [Have PNG library?])
AC_MSG_CHECKING([for library containing gzgets]) CPPFLAGS="$CPPFLAGS $($PKGCONFIG --cflags libpng16)"
AC_MSG_RESULT([local libz]) LIBS="$($PKGCONFIG --libs libpng16) $LIBS"
ZLIBINC="-I../zlib" ], [
ZLIB="zlib" AC_MSG_RESULT([no]);
NEWLIBS="../zlib/libz.a $NEWLIBS" ])
else
AC_SEARCH_LIBS(gzgets,z,
ZLIBINC=""
ZLIB="",
ZLIBINC="-I../zlib"
ZLIB="zlib"
NEWLIBS="../zlib/libz.a $NEWLIBS")
fi
AC_ARG_ENABLE(localpng, [ --enable-localpng use local PNG library, defaul
t=auto])
if test x$enable_localpng = xyes; then
AC_MSG_CHECKING([for library containing png_set_tRNS_to_alpha])
AC_MSG_RESULT([local libpng])
PNGINC="-I../png"
PNG="png"
NEWLIBS="../png/libpng.a $NEWLIBS"
else
AC_SEARCH_LIBS(png_set_tRNS_to_alpha,png,
PNGINC=""
PNG="",
PNGINC="-I../png"
PNG="png"
NEWLIBS="../png/libpng.a $NEWLIBS")
fi
AC_SUBST(JPEG)
AC_SUBST(JPEGINC)
AC_SUBST(PNG)
AC_SUBST(PNGINC)
AC_SUBST(ZLIB)
AC_SUBST(ZLIBINC)
AC_DEFINE(HAVE_LIBJPEG)
AC_DEFINE(HAVE_LIBPNG)
AC_DEFINE(HAVE_LIBZ)
LIBS="$NEWLIBS $LIBS"
dnl Directories for config.h... dnl Directories for config.h...
if test "$prefix" = "NONE"; then AS_IF([test "$prefix" = "NONE"], [
prefix="/usr/local" prefix="/usr/local"
fi ])
if test "$exec_prefix" = "NONE"; then AS_IF([test "$exec_prefix" = "NONE"], [
exec_prefix="$prefix" exec_prefix="$prefix"
fi ])
if test "$bindir" = "\${exec_prefix}/bin"; then AS_IF([test "$bindir" = "\${exec_prefix}/bin"], [
bindir="$exec_prefix/bin" bindir="$exec_prefix/bin"
fi ])
dnl Fix "datarootdir" variable if it hasn't been specified... AS_IF([test "$datarootdir" = "\${prefix}/share"], [
if test "$datarootdir" = "\${prefix}/share"; then AS_IF([test "$prefix" = "/"], [
if test "$prefix" = "/"; then
datarootdir="/usr/share" datarootdir="/usr/share"
else ], [
datarootdir="$prefix/share" datarootdir="$prefix/share"
fi ])
fi ])
dnl Fix "datadir" variable if it hasn't been specified... AS_IF([test "$datadir" = "\${prefix}/share"], [
if test "$datadir" = "\${prefix}/share"; then AS_IF([test "$prefix" = "/"], [
if test "$prefix" = "/"; then
datadir="/usr/share" datadir="/usr/share"
else ], [
datadir="$prefix/share" datadir="$prefix/share"
fi ])
elif test "$datadir" = "\${datarootdir}"; then ], [test "$datadir" = "\${datarootdir}"], [
datadir="$datarootdir" datadir="$datarootdir"
fi ])
AC_DEFINE_UNQUOTED(DOCUMENTATION, "$datadir/doc/htmldoc") AC_DEFINE_UNQUOTED(DOCUMENTATION, "$datadir/doc/htmldoc")
AC_DEFINE_UNQUOTED(HTML_DATA, "$datadir/htmldoc") AC_DEFINE_UNQUOTED(HTML_DATA, "$datadir/htmldoc")
dnl Update compiler options... dnl Update compiler options...
AC_ARG_ENABLE(maintainer, [ --enable-maintainer turn on maintainer mode, de AC_ARG_ENABLE(maintainer, AS_HELP_STRING([--enable-maintainer], [turn on maintai
fault=no]) ner mode, default=no]))
AC_ARG_ENABLE(sanitizer, [ --enable-sanitizer build with AddressSanitizer] AC_ARG_ENABLE(sanitizer, AS_HELP_STRING([--enable-sanitizer], [build with Addres
) sSanitizer]))
WARNINGS="" WARNINGS=""
AC_SUBST(WARNINGS) AC_SUBST(WARNINGS)
if test -n "$GXX"; then AS_IF([test -n "$GXX"], [
if test x$enable_sanitizer = xyes; then AS_IF([test x$enable_sanitizer = xyes], [
# Use -fsanitize=address with debugging... # Use -fsanitize=address with debugging...
OPTIM="$OPTIM -g -fsanitize=address" OPTIM="$OPTIM -g -fsanitize=address"
else ], [
# Otherwise use the Fortify enhancements to catch any unbounded # Otherwise use the Fortify enhancements to catch any unbounded
# string operations... # string operations...
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2" CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
CXXFLAGS="$CXXFLAGS -D_FORTIFY_SOURCE=2" CXXFLAGS="$CXXFLAGS -D_FORTIFY_SOURCE=2"
fi ])
dnl Set optimization flags... dnl Set optimization flags...
if test -z "$OPTIM"; then AS_IF([test -z "$OPTIM"], [
OPTIM="-Os -g" OPTIM="-Os -g"
fi ])
dnl Show all standard warnings + unused variables when compiling... dnl Show all standard warnings + unused variables when compiling...
if test "$uname" = Darwin; then WARNINGS="-Wall -Wunused"
# macOS Clang is conservative about "-Wall" warnings
WARNINGS="-Wall -Wunused -Wno-char-subscripts" dnl Drop some not-useful/unreliable warnings...
else AC_LANG_PUSH(C++)
# Newer GCCs generate a lot of not-useful/reliable warnings with "-Wa for warning in char-subscripts deprecated-declarations format-truncation for
ll" mat-y2k switch unused-result; do
WARNINGS="-Wall -Wunused -Wno-unused-result -Wno-char-subscripts -Wno AC_MSG_CHECKING([whether compiler supports -Wno-$warning])
-format-y2k -Wno-maybe-uninitialized -Wno-switch -Wno-format-truncation" OLDCXXFLAGS="$CXXFLAGS"
fi CXXFLAGS="$CXXFLAGS -Wno-$warning -Werror"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
AC_MSG_RESULT([yes])
WARNINGS="$WARNINGS -Wno-$warning"
], [
AC_MSG_RESULT([no])
])
CXXFLAGS="$OLDCXXFLAGS"
done
AC_LANG_POP()
dnl Maintainer mode enables -Werror... dnl Maintainer mode enables -Werror...
if test x$enable_maintainer = xyes; then AS_IF([test x$enable_maintainer = xyes], [
WARNINGS="$WARNINGS -Werror" WARNINGS="$WARNINGS -Werror"
fi ])
dnl See if GCC supports -fno-rtti... dnl See whether GCC supports -fno-rtti...
AC_MSG_CHECKING(if GCC supports -fno-rtti) AC_MSG_CHECKING([whether GCC supports -fno-rtti])
OLDCFLAGS="$CFLAGS" OLDCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fno-rtti" CFLAGS="$CFLAGS -fno-rtti"
AC_TRY_COMPILE(,, AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], [
CXXFLAGS="$CXXFLAGS -fno-rtti" CXXFLAGS="$CXXFLAGS -fno-rtti"
AC_MSG_RESULT(yes), AC_MSG_RESULT([yes])
AC_MSG_RESULT(no)) ], [
AC_MSG_RESULT([no])
])
CFLAGS="$OLDCFLAGS" CFLAGS="$OLDCFLAGS"
dnl See if GCC supports -fno-exceptions... dnl See whether GCC supports -fno-exceptions...
AC_MSG_CHECKING(if GCC supports -fno-exceptions) AC_MSG_CHECKING([whether GCC supports -fno-exceptions])
OLDCFLAGS="$CFLAGS" OLDCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fno-exceptions" CFLAGS="$CFLAGS -fno-exceptions"
AC_TRY_COMPILE(,, AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], [
CXXFLAGS="$CXXFLAGS -fno-exceptions" CXXFLAGS="$CXXFLAGS -fno-exceptions"
AC_MSG_RESULT(yes), AC_MSG_RESULT([yes])
AC_MSG_RESULT(no)) ], [
AC_MSG_RESULT([no])
])
CFLAGS="$OLDCFLAGS" CFLAGS="$OLDCFLAGS"
dnl See if we are running Solaris; if so, try the -fpermissive option... dnl OS-specific options...
if test "$uname" = SunOS; then AS_IF([test "$host_os_name" = darwin -a x$enable_debug != xyes], [
AC_MSG_CHECKING(if GCC supports -fpermissive) OPTIM="$OPTIM -mmacosx-version-min=10.14 -arch x86_64 -arch arm64e"
])
OLDCFLAGS="$CFLAGS" ])
CFLAGS="$CFLAGS -fpermissive"
AC_TRY_COMPILE(,,
CXXFLAGS="$CXXFLAGS -fpermissive"
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
CFLAGS="$OLDCFLAGS"
elif test "$uname" = Darwin; then
CFLAGS="$CFLAGS -mmacosx-version-min=10.14"
CXXFLAGS="$CXXFLAGS -mmacosx-version-min=10.14"
LDFLAGS="$LDFLAGS -mmacosx-version-min=10.14"
fi
fi
if test "x$with_gui" != xno; then AS_IF([test "x$with_gui" != xno], [
if test "x$FLTKCONFIG" != x; then AS_IF([test "x$FLTKCONFIG" != x], [
OPTIM="`$FLTKCONFIG --cflags` $OPTIM" OPTIM="`$FLTKCONFIG --cflags` $OPTIM"
fi ])
fi ])
dnl Generate the top-level Makefile and Makedefs file... dnl Generate the top-level Makefile and Makedefs file...
AC_OUTPUT(Makedefs Makefile desktop/htmldoc.plist) AC_CONFIG_FILES([Makedefs Makefile desktop/htmldoc.plist])
AC_OUTPUT
AC_MSG_NOTICE([Using CPPFLAGS=$CPPFLAGS])
AC_MSG_NOTICE([Using CXXFLAGS=$CXXFLAGS])
AC_MSG_NOTICE([Using LDFLAGS=$LDFLAGS])
AC_MSG_NOTICE([Using LIBS=$LIBS])
 End of changes. 67 change blocks. 
252 lines changed or deleted 234 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)