1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440
|
#
# "$Id: configure.in 1493 2006-06-07 18:20:49Z mike $"
#
# Configuration script for HTMLDOC, an HTML document processing program.
#
# Copyright 1997-2006 by Easy Software Products.
#
# These coded instructions, statements, and computer programs are the
# property of Easy Software Products and are protected by Federal
# copyright law. Distribution and use rights are outlined in the file
# "COPYING.txt" which should have been included with this file. If this
# file is missing or damaged please contact Easy Software Products
# at:
#
# Attn: ESP Licensing Information
# Easy Software Products
# 44141 Airport View Drive, Suite 204
# Hollywood, Maryland 20636 USA
#
# Voice: (301) 373-9600
# EMail: info@easysw.com
# WWW: http://www.easysw.com
#
AC_INIT(htmldoc/htmldoc.h)
AC_CONFIG_HEADER(config.h)
AC_PREFIX_DEFAULT(/usr)
dnl Define the version number...
SVERSION="1.8.27"
NVERSION=10802600
AC_SUBST(SVERSION)
AC_SUBST(NVERSION)
AC_DEFINE_UNQUOTED(SVERSION, "$SVERSION")
dnl Get the operating system and version number...
uname=`uname`
uversion=`uname -r | sed -e '1,$s/[[^0-9]]//g'`
if test "$uname" = "IRIX64"; then
uname="IRIX"
fi
dnl Clear the debugging options unless the user asks for them...
OPTIM="${OPTIM:=}"
AC_SUBST(OPTIM)
CFLAGS="${CFLAGS:=}"
CXXFLAGS="${CXXFLAGS:=}"
LDFLAGS="${LDFLAGS:=}"
AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging, default=no],
[if eval "test x$enable_debug = xyes"; then
OPTIM="-g "
fi])
AC_ARG_WITH(gui, [ --with-gui compile the GUI version of HTMLDOC, default=yes])
dnl Checks for programs...
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
AC_PROG_RANLIB
AC_PATH_PROG(AR,ar)
AC_PATH_PROG(CHMOD,chmod)
AC_PATH_PROG(CP,cp)
AC_PATH_PROG(FLTKCONFIG,fltk-config)
AC_PATH_PROG(MV,mv)
AC_PATH_PROG(MKDIR,mkdir)
AC_PATH_PROG(RM,rm)
dnl See if we need a .exe extension on executables...
AC_EXEEXT
dnl Figure out the correct "ar" command flags...
if test "$ac_cv_prog_ranlib" = ":"; then
ARFLAGS="crs"
else
ARFLAGS="cr"
fi
AC_SUBST(ARFLAGS)
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADER(strings.h, AC_DEFINE(HAVE_STRINGS_H))
AC_CHECK_HEADER(locale.h, AC_DEFINE(HAVE_LOCALE_H))
dnl Checks for string functions.
AC_CHECK_FUNCS(strdup strcasecmp strncasecmp strlcat strlcpy)
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 See if the tm structure has the tm_gmtoff member...
AC_MSG_CHECKING(for tm_gmtoff member in tm structure)
AC_TRY_COMPILE([#include <time.h>],[struct tm t;
int o = t.tm_gmtoff;],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_TM_GMTOFF),
AC_MSG_RESULT(no))
dnl Check for libraries...
LDFLAGS="${LDFLAGS:=}"
AC_SUBST(LDFLAGS)
AC_CHECK_LIB(m,pow)
AC_SEARCH_LIBS(socket, socket)
AC_SEARCH_LIBS(gethostbyaddr, nsl)
AC_SEARCH_LIBS(getaddrinfo, nsl, AC_DEFINE(HAVE_GETADDRINFO))
AC_SEARCH_LIBS(getnameinfo, nsl, AC_DEFINE(HAVE_GETNAMEINFO))
AC_SEARCH_LIBS(hstrerror, nsl socket resolv, AC_DEFINE(HAVE_HSTRERROR))
dnl Check for largefile support...
AC_SYS_LARGEFILE
dnl Define largefile options as needed...
LARGEFILE=""
if test x$enable_largefile != xno; then
LARGEFILE="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
if test $ac_cv_sys_large_files = 1; then
LARGEFILE="$LARGEFILE -D_LARGE_FILES"
fi
if test $ac_cv_sys_file_offset_bits = 64; then
LARGEFILE="$LARGEFILE -D_FILE_OFFSET_BITS=64"
fi
fi
AC_SUBST(LARGEFILE)
dnl Check for "long long" support...
AC_CACHE_CHECK(for long long int, ac_cv_c_long_long,
[if test "$GCC" = yes; then
ac_cv_c_long_long=yes
else
AC_TRY_COMPILE(,[long long int i;],
ac_cv_c_long_long=yes,
ac_cv_c_long_long=no)
fi])
if test $ac_cv_c_long_long = yes; then
AC_DEFINE(HAVE_LONG_LONG)
fi
AC_CHECK_FUNC(strtoll, AC_DEFINE(HAVE_STRTOLL))
dnl Check for OpenSSL libraries...
AC_ARG_ENABLE(ssl, [ --enable-ssl turn on SSL/TLS support, default=yes])
AC_ARG_ENABLE(openssl, [ --enable-openssl use OpenSSL for SSL/TLS support, default=yes])
AC_ARG_ENABLE(gnutls, [ --enable-gnutls use GNU TLS for SSL/TLS support, default=yes])
AC_ARG_ENABLE(cdsassl, [ --enable-cdsassl use CDSA for SSL/TLS support, default=yes])
AC_ARG_WITH(openssl-libs, [ --with-openssl-libs set directory for OpenSSL library],
LDFLAGS="-L$withval $LDFLAGS"
DSOFLAGS="-L$withval $DSOFLAGS",)
AC_ARG_WITH(openssl-includes, [ --with-openssl-includes set directory for OpenSSL includes],
CFLAGS="-I$withval $CFLAGS"
CXXFLAGS="-I$withval $CXXFLAGS"
CPPFLAGS="-I$withval $CPPFLAGS",)
SSLFLAGS=""
SSLLIBS=""
if test x$enable_ssl != xno; then
dnl Check for the OpenSSL library first, which has precedence over
dnl CDSA and GNUTLS...
if test "x${SSLLIBS}" = "x" -a "x${enable_openssl}" != "xno"; then
AC_CHECK_HEADER(openssl/ssl.h,
dnl Save the current libraries so the crypto stuff isn't always
dnl included...
SAVELIBS="$LIBS"
dnl Some ELF systems can't resolve all the symbols in libcrypto
dnl if libcrypto was linked against RSAREF, and fail to link the
dnl test program correctly, even though a correct installation
dnl of OpenSSL exists. So we test the linking three times in
dnl case the RSAREF libraries are needed.
for libcrypto in \
"-lcrypto" \
"-lcrypto -lrsaref" \
"-lcrypto -lRSAglue -lrsaref"
do
AC_CHECK_LIB(ssl,SSL_new,
[SSLFLAGS="-DOPENSSL_DISABLE_OLD_DES_SUPPORT -DOPENSSL_NO_KRB5"
SSLLIBS="-lssl $libcrypto"
AC_DEFINE(HAVE_SSL)
AC_DEFINE(HAVE_LIBSSL)],,
$libcrypto)
if test "x${SSLLIBS}" != "x"; then
break
fi
done
LIBS="$SAVELIBS")
fi
dnl If OpenSSL wasn't found, look for CDSA...
if test "x${SSLLIBS}" = "x" -a "x${enable_cdsassl}" != "xno"; then
if test $uname = Darwin; then
AC_CHECK_HEADER(Security/SecureTransport.h,
[SSLLIBS="-framework CoreFoundation -framework Security"
AC_DEFINE(HAVE_SSL)
AC_DEFINE(HAVE_CDSASSL)])
fi
fi
dnl Then look for GNU TLS...
if test "x${SSLLIBS}" = "x" -a "x${enable_gnutls}" != "xno"; then
AC_CHECK_HEADER(gnutls/gnutls.h,
dnl Save the current libraries so the crypto stuff isn't always
dnl included...
SAVELIBS="$LIBS"
TEST_GNUTLS_LIBS=`libgnutls-config --libs`
AC_CHECK_LIB(gnutls, gnutls_init,
[SSLLIBS=$TEST_GNUTLS_LIBS
AC_DEFINE(HAVE_SSL)
AC_DEFINE(HAVE_GNUTLS)],,
$TEST_GNUTLS_LIBS)
LIBS="$SAVELIBS")
fi
fi
AC_SUBST(SSLFLAGS)
AC_SUBST(SSLLIBS)
dnl Check for image libraries...
NEWLIBS=""
AC_ARG_ENABLE(localjpeg, [ --enable-localjpeg use local JPEG library, default=auto],
[if eval "test x$enable_localjpeg = xyes"; then
ac_cv_lib_jpeg_jpeg_CreateCompress=no
fi])
AC_CHECK_LIB(jpeg,jpeg_CreateCompress,
JPEGINC=""
JPEG=""
LIBS="-ljpeg $LIBS",
JPEGINC="-I../jpeg"
JPEG="jpeg"
NEWLIBS="../jpeg/libjpeg.a $NEWLIBS")
AC_ARG_ENABLE(localzlib, [ --enable-localzlib use local ZLIB library, default=auto],
[if eval "test x$enable_localzlib = xyes"; then
ac_cv_lib_z_gzgets=no
fi])
AC_CHECK_LIB(z,gzgets,
ZLIBINC=""
ZLIB=""
LIBS="-lz $LIBS",
ZLIBINC="-I../zlib"
ZLIB="zlib"
NEWLIBS="../zlib/libz.a $NEWLIBS")
AC_ARG_ENABLE(localpng, [ --enable-localpng use local PNG library, default=auto],
[if eval "test x$enable_localpng = xyes"; then
ac_cv_lib_png_png_set_tRNS_to_alpha=no
fi])
AC_CHECK_LIB(png,png_set_tRNS_to_alpha,
PNGINC=""
PNG=""
LIBS="-lpng $LIBS",
PNGINC="-I../png"
PNG="png"
NEWLIBS="../png/libpng.a $NEWLIBS")
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)
dnl Check for GUI libraries...
POST=:
if test "x$with_gui" != xno; then
if test "x$FLTKCONFIG" != x; then
LIBS="$LIBS `$FLTKCONFIG --use-images --ldflags`"
OPTIM="`$FLTKCONFIG --cflags` $OPTIM"
AC_DEFINE(HAVE_LIBFLTK)
POST="$FLTKCONFIG --post"
AC_CHECK_LIB(Xpm,XpmCreatePixmapFromData)
else
AC_MSG_WARN(FLTK not available so no GUI will be built.)
fi
fi
AC_SUBST(POST)
LIBS="$NEWLIBS $LIBS"
dnl Directories for config.h...
if test "$prefix" = "NONE"; then
prefix="/usr"
fi
if test "$exec_prefix" = "NONE"; then
exec_prefix="$prefix"
fi
if test "$bindir" = "\${exec_prefix}/bin"; then
bindir="$exec_prefix/bin"
fi
AC_DEFINE_UNQUOTED(DOCUMENTATION, "$prefix/share/doc/htmldoc")
AC_DEFINE_UNQUOTED(HTML_DATA, "$prefix/share/htmldoc")
dnl Update compiler options...
if test -n "$GXX"; then
dnl Starting with GCC 3.0, you must link C++ programs against either
dnl libstdc++ (shared by default), or libsupc++ (always static). If
dnl you care about binary portability between Linux distributions,
dnl you need to either 1) build your own GCC with static C++ libraries
dnl or 2) link using gcc and libsupc++. We choose the latter since
dnl CUPS doesn't (currently) use any of the stdc++ library.
dnl
dnl Also, GCC 3.0.x still has problems compiling some code. You may
dnl or may not have success with it. USE 3.0.x WITH EXTREME CAUTION!
dnl
dnl Previous versions of GCC do not have the reliance on the stdc++
dnl or g++ libraries, so the extra supc++ library is not needed.
AC_MSG_CHECKING(if libsupc++ is required)
SUPC="`$CXX -print-file-name=libsupc++.a 2>/dev/null`"
case "$SUPC" in
libsupc++.a*)
dnl Library not found, so this is and older GCC...
AC_MSG_RESULT(no)
;;
*)
dnl This is gcc 3.x, and it knows of libsupc++, so we need it
LIBS="$LIBS -lsupc++"
AC_MSG_RESULT(yes)
;;
esac
if test "x$uname" != xDarwin; then
CXX="$CC"
fi
dnl Set optimization flags...
if test -z "$OPTIM"; then
OPTIM="-Os -g"
fi
dnl Show all standard warnings + unused variables when compiling...
OPTIM="-Wall -Wunused -Wno-char-subscripts $OPTIM"
dnl The following additional warnings are useful for tracking down problems...
# OPTIM="-Wshadow -Wconversion -Winline $OPTIM"
dnl See if GCC supports -fno-rtti...
AC_MSG_CHECKING(if GCC supports -fno-rtti)
OLDCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fno-rtti"
AC_TRY_COMPILE(,,
CXXFLAGS="$CXXFLAGS -fno-rtti"
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
CFLAGS="$OLDCFLAGS"
dnl See if GCC supports -fno-exceptions...
AC_MSG_CHECKING(if GCC supports -fno-exceptions)
OLDCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fno-exceptions"
AC_TRY_COMPILE(,,
CXXFLAGS="$CXXFLAGS -fno-exceptions"
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
CFLAGS="$OLDCFLAGS"
dnl See if we are running Solaris; if so, try the -fpermissive option...
if test "$uname" = SunOS; then
AC_MSG_CHECKING(if GCC supports -fpermissive)
OLDCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fpermissive"
AC_TRY_COMPILE(,,
CXXFLAGS="$CXXFLAGS -fpermissive"
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
CFLAGS="$OLDCFLAGS"
fi
else
case $uname in
IRIX*)
if test -z "$OPTIM"; then
if test `uname -r | sed -e '1,$s/\.//g'` -ge 62; then
OPTIM="-O3 -OPT:Olimit=5000"
else
OPTIM="-O2"
fi
fi
;;
HP-UX*)
if test -z "$OPTIM"; then
OPTIM="+O2 +DAportable"
fi
;;
SunOS*)
dnl Solaris
if test -z "$OPTIM"; then
OPTIM="-xO4 -xarch=generic"
fi
;;
UNIX_SV*)
dnl NCR SVR4 MP-RAS
CXXFLAGS="-Hcppext=cxx $CXXFLAGS"
esac
fi
dnl Set build mode...
if test x$enable_debug = xyes; then
BUILDMODE="debug"
else
BUILDMODE="production"
fi
AC_SUBST(BUILDMODE)
dnl Generate the top-level Makefile and Makedefs file...
AC_OUTPUT(Makedefs Makefile htmldoc.list desktop/htmldoc.dt desktop/htmldoc.ftr desktop/htmldoc.plist)
#
# End of "$Id: configure.in 1493 2006-06-07 18:20:49Z mike $".
#
|