| 1 |
############################################################################# |
############################################################################# |
| 2 |
# $Id: configure.ac,v 1.243 2003/12/04 13:03:26 ucko Exp $ |
# $Id$ |
| 3 |
# Derived from configure.in version 1.173. |
# Derived from configure.in version 1.173. |
| 4 |
# ========================================================================== |
# ========================================================================== |
| 5 |
# |
# |
| 32 |
# USAGE: |
# USAGE: |
| 33 |
# 1) Process this file with "autoconf" to produce a "configure" script. |
# 1) Process this file with "autoconf" to produce a "configure" script. |
| 34 |
# 2) Run the resultant "configure" script to produce: |
# 2) Run the resultant "configure" script to produce: |
| 35 |
# a) "<builddir>/inc/ncbiconf.h" |
# a) "<builddir>/inc/ncbiconf_unix.h" |
| 36 |
# b) "<builddir>/build/Makefile.mk" |
# b) "<builddir>/build/Makefile.mk" |
| 37 |
# c) other Makefile's and scripts in "<builddir>/build" and below |
# c) other Makefile's and scripts in "<builddir>/build" and below |
| 38 |
# |
# |
| 39 |
############################################################################# |
############################################################################# |
| 40 |
|
|
| 41 |
AC_PREREQ(2.56) |
AC_PREREQ(2.59) |
| 42 |
|
|
| 43 |
dnl Set up lock. The diversion magic lets this occur before AC_INIT, which |
dnl Set up lock. The diversion magic lets this occur before AC_INIT, which |
| 44 |
dnl already interferes with other configure processes. |
dnl already interferes with other configure processes. |
| 45 |
|
|
| 46 |
AC_DIVERT_PUSH(INIT_PREPARE) |
AC_DIVERT_PUSH(INIT_PREPARE) |
| 47 |
if $srcdir/scripts/get_lock.sh configure $$; then |
if $srcdir/scripts/common/impl/get_lock.sh configure $$; then |
| 48 |
ac_clean_files=configure.lock |
ac_clean_files=configure.lock |
| 49 |
else |
else |
| 50 |
exit 1 |
exit 1 |
| 52 |
cache_file=config.cache |
cache_file=config.cache |
| 53 |
# reconfigure.sh expects config.cache to exist; unconditionally clobber |
# reconfigure.sh expects config.cache to exist; unconditionally clobber |
| 54 |
# any command-line setting. |
# any command-line setting. |
| 55 |
if test -z "$CONFIG_SITE" -a -r $srcdir/config.site; then |
if test -z "$CONFIG_SITE" -a -r $srcdir/src/build-system/config.site; then |
| 56 |
CONFIG_SITE=$srcdir/config.site |
CONFIG_SITE=$srcdir/src/build-system/config.site |
| 57 |
fi |
fi |
| 58 |
AC_DIVERT_POP |
AC_DIVERT_POP |
| 59 |
|
|
| 60 |
AC_INIT([ncbi-tools++],[0.0],[cpp-core@ncbi.nlm.nih.gov]) |
AC_INIT([ncbi-tools++],[0.0],[cpp-core@ncbi.nlm.nih.gov]) |
| 61 |
AC_CONFIG_SRCDIR(src/Makefile.mk.in) |
AC_CONFIG_SRCDIR(src/build-system/Makefile.mk.in) |
| 62 |
|
|
| 63 |
|
|
| 64 |
|
|
| 82 |
[ --without-optimization turn off optimization flags in non-debug mode]) |
[ --without-optimization turn off optimization flags in non-debug mode]) |
| 83 |
AC_ARG_WITH(profiling, |
AC_ARG_WITH(profiling, |
| 84 |
[ --with-profiling build profiled versions of libs and apps]) |
[ --with-profiling build profiled versions of libs and apps]) |
| 85 |
|
AC_ARG_WITH(tcheck, |
| 86 |
|
[ --with-tcheck(=DIR) build for Intel Thread Checker (in DIR)]) |
| 87 |
AC_ARG_WITH(dll, |
AC_ARG_WITH(dll, |
| 88 |
[ --with-dll build all libraries as DLLs]) |
[ --with-dll build all libraries as DLLs]) |
| 89 |
AC_ARG_WITH(static, |
AC_ARG_WITH(static, |
| 90 |
[ --with-static build all libraries statically even if --with-dll]) |
[ --with-static build all libraries statically even if --with-dll]) |
| 91 |
AC_ARG_WITH(static-exe, |
AC_ARG_WITH(static-exe, |
| 92 |
[ --with-static-exe build all executables as statically as possible]) |
[ --with-static-exe build all executables as statically as possible]) |
| 93 |
|
AC_ARG_WITH(plugin-auto-load, |
| 94 |
|
[ --with-plugin-auto-load always enable the plugin manager by default]) |
| 95 |
|
AC_ARG_WITH(bin-release, |
| 96 |
|
[ --with-bin-release build executables suitable for public release]) |
| 97 |
AC_ARG_WITH(mt, |
AC_ARG_WITH(mt, |
| 98 |
[ --with-mt compile in a MultiThread-safe manner]) |
[ --with-mt compile in a MultiThread-safe manner]) |
| 99 |
AC_ARG_WITH(64, |
AC_ARG_WITH(64, |
| 100 |
[ --with-64 compile to 64-bit code]) |
[ --with-64 compile to 64-bit code]) |
| 101 |
|
AC_ARG_WITH(universal, |
| 102 |
|
[ --with-universal build universal binaries on Mac OS X]) |
| 103 |
|
AC_ARG_WITH(universal2, |
| 104 |
|
[ --with-universal=CPUs build universal binaries targeting the given CPUs]) |
| 105 |
AC_ARG_WITH(exe, |
AC_ARG_WITH(exe, |
| 106 |
[ --without-exe do not build executables]) |
[ --without-exe do not build executables]) |
| 107 |
AC_ARG_WITH(runpath, |
AC_ARG_WITH(runpath, |
| 116 |
[ --with-autodep automatic generation of dependencies (GNU make)]) |
[ --with-autodep automatic generation of dependencies (GNU make)]) |
| 117 |
AC_ARG_WITH(build-root, |
AC_ARG_WITH(build-root, |
| 118 |
[ --with-build-root=DIR specify a non-default build directory name]) |
[ --with-build-root=DIR specify a non-default build directory name]) |
| 119 |
|
AC_ARG_WITH(fake-root, |
| 120 |
|
[ --with-fake-root=DIR appear to have been built under DIR]) |
| 121 |
AC_ARG_WITH(suffix, |
AC_ARG_WITH(suffix, |
| 122 |
[ --without-suffix no Release/Debug, MT or DLL sfx in the build dir name]) |
[ --without-suffix no Release/Debug, MT or DLL sfx in the build dir name]) |
| 123 |
AC_ARG_WITH(hostspec, |
AC_ARG_WITH(hostspec, |
| 124 |
[ --with-hostspec add full host specs to the build dir name]) |
[ --with-hostspec add full host specs to the build dir name]) |
| 125 |
AC_ARG_WITH(version, |
AC_ARG_WITH(version, |
| 126 |
[ --with-version always include the compiler ver in the b.d. name]) |
[ --without-version don't always include the cplr ver in the bd name]) |
| 127 |
|
AC_ARG_WITH(build-root-sfx, |
| 128 |
|
[ --with-build-root-sfx=X add a user-specified suffix to the build dir name]) |
| 129 |
AC_ARG_WITH(execopy, |
AC_ARG_WITH(execopy, |
| 130 |
[ --without-execopy do not copy built executables to the BIN area]) |
[ --without-execopy do not copy built executables to the BIN area]) |
| 131 |
AC_ARG_WITH(bincopy, |
AC_ARG_WITH(bincopy, |
| 134 |
[ --with-lib-rebuilds ensure that apps use up-to-date libraries]) |
[ --with-lib-rebuilds ensure that apps use up-to-date libraries]) |
| 135 |
AC_ARG_WITH(lib-rebuilds2, |
AC_ARG_WITH(lib-rebuilds2, |
| 136 |
[ --with-lib-rebuilds=ask ask whether to update each app's libraries])dnl' |
[ --with-lib-rebuilds=ask ask whether to update each app's libraries])dnl' |
| 137 |
|
AC_ARG_WITH(deactivation, |
| 138 |
|
[ --without-deactivation keep old copies of libraries that no longer build]) |
| 139 |
|
AC_ARG_WITH(makefile-auto-update, |
| 140 |
|
[ --without-makefile-auto-update do not auto-update generated makefiles]) |
| 141 |
AC_ARG_WITH(projects, |
AC_ARG_WITH(projects, |
| 142 |
[ --with-projects=FILE build projects listed in FILE by default]) |
[ --with-projects=FILE build projects listed in FILE by default]) |
| 143 |
|
AC_ARG_WITH(flat-makefile, |
| 144 |
|
[ --without-flat-makefile do not generate an all-encompassing flat makefile]) |
| 145 |
|
AC_ARG_WITH(configure-dialog, |
| 146 |
|
[ --with-configure-dialog allow interactive flat makefile project selection]) |
| 147 |
|
AC_ARG_WITH(saved-settings, |
| 148 |
|
[ --with-saved-settings=F load configuration settings from the file F]) |
| 149 |
AC_ARG_WITH(check, |
AC_ARG_WITH(check, |
| 150 |
[ --with-check= run test suite after the build]) |
[ --with-check run test suite after the build]) |
| 151 |
|
AC_ARG_WITH(check-tools, |
| 152 |
|
[ --with-check-tools=... use the specified tools for testing]) |
| 153 |
AC_ARG_WITH(ncbi-public, |
AC_ARG_WITH(ncbi-public, |
| 154 |
[ --with-ncbi-public ensure compatibility for all in-house platforms]) |
[ --with-ncbi-public ensure compatibility for all in-house platforms]) |
| 155 |
AC_ARG_WITH(strip, |
AC_ARG_WITH(strip, |
| 156 |
[ --with-strip strip binaries at build time]) |
[ --with-strip strip binaries at build time]) |
| 157 |
|
AC_ARG_WITH(pch, |
| 158 |
|
[ --with-pch use precompiled headers if possible]) |
| 159 |
|
AC_ARG_WITH(caution, |
| 160 |
|
[ --with-caution cancel configuration unconditionally when in doubt]) |
| 161 |
|
AC_ARG_WITH(caution2, |
| 162 |
|
[ --without-caution proceed without asking when in doubt]) |
| 163 |
|
AC_ARG_WITH(ccache, |
| 164 |
|
[ --without-ccache do not automatically use ccache if available]) |
| 165 |
|
AC_ARG_WITH(distcc, |
| 166 |
|
[ --without-distcc do not automatically use distcc if available]) |
| 167 |
|
|
| 168 |
## NCBI packages |
## NCBI packages |
| 169 |
AC_ARG_WITH(ncbi-c, |
AC_ARG_WITH(ncbi-c, |
| 174 |
[ --without-utils do not use NCBI SSS UTIL library]) |
[ --without-utils do not use NCBI SSS UTIL library]) |
| 175 |
AC_ARG_WITH(sssdb, |
AC_ARG_WITH(sssdb, |
| 176 |
[ --without-sssdb do not use NCBI SSS DB library]) |
[ --without-sssdb do not use NCBI SSS DB library]) |
| 177 |
AC_ARG_WITH(geo, |
AC_ARG_WITH(included-sss, |
| 178 |
[ --without-geo do not use NCBI GEO libraries]) |
[ --with-included-sss use the in-tree copy of SSS]) |
|
AC_ARG_WITH(pubmed, |
|
|
[ --without-pubmed do not use NCBI PubMed libraries]) |
|
| 179 |
|
|
| 180 |
## Third-party and system packages |
## Third-party and system packages |
| 181 |
|
AC_ARG_WITH(z, |
| 182 |
|
[ --with-z=DIR use zlib installation in DIR]) |
| 183 |
|
AC_ARG_WITH(z2, |
| 184 |
|
[ --without-z use internal copy of zlib]) |
| 185 |
|
AC_ARG_WITH(bz2, |
| 186 |
|
[ --with-bz2=DIR use bzlib installation in DIR]) |
| 187 |
|
AC_ARG_WITH(bz2b, |
| 188 |
|
[ --without-bz2 use internal copy of bzlib]) |
| 189 |
|
AC_ARG_WITH(lzo, |
| 190 |
|
[ --with-lzo=DIR use LZO installation in DIR (requires 2.x or up)]) |
| 191 |
|
AC_ARG_WITH(lzo_, |
| 192 |
|
[ --without-lzo do not use LZO]) |
| 193 |
|
AC_ARG_WITH(pcre, |
| 194 |
|
[ --with-pcre=DIR use PCRE installation in DIR]) |
| 195 |
|
AC_ARG_WITH(pcre2, |
| 196 |
|
[ --without-pcre use internal copy of PCRE]) |
| 197 |
|
AC_ARG_WITH(gnutls, |
| 198 |
|
[ --with-gnutls=DIR use GNUTLS installation in DIR]) |
| 199 |
|
AC_ARG_WITH(gnutls2, |
| 200 |
|
[ --without-gnutls do not use GNUTLS]) |
| 201 |
|
AC_ARG_WITH(openssl, |
| 202 |
|
[ --with-openssl=DIR use OpenSSL installation in DIR]) |
| 203 |
|
AC_ARG_WITH(openssl2, |
| 204 |
|
[ --without-openssl do not use OpenSSL]) |
| 205 |
AC_ARG_WITH(sybase, |
AC_ARG_WITH(sybase, |
| 206 |
[ --without-sybase do not use SYBASE libraries]) |
[ --without-sybase do not use SYBASE libraries]) |
| 207 |
AC_ARG_WITH(sybase-local, |
AC_ARG_WITH(sybase-local, |
| 212 |
[ --without-ftds do not use FreeTDS libraries]) |
[ --without-ftds do not use FreeTDS libraries]) |
| 213 |
AC_ARG_WITH(ftds2, |
AC_ARG_WITH(ftds2, |
| 214 |
[ --with-ftds=DIR use FreeTDS installation in DIR]) |
[ --with-ftds=DIR use FreeTDS installation in DIR]) |
| 215 |
|
AC_ARG_WITH(ftds-renamed, |
| 216 |
|
[ --without-ftds-renamed do not rename Sybase DBLIB symbols in built-in FTDS]) |
| 217 |
AC_ARG_WITH(mysql, |
AC_ARG_WITH(mysql, |
| 218 |
[ --without-mysql do not use MySQL]) |
[ --without-mysql do not use MySQL]) |
| 219 |
AC_ARG_WITH(mysql2, |
AC_ARG_WITH(mysql2, |
| 235 |
AC_ARG_WITH(glut2, |
AC_ARG_WITH(glut2, |
| 236 |
[ --with-glut=DIR use GLUT installation in DIR]) |
[ --with-glut=DIR use GLUT installation in DIR]) |
| 237 |
AC_ARG_WITH(wxwin, |
AC_ARG_WITH(wxwin, |
| 238 |
[ --without-wxwin do not use wxWindows]) |
[ --without-wxwin do not use wxWindows (2.4-)]) |
| 239 |
AC_ARG_WITH(wxwin2, |
AC_ARG_WITH(wxwin2, |
| 240 |
[ --with-wxwin=DIR use wxWindows installation in DIR]) |
[ --with-wxwin=DIR use wxWindows installation in DIR]) |
| 241 |
|
AC_ARG_WITH(wxwidgets, |
| 242 |
|
[ --without-wxwidgets do not use wxWidgets (2.6+)]) |
| 243 |
|
AC_ARG_WITH(wxwidgets2, |
| 244 |
|
[ --with-wxwidgets=DIR use wxWidgets installation in DIR]) |
| 245 |
|
AC_ARG_WITH(wxwidgets-ucs, |
| 246 |
|
[ --with-wxwidgets-ucs use Unicode builds of wxWidgets]) |
| 247 |
|
AC_ARG_WITH(wxwidgets-ucs2, |
| 248 |
|
[ --without-wxwidgets-ucs do not use Unicode builds of wxWidgets]) |
| 249 |
|
AC_ARG_WITH(freetype, |
| 250 |
|
[ --without-freetype do not use FreeType]) |
| 251 |
|
AC_ARG_WITH(freetype_, |
| 252 |
|
[ --with-freetype=DIR use FreeType installation in DIR]) |
| 253 |
AC_ARG_WITH(fastcgi, |
AC_ARG_WITH(fastcgi, |
| 254 |
[ --without-fastcgi do not use Fast-CGI library]) |
[ --without-fastcgi do not use Fast-CGI library]) |
| 255 |
AC_ARG_WITH(fastcgi2, |
AC_ARG_WITH(fastcgi2, |
| 270 |
[ --with-orbacus=DIR use ORBacus installation in DIR]) |
[ --with-orbacus=DIR use ORBacus installation in DIR]) |
| 271 |
AC_ARG_WITH(odbc, |
AC_ARG_WITH(odbc, |
| 272 |
[ --with-odbc=DIR use ODBC installation in DIR]) |
[ --with-odbc=DIR use ODBC installation in DIR]) |
| 273 |
AC_ARG_WITH(odbc2, |
AC_ARG_WITH(python, |
| 274 |
[ --without-odbc do not use ODBC]) |
[ --with-python=DIR use Python installation in DIR]) |
| 275 |
|
AC_ARG_WITH(python2, |
| 276 |
|
[ --without-python do not use Python]) |
| 277 |
|
AC_ARG_WITH(cppunit, |
| 278 |
|
[ --with-cppunit=DIR use CPPUNIT installation in DIR]) |
| 279 |
|
AC_ARG_WITH(cppunit2, |
| 280 |
|
[ --without-cppunit do not use CPPUNIT]) |
| 281 |
|
AC_ARG_WITH(boost, |
| 282 |
|
[ --with-boost=DIR use Boost installation in DIR]) |
| 283 |
|
AC_ARG_WITH(boost2, |
| 284 |
|
[ --without-boost do not use Boost]) |
| 285 |
|
AC_ARG_WITH(boost-tag, |
| 286 |
|
[ --with-boost-tag=TAG use TAG as the tag appended to Boost library names]) |
| 287 |
|
AC_ARG_WITH(boost-tag2, |
| 288 |
|
[ --without-boost-tag use untagged Boost library names]) |
| 289 |
|
AC_ARG_WITH(sqlite, |
| 290 |
|
[ --with-sqlite=DIR use SQLite (2.x) installation in DIR]) |
| 291 |
|
AC_ARG_WITH(sqlite2, |
| 292 |
|
[ --without-sqlite, do not use SQLite 2.x]) |
| 293 |
|
AC_ARG_WITH(sqlite3, |
| 294 |
|
[ --with-sqlite3=DIR use SQLite 3.x installation in DIR]) |
| 295 |
|
AC_ARG_WITH(sqlite3b, |
| 296 |
|
[ --without-sqlite3, do not use SQLite 3.x]) |
| 297 |
|
AC_ARG_WITH(icu, |
| 298 |
|
[ --with-icu=DIR use ICU installation in DIR]) |
| 299 |
|
AC_ARG_WITH(icu2, |
| 300 |
|
[ --without-icu, do not use ICU]) |
| 301 |
|
AC_ARG_WITH(expat, |
| 302 |
|
[ --with-expat=DIR use Expat installation in DIR]) |
| 303 |
|
AC_ARG_WITH(expat2, |
| 304 |
|
[ --without-expat, do not use Expat]) |
| 305 |
|
AC_ARG_WITH(sablot, |
| 306 |
|
[ --with-sablot=DIR use Sablotron installation in DIR]) |
| 307 |
|
AC_ARG_WITH(sablot2, |
| 308 |
|
[ --without-sablot, do not use Sablotron]) |
| 309 |
|
AC_ARG_WITH(libxml, |
| 310 |
|
[ --with-libxml=DIR use libxml2 installation in DIR]) |
| 311 |
|
AC_ARG_WITH(libxml_, |
| 312 |
|
[ --without-libxml do not use libxml2]) |
| 313 |
|
AC_ARG_WITH(libxslt, |
| 314 |
|
[ --with-libxslt=DIR use libxslt installation in DIR]) |
| 315 |
|
AC_ARG_WITH(libxslt2, |
| 316 |
|
[ --without-libxslt do not use libxstl]) |
| 317 |
|
AC_ARG_WITH(xerces, |
| 318 |
|
[ --with-xerces=DIR use Xerces-C++ installation in DIR]) |
| 319 |
|
AC_ARG_WITH(xerces2, |
| 320 |
|
[ --without-xerces, do not use Xerces-C++]) |
| 321 |
|
AC_ARG_WITH(xalan, |
| 322 |
|
[ --with-xalan=DIR use Xalan-C++ installation in DIR]) |
| 323 |
|
AC_ARG_WITH(xalan2, |
| 324 |
|
[ --without-xalan, do not use Xalan-C++]) |
| 325 |
|
AC_ARG_WITH(oechem, |
| 326 |
|
[ --with-oechem=DIR use OpenEye OEChem installation in DIR]) |
| 327 |
|
AC_ARG_WITH(oechem2, |
| 328 |
|
[ --without-oechem do not use OEChem]) |
| 329 |
|
AC_ARG_WITH(sge, |
| 330 |
|
[ --with-sge=DIR use Sun Grid Engine installation in DIR]) |
| 331 |
|
AC_ARG_WITH(sge2, |
| 332 |
|
[ --without-sge do not use Sun Grid Engine]) |
| 333 |
|
AC_ARG_WITH(muparser, |
| 334 |
|
[ --with-muparser=DIR use muParser installation in DIR]) |
| 335 |
|
AC_ARG_WITH(muparser2, |
| 336 |
|
[ --without-muparser do not use muParser]) |
| 337 |
|
AC_ARG_WITH(hdf5, |
| 338 |
|
[ --with-hdf5=DIR use HDF5 installation in DIR]) |
| 339 |
|
AC_ARG_WITH(hdf5b, |
| 340 |
|
[ --without-hdf5 do not use HDF5]) |
| 341 |
AC_ARG_WITH(gif, |
AC_ARG_WITH(gif, |
| 342 |
[ --with-gif=DIR use lib(un)gif installation in DIR]) |
[ --with-gif=DIR use lib(un)gif installation in DIR]) |
| 343 |
AC_ARG_WITH(gif2, |
AC_ARG_WITH(gif2, |
| 362 |
## Optional projects |
## Optional projects |
| 363 |
AC_ARG_WITH(local-lbsm, |
AC_ARG_WITH(local-lbsm, |
| 364 |
[ --without-local-lbsm turn off support for IPC with locally running LBSMD]) |
[ --without-local-lbsm turn off support for IPC with locally running LBSMD]) |
| 365 |
|
AC_ARG_WITH(ncbi-crypt, |
| 366 |
|
[ --without-ncbi-crypt use a dummy stubbed-out version of ncbi_crypt]) |
| 367 |
|
AC_ARG_WITH(connext, |
| 368 |
|
[ --without-connext do not build non-public CONNECT library extensions]) |
| 369 |
AC_ARG_WITH(serial, |
AC_ARG_WITH(serial, |
| 370 |
[ --without-serial do not build the serialization library and tools]) |
[ --without-serial do not build the serialization library and tools]) |
| 371 |
AC_ARG_WITH(objects, |
AC_ARG_WITH(objects, |
| 377 |
AC_ARG_WITH(ctools, |
AC_ARG_WITH(ctools, |
| 378 |
[ --without-ctools do not build NCBI C Toolkit based projects]) |
[ --without-ctools do not build NCBI C Toolkit based projects]) |
| 379 |
AC_ARG_WITH(gui, |
AC_ARG_WITH(gui, |
| 380 |
[ --without-gui do not build FLTK-based projects]) |
[ --without-gui do not build most graphical projects]) |
| 381 |
AC_ARG_WITH(algo, |
AC_ARG_WITH(algo, |
| 382 |
[ --without-algo do not build CPU-intensive algorithms]) |
[ --without-algo do not build CPU-intensive algorithms]) |
| 383 |
AC_ARG_WITH(internal, |
AC_ARG_WITH(internal, |
| 384 |
[ --without-internal do not build internal projects]) |
[ --without-internal do not build internal projects]) |
| 385 |
|
AC_ARG_WITH(gbench, |
| 386 |
|
[ --with-gbench ensure that Genome Workbench can be built]) |
| 387 |
|
AC_ARG_WITH(gbench2, |
| 388 |
|
[ --without-gbench do not build Genome Workbench]) |
| 389 |
|
|
| 390 |
## Manuals |
## Manuals |
| 391 |
AC_ARG_WITH(manuals, |
AC_ARG_WITH(manuals, |
| 394 |
|
|
| 395 |
#### Check the passed arguments against the list of available ones |
#### Check the passed arguments against the list of available ones |
| 396 |
x_with_list="\ |
x_with_list="\ |
| 397 |
debug optimization profiling dll static runpath mt 64 projects ncbi-public \ |
debug optimization profiling tcheck dll static static-exe plugin-auto-load \ |
| 398 |
exe autodep suffix hostspec execopy bincopy lib-rebuilds lib-rebuilds=ask \ |
bin-release mt 64 universal exe runpath lfs \ |
| 399 |
check static-exe strip version lfs \ |
autodep suffix hostspec version execopy bincopy lib-rebuilds lib-rebuilds=ask \ |
| 400 |
ncbi-c wxwin fastcgi sss sssdb sssutils geo sp pubmed sybase sybase-local \ |
deactivation makefile-auto-update projects flat-makefile configure-dialog \ |
| 401 |
sybase-new ftds mysql orbacus fltk opengl mesa glut bdb odbc \ |
check ncbi-public strip pch caution ccache distcc \ |
| 402 |
|
ncbi-c wxwin wxwidgets wxwidgets-ucs fastcgi sss sssdb sssutils included-sss \ |
| 403 |
|
geo included-geo \ |
| 404 |
|
z bz2 lzo pcre gnutls openssl sybase sybase-local sybase-new \ |
| 405 |
|
ftds mysql orbacus freetype fltk \ |
| 406 |
|
opengl mesa glut bdb python sqlite sqlite3 icu cppunit boost boost-tag \ |
| 407 |
|
sp expat sablot libxml libxslt xerces xalan oechem sge muparser hdf5 \ |
| 408 |
gif jpeg tiff png xpm \ |
gif jpeg tiff png xpm \ |
| 409 |
local-lbsm serial objects dbapi app ctools gui algo internal" |
local-lbsm ncbi-crypt connext \ |
| 410 |
|
serial objects dbapi app ctools gui algo internal gbench" |
| 411 |
|
|
| 412 |
changequote(, )dnl |
changequote(, )dnl |
| 413 |
x_with_list=`echo "$x_with_list" | sed 's/\([^ ][^ ]*\)/--with-\1 --without-\1/g'` |
x_with_list=`echo "$x_with_list" | sed 's/\([^ ][^ ]*\)/--with-\1 --without-\1/g'` |
| 431 |
fi |
fi |
| 432 |
|
|
| 433 |
case "$x_arg" in |
case "$x_arg" in |
| 434 |
--with-extra-action= | --exec-prefix= | --with-projects= \ |
--with-extra-action= | --exec-prefix= | --with-projects= | --srcdir= \ |
| 435 |
| --cache-file= | --build= | --host= | --target= | --with-runpath= ) |
| --cache-file= | --build= | --host= | --target= | --with-runpath= \ |
| 436 |
AC_MSG_ERROR([" $x_arg: requires value; use --help to show usage"]) |
| --x-includes= | --x-libraries= ) |
| 437 |
|
AC_MSG_ERROR([$x_arg: requires value; use --help to show usage]) |
| 438 |
;; |
;; |
| 439 |
|
|
| 440 |
--with-extra-action=* | --with-build-root=* \ |
--with-extra-action=* | --with-build-root=* | --with-build-root-sfx=* \ |
| 441 |
| --with-projects=* | --with-check=* \ |
| --with-fake-root=* | --with-saved-settings=* \ |
| 442 |
|
| --with-projects=* | --with-check=* | --with-check-tools=* \ |
| 443 |
|
| --with-universal=* | --with-tcheck=* \ |
| 444 |
| --cache-file=* | --build=* | --host=* | --prefix=* | --exec-prefix=* \ |
| --cache-file=* | --build=* | --host=* | --prefix=* | --exec-prefix=* \ |
| 445 |
| --libdir=* | --bindir=* | --includedir=* \ |
| --libdir=* | --bindir=* | --includedir=* | --srcdir=* \ |
| 446 |
| [[A-Z]*=*] \ |
| [[A-Z]*=*] \ |
| 447 |
| --with-sybase-local=* | --with-wxwin=* | --with-orbacus=* \ |
| --with-z=* | --with-bz2=* | --with-lzo=* \ |
| 448 |
|
| --with-pcre=* \ |
| 449 |
|
| --with-gnutls=* | --with-openssl=* \ |
| 450 |
|
| --with-sybase-local=* | --with-wxwin=* | --with-wxwidgets=* \ |
| 451 |
| --with-ftds=* | --with-mysql=* | --with-fltk=* | --with-fastcgi=* \ |
| --with-ftds=* | --with-mysql=* | --with-fltk=* | --with-fastcgi=* \ |
| 452 |
| --with-bdb=* | --with-odbc=* | --with-gif=* | --with-jpeg=* \ |
| --with-sqlite=* | --with-sqlite3=* | --with-expat=* | --with-sablot=* \ |
| 453 |
|
| --with-icu=* | --with-xerces=* | --with-xalan=* \ |
| 454 |
|
| --with-libxml=* | --with-libxslt=* \ |
| 455 |
|
| --with-bdb=* | --with-odbc | --with-odbc=* \ |
| 456 |
|
| --with-python=* | --with-freetype=* | --with-gif=* | --with-jpeg=* \ |
| 457 |
| --with-png=* | --with-tiff=* | --with-xpm=* | --with-opengl=* \ |
| --with-png=* | --with-tiff=* | --with-xpm=* | --with-opengl=* \ |
| 458 |
| --with-mesa=* | --with-glut=* \ |
| --with-mesa=* | --with-glut=* | --with-oechem=* | --with-cppunit=* \ |
| 459 |
|
| --with-boost=* | --with-boost-tag=* | --with-orbacus=* | --with-sge=* \ |
| 460 |
|
| --with-muparser=* | --with-hdf5=* \ |
| 461 |
|
| --x-includes=* | --x-libraries=* \ |
| 462 |
| --target=* | --with-runpath=* | --no-create | --no-recursion) |
| --target=* | --with-runpath=* | --no-create | --no-recursion) |
| 463 |
;; |
;; |
| 464 |
|
|
| 465 |
* ) |
* ) |
| 466 |
AC_MSG_ERROR([" $x_arg: unknown option; use --help to show usage"]) |
AC_MSG_ERROR([$x_arg: unknown option; use --help to show usage]) |
| 467 |
;; |
;; |
| 468 |
esac |
esac |
| 469 |
done |
done |
| 470 |
|
|
| 471 |
|
|
| 472 |
|
if test "$with_gbench" = "yes" ; then |
| 473 |
|
m4_foreach(OPT, [dll,mt,gui,exe,dbapi,serial,objects,algo,app], |
| 474 |
|
[if test "$[with_]OPT" = "no"; then |
| 475 |
|
AC_MSG_ERROR([incompatible options: --without-]OPT[ but --with-gbench]) |
| 476 |
|
else |
| 477 |
|
[with_]OPT=yes |
| 478 |
|
fi |
| 479 |
|
]) |
| 480 |
|
: ${with_projects=scripts/projects/ncbi_gbench.lst} |
| 481 |
|
fi |
| 482 |
|
|
| 483 |
|
if test "$with_bin_release" = "yes" ; then |
| 484 |
|
# Default some other options accordingly |
| 485 |
|
: ${with_ncbi_public=yes} |
| 486 |
|
: ${with_dll=no} |
| 487 |
|
: ${with_local_lbsm=no} |
| 488 |
|
: ${with_ncbi_crypt=no} |
| 489 |
|
: ${with_connext=no} |
| 490 |
|
AC_DEFINE(NCBI_BIN_RELEASE, 1, |
| 491 |
|
[Define to 1 when building binaries for public release.]) |
| 492 |
|
fi |
| 493 |
|
|
| 494 |
|
|
| 495 |
#### Check for special options |
#### Check for special options |
| 496 |
if test "$with_extra_action" = "yes" ; then |
if test "$with_extra_action" = "yes" ; then |
| 497 |
AC_MSG_ERROR(["--with-extra-action must have a value after ="]) |
AC_MSG_ERROR([--with-extra-action must have a value after =]) |
| 498 |
fi |
fi |
| 499 |
if test "$with_extra_action" = "no" ; then |
if test "$with_extra_action" = "no" ; then |
| 500 |
AC_MSG_ERROR(["--without-extra-action is not allowed"]) |
AC_MSG_ERROR([--without-extra-action is not allowed]) |
| 501 |
|
fi |
| 502 |
|
|
| 503 |
|
case "$with_projects" in |
| 504 |
|
"") if test -r projects; then |
| 505 |
|
AC_MSG_NOTICE([using default projects file "projects".]) |
| 506 |
|
with_projects=projects |
| 507 |
|
AC_SUBST(PROJECTS, "\$(top_srcdir)/projects") |
| 508 |
|
else |
| 509 |
|
AC_SUBST(PROJECTS, "") |
| 510 |
|
if test -f projects; then |
| 511 |
|
AC_MSG_WARN([default projects file "projects" is unreadable.]) |
| 512 |
|
elif test -h projects; then |
| 513 |
|
AC_MSG_WARN([default projects file "projects" is a dangling link.]) |
| 514 |
|
fi |
| 515 |
fi |
fi |
| 516 |
|
;; |
| 517 |
|
no) with_projects="" ; AC_SUBST(PROJECTS, "") ;; |
| 518 |
|
/*) AC_SUBST(PROJECTS, $with_projects) ;; |
| 519 |
|
* ) AC_SUBST(PROJECTS, "\$(top_srcdir)/$with_projects") ;; |
| 520 |
|
esac |
| 521 |
|
|
| 522 |
|
|
| 523 |
#### Always define this |
#### Always define this |
| 525 |
|
|
| 526 |
|
|
| 527 |
#### Get the running host's properties |
#### Get the running host's properties |
| 528 |
|
AC_CONFIG_AUX_DIR(src/build-system) |
| 529 |
AC_CANONICAL_HOST |
AC_CANONICAL_HOST |
| 530 |
AC_DEFINE_UNQUOTED(HOST, "$host", [Full GNU-style system type]) |
AC_DEFINE_UNQUOTED(HOST, "$host", [Full GNU-style system type]) |
| 531 |
AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu", [CPU type only]) |
AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu", [CPU type only]) |
| 544 |
|
|
| 545 |
|
|
| 546 |
#### Detect Insure++, and attempt to find the real compiler. |
#### Detect Insure++, and attempt to find the real compiler. |
| 547 |
case "$CC" in |
case "$CXX" in |
| 548 |
insure* | */insure*) |
insure* | */insure*) |
| 549 |
psrcdump=`echo "$CC" | sed -e 's/insure.*/psrcdump/'` |
psrcdump=`echo "$CXX" | sed -e 's/insure.*/psrcdump/'` |
| 550 |
real_CC=`$psrcdump -t insure++ | sed -ne 's/^Compiler \(.*\)/\1/p'` |
real_CXX=`$psrcdump -t insure++ | sed -ne 's/^Compiler \(.*\)/\1/p'` |
| 551 |
real_dir=`$psrcdump -t insure++ | sed -ne 's/^Compilerinstalldir \(.*\)/\1/p'` |
real_dir=`$psrcdump -t insure++ | sed -ne 's/^Compilerinstalldir \(.*\)/\1/p'` |
| 552 |
test -n "$real_dir" && test -x "$real_dir/$real_CC" && \ |
test -n "$real_dir" && test -x "$real_dir/$real_CXX" && \ |
| 553 |
real_CC="$real_dir/$real_CC" |
real_CXX="$real_dir/$real_CXX" |
| 554 |
case "$real_CC" in |
case "$real_CXX" in |
| 555 |
*gcc* ) LIBS="$LIBS -lstdc++" |
*gcc* ) LIBS="$LIBS -lstdc++" |
| 556 |
esac |
esac |
| 557 |
;; |
;; |
| 558 |
*) |
*) |
| 559 |
real_CC=$CC |
real_CXX=$CXX |
| 560 |
;; |
;; |
| 561 |
esac |
esac |
| 562 |
|
|
| 564 |
#### Detect KCC compiler |
#### Detect KCC compiler |
| 565 |
if test "$GCC" != "yes" ; then |
if test "$GCC" != "yes" ; then |
| 566 |
touch kcc_test.cpp |
touch kcc_test.cpp |
| 567 |
kcc_ver="`$real_CC -V -c kcc_test.cpp 2>&1 | grep '^KAI '`" |
kcc_ver="`$real_CXX -V -c kcc_test.cpp 2>&1 | grep '^KAI '`" |
| 568 |
kcc_license="`$real_CC -V -c kcc_test.cpp 2>&1 | grep -v '^KAI '`" |
kcc_license="`$real_CXX -V -c kcc_test.cpp 2>&1 | grep -v '^KAI '`" |
| 569 |
rm -f kcc_test.cpp kcc_test.o |
rm -f kcc_test.cpp kcc_test.o |
| 570 |
case "$kcc_ver" in |
case "$kcc_ver" in |
| 571 |
KAI* ) KCC="yes" ;; |
KAI* ) KCC="yes" ;; |
| 573 |
fi |
fi |
| 574 |
|
|
| 575 |
|
|
| 576 |
#### Detect ICC compiler |
#### Detect ICC compiler (newer versions of which configure can mis-ID as GCC) |
| 577 |
if test "$GCC" != "yes" -a "$KCC" != "yes"; then |
if test "$KCC" != "yes"; then |
| 578 |
icc_ver="`$real_CC -V 2>&1 | grep '^Intel(R) C++ Compiler'`" |
icc_ver="`$real_CXX -V 2>&1 | grep '^Intel(R) C'`" |
| 579 |
icc_license="`$real_CC -c 2>&1 | grep '^icc: NOTE: The evaluation period for this product ends on '`" |
icc_license="`$real_CXX -c 2>&1 | grep '^icc: NOTE: The evaluation period for this product ends on '`" |
| 580 |
case "$icc_ver" in |
case "$icc_ver" in |
| 581 |
Intel*C*Compiler* ) ICC="yes" ;; |
Intel*C*Compiler* ) ICC="yes"; GCC="no" ;; |
| 582 |
esac |
esac |
| 583 |
fi |
fi |
| 584 |
|
|
| 585 |
|
|
| 586 |
#### Detect IBM VisualAge compiler |
#### Detect IBM VisualAge compiler |
| 587 |
if test "$GCC" != "yes" -a "$KCC" != "yes" -a "$ICC" != "yes"; then |
if test "$GCC" != "yes" -a "$KCC" != "yes" -a "$ICC" != "yes"; then |
| 588 |
# Crude, but there doesn't seem to be a better alternative |
vac_ver="`$real_CXX -qversion 2>&1`" |
|
vac_ver="`$real_CC 2>&1 | grep 'AIX Compiler.*Version'`" |
|
| 589 |
case "$vac_ver" in |
case "$vac_ver" in |
| 590 |
*AIX* ) VAC="yes" ;; |
*AIX* ) VAC="yes" ;; |
| 591 |
esac |
esac |
| 595 |
#### Detect Compaq compiler |
#### Detect Compaq compiler |
| 596 |
if test "$GCC" != "yes" -a "$KCC" != "yes" -a "$ICC" != "yes" \ |
if test "$GCC" != "yes" -a "$KCC" != "yes" -a "$ICC" != "yes" \ |
| 597 |
-a "$VAC" != "yes"; then |
-a "$VAC" != "yes"; then |
| 598 |
# Must use CXX rather than real_CC to ensure correct version number. |
ccc_ver="`$real_CXX -V 2>&1 | grep '^Compaq C++ V'`" |
|
ccc_ver="`$CXX -V 2>&1 | grep '^Compaq C++ V'`" |
|
| 599 |
case "$ccc_ver" in |
case "$ccc_ver" in |
| 600 |
*Compaq* ) CCC="yes" ;; |
*Compaq* ) CCC="yes" ;; |
| 601 |
esac |
esac |
| 603 |
|
|
| 604 |
|
|
| 605 |
#### Detect supported compilers |
#### Detect supported compilers |
|
changequote(, )dnl |
|
| 606 |
compiler= |
compiler= |
| 607 |
compiler_ver= |
compiler_ver= |
| 608 |
ncbi_compiler="UNKNOWN" |
ncbi_compiler="UNKNOWN" |
| 609 |
ncbi_compiler_ver="0" |
ncbi_compiler_ver="0" |
| 610 |
|
|
| 611 |
if test "$GCC" = "yes" ; then |
if test "$GCC" = "yes" ; then |
| 612 |
compiler_ver="`$real_CC -dumpversion 2>&1`" |
compiler_ver="`$real_CXX -dumpversion 2>&1`" |
| 613 |
case "$compiler_ver" in |
case "$compiler_ver" in |
| 614 |
2.95* | 2.96* | 3.* ) |
2.95* | 2.96* | 3.* | 4.* ) |
| 615 |
compiler="GCC" |
compiler="GCC" |
| 616 |
ncbi_compiler="GCC" |
ncbi_compiler="GCC" |
| 617 |
ncbi_compiler_ver="$compiler_ver" ;; |
ncbi_compiler_ver="$compiler_ver" |
| 618 |
|
NCBI_FEATURE(GCC) |
| 619 |
|
;; |
| 620 |
esac |
esac |
| 621 |
elif test "$KCC" = "yes" ; then |
elif test "$KCC" = "yes" ; then |
| 622 |
compiler_ver="$kcc_ver" |
compiler_ver="$kcc_ver" |
| 623 |
compiler="KCC" |
compiler="KCC" |
| 624 |
ncbi_compiler="KCC" |
ncbi_compiler="KCC" |
| 625 |
ncbi_compiler_ver="`echo $kcc_ver | sed 's%^KAI .*C[+][+] \([0-9.]*\).*%\1%'`" |
ncbi_compiler_ver="`echo $kcc_ver | sed 's%^KAI .*C[[+]][[+]] \([[0-9.]]*\).*%\1%'`" |
| 626 |
|
NCBI_FEATURE(KCC) |
| 627 |
elif test "$ICC" = "yes" ; then |
elif test "$ICC" = "yes" ; then |
| 628 |
compiler_ver="$icc_ver" |
compiler_ver="$icc_ver" |
| 629 |
compiler="ICC" |
compiler="ICC" |
| 630 |
ncbi_compiler="ICC" |
ncbi_compiler="ICC" |
| 631 |
ncbi_compiler_ver="`echo $icc_ver | sed 's%.*Version \([0-9.]*\).*%\1%'`" |
ncbi_compiler_ver="`echo $icc_ver | sed 's%.*Version \([[0-9.]]*\).*%\1%'`" |
| 632 |
|
NCBI_FEATURE(ICC) |
| 633 |
elif test "$VAC" = "yes" ; then |
elif test "$VAC" = "yes" ; then |
| 634 |
compiler_ver="$vac_ver" |
compiler_ver="$vac_ver" |
| 635 |
compiler="VisualAge" |
compiler="VisualAge" |
| 636 |
ncbi_compiler="VISUALAGE" |
ncbi_compiler="VISUALAGE" |
| 637 |
ncbi_compiler_ver="`echo $vac_ver | sed 's%.*Version \([0-9.]*\).*%\1%'`" |
ncbi_compiler_ver="`echo $vac_ver | sed 's%.*[[Vv]]ersion:* 0*\([[0-9.]]*\).*%\1%'`" |
| 638 |
|
NCBI_FEATURE(VisualAge) |
| 639 |
elif test "$CCC" = "yes" ; then |
elif test "$CCC" = "yes" ; then |
| 640 |
compiler_ver="$ccc_ver" |
compiler_ver="$ccc_ver" |
| 641 |
compiler=Compaq |
compiler=Compaq |
| 642 |
ncbi_compiler="COMPAQ" |
ncbi_compiler="COMPAQ" |
| 643 |
ncbi_compiler_ver="`echo $ccc_ver | sed 's%.*C[+][+] V\([0-9.]*\).*%\1%'`" |
ncbi_compiler_ver="`echo $ccc_ver | sed 's%.*C[[+]][[+]] V\([[0-9.]]*\).*%\1%'`" |
| 644 |
|
NCBI_FEATURE(CompaqCompiler) |
| 645 |
else |
else |
| 646 |
case "$host_os" in |
case "$host_os" in |
| 647 |
solaris* ) |
solaris* ) |
| 648 |
compiler_ver="`$real_CC -V 2>&1`" |
compiler_ver="`$real_CXX -V 2>&1`" |
| 649 |
case "$compiler_ver" in |
case "$compiler_ver" in |
| 650 |
*WorkShop*Compilers*5\.0 ) |
*WorkShop*Compilers*5\.0 ) |
| 651 |
compiler="WorkShop5" |
compiler="WorkShop5" |
| 667 |
compiler="WorkShop54" |
compiler="WorkShop54" |
| 668 |
ncbi_compiler="WORKSHOP" |
ncbi_compiler="WORKSHOP" |
| 669 |
ncbi_compiler_ver="5.4" ;; |
ncbi_compiler_ver="5.4" ;; |
| 670 |
esac ;; |
*Sun*C*5\.5* ) |
| 671 |
|
compiler="WorkShop55" |
| 672 |
|
ncbi_compiler="WORKSHOP" |
| 673 |
|
ncbi_compiler_ver="5.5" ;; |
| 674 |
|
*Sun*C*5\.8* ) |
| 675 |
|
compiler="WorkShop58" |
| 676 |
|
ncbi_compiler="WORKSHOP" |
| 677 |
|
ncbi_compiler_ver="5.8" ;; |
| 678 |
|
*Sun*C*5\.9* ) |
| 679 |
|
compiler="WorkShop59" |
| 680 |
|
ncbi_compiler="WORKSHOP" |
| 681 |
|
ncbi_compiler_ver="5.9" ;; |
| 682 |
|
*Sun*C*5\.10* ) |
| 683 |
|
compiler="WorkShop510" |
| 684 |
|
ncbi_compiler="WORKSHOP" |
| 685 |
|
ncbi_compiler_ver="5.10" ;; |
| 686 |
|
esac |
| 687 |
|
NCBI_FEATURE(WorkShop) |
| 688 |
|
;; |
| 689 |
|
|
| 690 |
irix* ) |
irix* ) |
| 691 |
compiler_ver="`$real_CC -version 2>&1`" |
compiler_ver="`$real_CXX -version 2>&1`" |
| 692 |
case "$compiler_ver" in |
case "$compiler_ver" in |
| 693 |
MIPSpro*Compilers:*Version*7\.3* ) |
MIPSpro*Compilers:*Version*7\.3* ) |
| 694 |
compiler="MIPSpro73" |
compiler="MIPSpro73" |
| 695 |
ncbi_compiler="MIPSPRO" |
ncbi_compiler="MIPSPRO" |
| 696 |
ncbi_compiler_ver="7.3" ;; |
ncbi_compiler_ver="7.3" |
| 697 |
esac ;; |
NCBI_FEATURE(MIPSpro) |
| 698 |
|
;; |
| 699 |
|
esac |
| 700 |
|
;; |
| 701 |
|
|
| 702 |
cygwin* ) |
cygwin* ) |
| 703 |
case "$real_CC" in |
case "$real_CXX" in |
| 704 |
*cl\.exe* | cl) |
*cl\.exe* | cl) |
| 705 |
compiler="MSVC" |
compiler="MSVC" |
| 706 |
ncbi_compiler="MSVC" |
ncbi_compiler="MSVC" |
| 707 |
ncbi_compiler_ver="6.0" ;; |
ncbi_compiler_ver="6.0" |
| 708 |
esac ;; |
NCBI_FEATURE(MSVC) |
| 709 |
|
;; |
| 710 |
|
esac |
| 711 |
|
;; |
| 712 |
esac |
esac |
| 713 |
fi |
fi |
| 714 |
|
|
| 715 |
ncbi_compiler_ver="`echo $ncbi_compiler_ver | sed 's%\([0-9]\)\.\([0-9]\)\.\([0-9]\).*%\1\2\3%; s%\([0-9]\)\.\([0-9][0-9]*\).*%\1\2%; s%^\([0-9][0-9]\)$%\10%; s%^\([0-9]\)$%\100%'`" |
changequote(, )dnl |
| 716 |
compiler_version=$ncbi_compiler_ver |
#ncbi_compiler_ver="`echo $ncbi_compiler_ver | sed 's%\([0-9]\)\.\([0-9]\)\.\([0-9]\).*%\1\2\3%; s%\([0-9]\)\.\([0-9][0-9]*\).*%\1\2%; s%^\([0-9][0-9]\)$%\10%; s%^\([0-9]\)$%\100%'`" |
| 717 |
|
case "$compiler:$ncbi_compiler_ver" in |
| 718 |
|
WorkShop*:?.?? ) ncbi_compiler_sed='s/\([0-9]\)\.\([0-9][0-9]\)/\1\20/' ;; |
| 719 |
|
WorkShop*:[6-9].?) ncbi_compiler_sed='s/\([0-9]\)\.\([0-9\)/\10\20/' ;; |
| 720 |
|
ICC:??.? ) ncbi_compiler_sed='s/\([0-9][0-9]\)\.\([0-9]\)/\1\20/' ;; |
| 721 |
|
*:?.?.?) ncbi_compiler_sed='s/\([0-9]\)\.\([0-9]\)\.\([0-9]\)/\1\2\3/' ;; |
| 722 |
|
*:?.??*) ncbi_compiler_sed='s/\([0-9]\)\.\([0-9][0-9]\).*/\1\2/' ;; |
| 723 |
|
*:?.?) ncbi_compiler_sed='s/\([0-9]\).\([0-9]\)/\1\20/' ;; |
| 724 |
|
*:?) ncbi_compiler_sed='s/\([0-9]\)/\100/' ;; |
| 725 |
|
esac |
| 726 |
changequote([, ])dnl |
changequote([, ])dnl |
| 727 |
|
ncbi_compiler_ver=`echo $ncbi_compiler_ver | sed "$ncbi_compiler_sed"` |
| 728 |
|
compiler_version=$ncbi_compiler_ver |
| 729 |
|
|
| 730 |
# Possible values of NCBI_COMPILER_$ncbi_compiler, since acconfig.h is obsolete |
# Possible values of NCBI_COMPILER_$ncbi_compiler, since acconfig.h is obsolete |
| 731 |
if false; then |
if false; then |
| 740 |
AC_DEFINE(NCBI_COMPILER_UNKNOWN, 1, [Compiler name]) |
AC_DEFINE(NCBI_COMPILER_UNKNOWN, 1, [Compiler name]) |
| 741 |
fi |
fi |
| 742 |
|
|
| 743 |
|
AC_DEFINE_UNQUOTED(NCBI_COMPILER, "$ncbi_compiler", [Compiler name]) |
| 744 |
AC_DEFINE_UNQUOTED(NCBI_COMPILER_$ncbi_compiler, 1, [Compiler name]) |
AC_DEFINE_UNQUOTED(NCBI_COMPILER_$ncbi_compiler, 1, [Compiler name]) |
| 745 |
AC_DEFINE_UNQUOTED(NCBI_COMPILER_VERSION, $ncbi_compiler_ver, |
AC_DEFINE_UNQUOTED(NCBI_COMPILER_VERSION, $ncbi_compiler_ver, |
| 746 |
[Compiler version as three-digit integer]) |
[Compiler version as three-digit integer]) |
| 753 |
echo |
echo |
| 754 |
echo "Compiler \"${compiler}\" requires a special tuning, so you" |
echo "Compiler \"${compiler}\" requires a special tuning, so you" |
| 755 |
echo "better use a special shell script located in \"compilers/*.sh\"!" |
echo "better use a special shell script located in \"compilers/*.sh\"!" |
| 756 |
changequote(, )dnl |
NCBI_CAUTION([Do you still want to proceed (at your own risk)?]) |
|
echo "Do you still want to proceed (at your own risk)? [n/y]" |
|
|
changequote([, ])dnl |
|
|
read answer |
|
|
case "$answer" in |
|
|
y ) AC_MSG_WARN([Proceeding at your own risk...]) ; echo ;; |
|
|
* ) AC_MSG_WARN([Configuration has been canceled by user.]) ; exit 1;; |
|
|
esac |
|
| 757 |
echo |
echo |
| 758 |
fi ;; |
fi ;; |
| 759 |
esac |
esac |
| 791 |
x_CXX= |
x_CXX= |
| 792 |
|
|
| 793 |
if test "$with_static_exe" = "yes"; then |
if test "$with_static_exe" = "yes"; then |
| 794 |
C_LINK='$(top_srcdir)/scripts/favor-static $(CC)' |
C_LINK='$(top_srcdir)/scripts/common/impl/favor-static $(CC)' |
| 795 |
LINK='$(top_srcdir)/scripts/favor-static $(CXX)' |
LINK='$(top_srcdir)/scripts/common/impl/favor-static $(CXX)' |
| 796 |
else |
else |
| 797 |
C_LINK='$(CC)' |
C_LINK='$(CC)' |
| 798 |
LINK='$(CXX)' |
LINK='$(CXX)' |
| 809 |
with_mt=${with_mt:="no"} |
with_mt=${with_mt:="no"} |
| 810 |
if test "$with_mt" = "yes" ; then |
if test "$with_mt" = "yes" ; then |
| 811 |
case "$host_os:$compiler" in |
case "$host_os:$compiler" in |
| 812 |
solaris*:WorkShop* ) MT_FLAG=${MT_FLAG:="-mt"} ;; |
darwin* | irix* | cygwin*) ;; |
| 813 |
*:KCC ) MT_FLAG=${MT_FLAG:="--thread_safe"} ;; |
solaris*:WorkShop* ) : ${MT_FLAG:="-mt"} ;; |
| 814 |
*:Compaq | freebsd*:GCC ) MT_FLAG=${MT_FLAG:="-pthread"} ;; |
solaris*:GCC ) : ${MT_FLAG:="-pthreads"} ;; |
| 815 |
*:GCC | *:ICC | irix*:MIPSpro73 ) ;; |
*:KCC ) : ${MT_FLAG:="--thread_safe"} ;; |
| 816 |
* ) AC_MSG_ERROR(["Do not know how to build MT-safe with compiler $CXX $compiler_ver"]) ;; |
*:Compaq | *:GCC | *:ICC ) : ${MT_FLAG:="-pthread"} ;; |
| 817 |
|
*:VisualAge ) : ${MT_FLAG:="-qthreaded"} ;; |
| 818 |
|
* ) AC_MSG_ERROR([Do not know how to build MT-safe with compiler $CXX $compiler_ver]) ;; |
| 819 |
esac |
esac |
| 820 |
CPPFLAGS="$CPPFLAGS -D_MT -D_REENTRANT -D_THREAD_SAFE" |
CPPFLAGS="$CPPFLAGS -D_MT -D_REENTRANT -D_THREAD_SAFE" |
| 821 |
case "$host_os" in |
case "$host_os:$compiler" in |
| 822 |
solaris* ) THREAD_LIBS=${THREAD_LIBS:="-lpthread -lposix4"} ;; |
solaris2.10:GCC ) : ${THREAD_LIBS:="-lposix4"} ;; |
| 823 |
|
solaris* ) : ${THREAD_LIBS:="-lpthread -lposix4"} ;; |
| 824 |
freebsd* ) ;; # -pthread already substitutes libc_r for libc |
freebsd* ) ;; # -pthread already substitutes libc_r for libc |
| 825 |
* ) THREAD_LIBS=${THREAD_LIBS:="-lpthread"} ;; |
* ) : ${THREAD_LIBS:="-lpthread"} ;; |
| 826 |
esac |
esac |
| 827 |
LIBS="$LIBS $THREAD_LIBS" |
LIBS="$LIBS $THREAD_LIBS" |
| 828 |
|
case "$host_os:$compiler" in |
| 829 |
|
solaris2.??:* | solaris*:GCC | *:Compaq | irix* | aix* | darwin* | cygwin*) |
| 830 |
|
NCBIATOMIC_LIB= |
| 831 |
|
;; |
| 832 |
|
*:GCC | *:ICC | linux*:KCC ) |
| 833 |
|
case "$host_cpu" in |
| 834 |
|
i?86 | powerpc* | ppc* | x86_64 | sparc* ) NCBIATOMIC_LIB= ;; |
| 835 |
|
* ) NCBIATOMIC_LIB=xncbi ;; |
| 836 |
|
esac |
| 837 |
|
;; |
| 838 |
|
*:WorkShop* | solaris*:KCC ) |
| 839 |
|
NCBIATOMIC_LIB=xncbi |
| 840 |
|
ncbicntr="ncbicntr_workshop ncbiatomic_workshop" |
| 841 |
|
;; |
| 842 |
|
* ) NCBIATOMIC_LIB=xncbi ;; |
| 843 |
|
esac |
| 844 |
mt_sfx="MT" |
mt_sfx="MT" |
| 845 |
WithFeatures="$WithFeatures MT" |
NCBI_FEATURE(MT) |
| 846 |
else |
else |
| 847 |
|
CPPFLAGS="$CPPFLAGS -DNCBI_WITHOUT_MT" |
| 848 |
MT_FLAG= |
MT_FLAG= |
| 849 |
THREAD_LIBS= |
THREAD_LIBS= |
| 850 |
|
NCBIATOMIC_LIB= |
| 851 |
mt_sfx="" |
mt_sfx="" |
| 852 |
fi |
fi |
| 853 |
MT_SFX="${mt_sfx}" |
MT_SFX="${mt_sfx}" |
| 857 |
CXXFLAGS="$MT_FLAG $CXXFLAGS" |
CXXFLAGS="$MT_FLAG $CXXFLAGS" |
| 858 |
LDFLAGS="$MT_FLAG $LDFLAGS" |
LDFLAGS="$MT_FLAG $LDFLAGS" |
| 859 |
|
|
| 860 |
|
APP_LDFLAGS= |
| 861 |
|
DLL_LDFLAGS= |
| 862 |
|
|
| 863 |
|
case "$compiler" in |
| 864 |
|
GCC | ICC ) |
| 865 |
|
AC_CACHE_CHECK([whether $CC supports -Wl,-E], ncbi_cv_prog_cc_wl_e, |
| 866 |
|
[orig_LDFLAGS=$LDFLAGS |
| 867 |
|
LDFLAGS="-Wl,-E $LDFLAGS" |
| 868 |
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], |
| 869 |
|
[ncbi_cv_prog_cc_wl_e=yes], [ncbi_cv_prog_cc_wl_e=no]) |
| 870 |
|
LDFLAGS=$orig_LDFLAGS]) |
| 871 |
|
test "$ncbi_cv_prog_cc_wl_e" = no || APP_LDFLAGS="-Wl,-E $APP_LDFLAGS" |
| 872 |
|
;; |
| 873 |
|
esac |
| 874 |
|
|
| 875 |
#### Provide default environment setup for known platforms/compilers |
#### Provide default environment setup for known platforms/compilers |
| 876 |
DEPFLAGS="-M" |
DEPFLAGS="-M" |
| 882 |
;; |
;; |
| 883 |
|
|
| 884 |
solaris*:GCC ) |
solaris*:GCC ) |
| 885 |
|
CPPFLAGS="-D_XOPEN_SOURCE=500 $CPPFLAGS" |
| 886 |
STRIP="@:" |
STRIP="@:" |
| 887 |
;; |
;; |
| 888 |
|
|
|
linux*:GCC ) |
|
|
LDFLAGS="-Wl,-E $LDFLAGS" |
|
|
# May be needed for pthread_{set,get}concurrency |
|
|
CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS" |
|
|
;; |
|
|
|
|
| 889 |
linux*:ICC ) |
linux*:ICC ) |
| 890 |
# "incomplete type is not allowed" should be an error, not a warning! |
# "incomplete type is not allowed" should be an error, not a warning! |
| 891 |
CFLAGS="-we70 $CFLAGS" |
CFLAGS="-we70 $CFLAGS" |
| 892 |
CXXFLAGS="-we70 $CXXFLAGS" |
CXXFLAGS="-we70 $CXXFLAGS" |
|
# May be needed for pthread_{set,get}concurrency |
|
|
CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS" |
|
|
;; |
|
|
|
|
|
linux*) |
|
|
# May be needed for pthread_{set,get}concurrency |
|
|
CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS" |
|
|
;; |
|
|
|
|
|
osf*:GCC ) |
|
| 893 |
;; |
;; |
| 894 |
|
|
| 895 |
irix*:GCC ) |
irix*:GCC ) |
| 899 |
;; |
;; |
| 900 |
|
|
| 901 |
solaris*:WorkShop* ) |
solaris*:WorkShop* ) |
| 902 |
|
CPPFLAGS="-D__EXTENSIONS__ $CPPFLAGS" |
| 903 |
CXXFLAGS="+w +w2 $CXXFLAGS" |
CXXFLAGS="+w +w2 $CXXFLAGS" |
| 904 |
DEPFLAGS="-xM1" |
DEPFLAGS="-xM1" |
| 905 |
LDFLAGS="-xildoff $LDFLAGS" |
LDFLAGS="-xildoff $LDFLAGS" |
| 906 |
AR=${AR:="$CXX $MT_FLAG -xar -o"} |
AR=${AR:="$CXX $MT_FLAG -xar -o"} |
| 907 |
STRIP="@:" |
STRIP="@:" |
| 908 |
if test "$with_debug" = "no" -a "$with_profiling" != "yes" ; then |
if test "$with_debug" = "no" -a "$with_profiling" != "yes" \ |
| 909 |
|
-a "$with_strip" = "yes" ; then |
| 910 |
LDFLAGS="-s $LDFLAGS" |
LDFLAGS="-s $LDFLAGS" |
| 911 |
fi |
fi |
| 912 |
RANLIB=":" |
# Recent versions default to DWARF, yielding much larger executables in |
| 913 |
CXX_FILTER="2>&1 | \$(top_srcdir)/compilers/cxx_filter.$compiler.sh" |
# debug configurations; insist on STABS when the choice exists, even for |
| 914 |
|
# versions that already default to it. |
| 915 |
|
case "$with_debug:$compiler" in |
| 916 |
|
no:* | *:WorkShop5[[0-4]] ) ;; |
| 917 |
|
* ) |
| 918 |
|
CFLAGS="-xdebugformat=stabs $CFLAGS" |
| 919 |
|
CXXFLAGS="-xdebugformat=stabs $CXXFLAGS" |
| 920 |
|
;; |
| 921 |
|
esac |
| 922 |
|
CXX_FILTER="2>&1 | \$(top_srcdir)/compilers/unix/cxx_filter.WorkShop.sh" |
| 923 |
LINK_FILTER="$CXX_FILTER" |
LINK_FILTER="$CXX_FILTER" |
| 924 |
AR_FILTER="$CXX_FILTER" |
AR_FILTER="$CXX_FILTER" |
| 925 |
serial_ws50_rtti_kludge="rtti" |
serial_ws50_rtti_kludge="rtti" |
|
ncbicntr="ncbicntr_workshop" |
|
| 926 |
;; |
;; |
| 927 |
|
|
| 928 |
irix*:MIPSpro73 ) |
irix*:MIPSpro73 ) |
| 936 |
# 1460: Function %n is redeclared "inline" after being called. |
# 1460: Function %n is redeclared "inline" after being called. |
| 937 |
# 1521: A nonstandard preprocessing directive is used. |
# 1521: A nonstandard preprocessing directive is used. |
| 938 |
CFLAGS="$COMMON_FLAGS -woff 1209 $CFLAGS" |
CFLAGS="$COMMON_FLAGS -woff 1209 $CFLAGS" |
| 939 |
CXXFLAGS="$COMMON_FLAGS -ansiW -ptused -LANG:std -LANG:ansi-for-init-scope -woff 1460,1521,1429,1169,1209,1107,1424 $CXXFLAGS" |
CXXFLAGS="$COMMON_FLAGS -ansiW -ptused -FE:eliminate_duplicate_inline_copies -FE:template_in_elf_section -no_auto_include -LANG:std -LANG:ansi-for-init-scope -woff 1460,1521,1429,1169,1209,1107,1424 $CXXFLAGS" |
| 940 |
CXXCPP=${CXXCPP:="$CXX -E -LANG:std"} |
: ${CXXCPP:="$CXX -E -LANG:std"} |
| 941 |
LDFLAGS="-LANG:std $LDFLAGS" |
LDFLAGS="-LANG:std -G0 -FE:eliminate_duplicate_inline_copies -FE:template_in_elf_section $LDFLAGS" |
| 942 |
CPPFLAGS="-D__LONGLONG $CPPFLAGS" |
CPPFLAGS="-D__LONGLONG $CPPFLAGS" |
| 943 |
CXX_FILTER="2>&1 | \$(top_srcdir)/compilers/cxx_filter.$compiler.sh" |
CXX_FILTER="2>&1 | \$(top_srcdir)/compilers/unix/cxx_filter.$compiler.sh" |
| 944 |
;; |
;; |
| 945 |
|
|
| 946 |
cygwin*:GCC ) |
cygwin*:GCC ) |
| 947 |
with_dll="no" |
with_dll="no" |
| 948 |
NETWORK_LIBS=${NETWORK_LIBS:="-lwsock32"} |
: ${NETWORK_LIBS:="-lws2_32"} |
| 949 |
CONF_exe_ext=".exe" |
CONF_exe_ext=".exe" |
| 950 |
;; |
;; |
| 951 |
|
|
| 974 |
make_shell="" |
make_shell="" |
| 975 |
;; |
;; |
| 976 |
|
|
| 977 |
aix*:VisualAge) |
*:VisualAge) |
| 978 |
CXXFLAGS="-qrtti=all $CXXFLAGS" |
# 1506-1108 (I) The use of keyword '__attribute__' is non-portable. |
| 979 |
|
CFLAGS="-qlanglvl=extc99 -qsuppress=1506-1108 $CFLAGS" |
| 980 |
|
# 1540-1663 (W) Incorrect assignment of a restrict qualified pointer. |
| 981 |
|
CXXFLAGS="-qrtti=all -qsuppress=1540-1663 $CXXFLAGS" |
| 982 |
DEPFLAGS="-E -M" |
DEPFLAGS="-E -M" |
| 983 |
DEPFLAGS_POST='>/dev/null 2>&1; (cat $*.u; rm -f $*.u)' |
DEPFLAGS_POST='>/dev/null 2>&1; (cat $*.u; rm -f $*.u)' |
| 984 |
;; |
;; |
| 986 |
*:Compaq) |
*:Compaq) |
| 987 |
CPPFLAGS="-D__USE_STD_IOSTREAM $CPPFLAGS" |
CPPFLAGS="-D__USE_STD_IOSTREAM $CPPFLAGS" |
| 988 |
CXXFLAGS="-tweak -nocompress -distinguish_nested_enums $CXXFLAGS" |
CXXFLAGS="-tweak -nocompress -distinguish_nested_enums $CXXFLAGS" |
| 989 |
|
DEPFLAGS="$DEPFLAGS -distinguish_nested_enums" |
| 990 |
case "$host_os" in |
case "$host_os" in |
| 991 |
osf*) |
osf*) |
| 992 |
# Suppress link warnings; otherwise, we get "weak symbol multiply |
# Suppress link warnings; otherwise, we get "weak symbol multiply |
| 1005 |
CONF_dll_ext=".dylib" |
CONF_dll_ext=".dylib" |
| 1006 |
CONF_loadable_ext=".so" |
CONF_loadable_ext=".so" |
| 1007 |
if $CXX -v 2>&1 | grep -q Apple; then |
if $CXX -v 2>&1 | grep -q Apple; then |
| 1008 |
# Suppress warnings about potential changes in the size of long double; |
CFLAGS="-fpascal-strings $CFLAGS" |
| 1009 |
# our ABI isn't too stable yet anyway. |
CXXFLAGS="-fno-permissive -fpascal-strings $CXXFLAGS" |
| 1010 |
# -fno-common is only necessary when building shared libraries, |
# -flat_namespace is necessary for proper handling of shared libraries |
| 1011 |
# but sometimes they include static libs.... |
# that don't themselves link against all their dependencies. |
| 1012 |
CFLAGS="-Wno-long-double -fno-common $CFLAGS" |
LDFLAGS="-flat_namespace $LD_FLAGS" |
| 1013 |
CXXFLAGS="-Wno-long-double -fno-common $CXXFLAGS" |
|
| 1014 |
|
if test "$with_ncbi_public" = yes; then |
| 1015 |
|
CC="$CC -mmacosx-version-min=10.4" |
| 1016 |
|
CXX="$CXX -mmacosx-version-min=10.4" |
| 1017 |
|
fi |
| 1018 |
|
else |
| 1019 |
|
LDFLAGS="-Wl,-flat_namespace $LD_FLAGS" |
| 1020 |
|
fi |
| 1021 |
|
if test -f /usr/include/dlfcn.h; then |
| 1022 |
|
# may be able to do without /sw, so ignore it by default |
| 1023 |
|
: |
| 1024 |
|
elif test -f /sw/include/dlfcn.h; then |
| 1025 |
|
CPPFLAGS="-I/sw/include $CPPFLAGS" |
| 1026 |
|
LDFLAGS="-L/sw/lib $LDFLAGS" |
| 1027 |
|
else |
| 1028 |
|
AC_MSG_WARN([No dlfcn.h in /usr/include or /sw/include.]) |
| 1029 |
|
fi |
| 1030 |
|
case "$CPPFLAGS $LIBS" in |
| 1031 |
|
*sw/*) ;; |
| 1032 |
|
*) |
| 1033 |
|
if test -d "$NCBI/safe-sw"; then |
| 1034 |
|
CPPFLAGS="-I$NCBI/safe-sw/include $CPPFLAGS" |
| 1035 |
|
LDFLAGS="-L$NCBI/safe-sw/lib $LDFLAGS" |
| 1036 |
fi |
fi |
| 1037 |
CPPFLAGS="-F/System/Library/Frameworks/CoreServices.framework/Frameworks -I/sw/include $CPPFLAGS" |
;; |
| 1038 |
LIBS="-Wl,-framework,ApplicationServices -L/sw/lib $LIBS" |
esac |
| 1039 |
|
|
| 1040 |
|
CPPFLAGS="-F/System/Library/Frameworks/CoreServices.framework/Frameworks $CPPFLAGS" |
| 1041 |
|
LIBS="-Wl,-framework,ApplicationServices $LIBS" |
| 1042 |
;; |
;; |
| 1043 |
esac |
esac |
| 1044 |
|
|
| 1052 |
|
|
| 1053 |
#### Check if the compiler matches one of supported compilers on this platform |
#### Check if the compiler matches one of supported compilers on this platform |
| 1054 |
if test -z "$compiler" ; then |
if test -z "$compiler" ; then |
|
changequote(, )dnl |
|
| 1055 |
cat <<EOF |
cat <<EOF |
| 1056 |
|
|
| 1057 |
Compiler $CXX $compiler_ver is not fully supported. |
Compiler $CXX $compiler_ver is not fully supported. |
| 1058 |
Consult doc/config.html#ref_Compilers for the list of |
Consult doc/config.html\#ref_Compilers for the list of |
| 1059 |
fully supported platforms/compilers. |
fully supported platforms/compilers. |
|
Do you still want to proceed (at your own risk)? [n/y] |
|
| 1060 |
EOF |
EOF |
| 1061 |
changequote([, ])dnl |
NCBI_CAUTION([Do you still want to proceed (at your own risk)?]) |
| 1062 |
read answer |
echo |
|
case "$answer" in |
|
|
y ) AC_MSG_WARN([Proceeding at your own risk...]) ; echo ;; |
|
|
* ) AC_MSG_WARN([Configuration has been canceled by user.]) ; exit 1 ;; |
|
|
esac |
|
| 1063 |
compiler="UNKNOWN" |
compiler="UNKNOWN" |
| 1064 |
fi |
fi |
| 1065 |
|
|
| 1068 |
case "$host_os:$compiler" in |
case "$host_os:$compiler" in |
| 1069 |
*:GCC | *:KCC | *:ICC ) |
*:GCC | *:KCC | *:ICC ) |
| 1070 |
compiler_pfx="${compiler}-" |
compiler_pfx="${compiler}-" |
| 1071 |
compiler_vpfx=`echo "${compiler}${compiler_ver}-" | \ |
compiler_vpfx="${compiler}${compiler_version}-" |
|
sed -e 's/\.//g; s/[\([0-9][0-9][0-9]\)[0-9]*]/\1/'` |
|
| 1072 |
;; |
;; |
| 1073 |
esac |
esac |
| 1074 |
|
|
| 1076 |
C_LIBS=$LIBS |
C_LIBS=$LIBS |
| 1077 |
|
|
| 1078 |
|
|
| 1079 |
#### 32/64-bit compilation, and extra C++ LIBS |
#### architecture settings, and extra C++ LIBS |
| 1080 |
: ${with_64:="no"} |
if test "${with_universal-no}" != "no" ; then |
| 1081 |
if test "$with_64" = "yes" ; then |
bit64_sfx= #"Univ" |
| 1082 |
|
case "$host" in |
| 1083 |
|
*-*-darwin[[89]].* | *-*-darwin[[1-9]][[0-9]]* ) |
| 1084 |
|
case "$with_universal" in |
| 1085 |
|
yes ) |
| 1086 |
|
case "$with_64:$host_os" in |
| 1087 |
|
yes:darwin8.* ) |
| 1088 |
|
AC_MSG_ERROR([Unable to build 64-bit universal binaries on $host]) |
| 1089 |
|
;; |
| 1090 |
|
yes:* ) |
| 1091 |
|
ARCH_CFLAGS="-arch ppc64 -arch x86_64" |
| 1092 |
|
;; |
| 1093 |
|
* ) |
| 1094 |
|
ARCH_CFLAGS="-arch ppc -arch i386" |
| 1095 |
|
;; |
| 1096 |
|
esac |
| 1097 |
|
;; |
| 1098 |
|
* ) |
| 1099 |
|
ARCH_CFLAGS="-arch `echo $with_universal | sed -e 's/,/ -arch /g'`" |
| 1100 |
|
;; |
| 1101 |
|
esac |
| 1102 |
|
case "$host" in |
| 1103 |
|
p*pc*-*-darwin8.*) |
| 1104 |
|
# Must specify -isysroot ..., but only once; anyway, the preprocessor |
| 1105 |
|
# needs to see it, and naturally can't cope with multiple -arch flags. |
| 1106 |
|
# The -mmacosx-version-min flag avoids link errors under OS 10.5 |
| 1107 |
|
# (Darwin 9), which otherwise tries to use crt1.10.5.o despite the |
| 1108 |
|
# request for a sysroot lacking that file. |
| 1109 |
|
SYSROOT="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" |
| 1110 |
|
#ARCH_CFLAGS="$SYSROOT $ARCH_CFLAGS" |
| 1111 |
|
CC="$CC $SYSROOT" |
| 1112 |
|
CXX="$CXX $SYSROOT" |
| 1113 |
|
;; |
| 1114 |
|
esac |
| 1115 |
|
;; |
| 1116 |
|
* ) AC_MSG_ERROR([Do not know how to build universal binaries on $host]) ;; |
| 1117 |
|
esac |
| 1118 |
|
AC_DEFINE(NCBI_UNIVERSAL_BUILD, 1, |
| 1119 |
|
[Define to 1 if building universal (multi-architecture) binaries.]) |
| 1120 |
|
with_distcc=no |
| 1121 |
|
elif test "$with_64" = "yes" ; then |
| 1122 |
bit64_sfx="64" |
bit64_sfx="64" |
| 1123 |
case "$host:$compiler" in |
case "$host:$compiler" in |
| 1124 |
sparc-sun-solaris*:WorkShop5 | sparc-sun-solaris*:KCC ) |
sparc-sun-solaris*:WorkShop5 | sparc-sun-solaris*:KCC ) |
| 1126 |
;; |
;; |
| 1127 |
sparc-sun-solaris*:WorkShop51 ) |
sparc-sun-solaris*:WorkShop51 ) |
| 1128 |
ARCH_CFLAGS="-xtarget=ultra -xarch=v9" |
ARCH_CFLAGS="-xtarget=ultra -xarch=v9" |
| 1129 |
LIBS="-Bstatic -L$CXX_PATH/../lib -lCstd -lCrun -Bdynamic $LIBS" |
LIBS="-Bstatic -L$CXX_PATH/../lib -lCstd -lCrun -Bdynamic $LIBS -lc" |
| 1130 |
|
;; |
| 1131 |
|
*solaris*:WorkShop59 | *solaris*:WorkShop51? ) |
| 1132 |
|
ARCH_CFLAGS="-m64" |
| 1133 |
|
LIBS="-lCstd -lCrun $LIBS -lc" |
| 1134 |
;; |
;; |
| 1135 |
changequote(, )dnl |
changequote(, )dnl |
| 1136 |
sparc-sun-solaris*:WorkShop5[234] ) |
*solaris*:WorkShop5* ) |
| 1137 |
ARCH_CFLAGS="-xtarget=ultra -xarch=v9" |
ARCH_CFLAGS="-xtarget=generic64" |
| 1138 |
# Redundant for programs, but necessary for dlopen-able shared libs, |
# Redundant for programs, but necessary for dlopen-able shared libs, |
| 1139 |
# at least in the x86 ReleaseMT configuration. |
# at least in the x86 ReleaseMT configuration. |
| 1140 |
LIBS="-lCstd $LIBS" |
LIBS="-lCstd -lCrun $LIBS -lc" |
| 1141 |
;; |
;; |
| 1142 |
changequote([, ])dnl |
changequote([, ])dnl |
| 1143 |
sparc-*:GCC ) |
mips*:GCC ) |
| 1144 |
|
ARCH_CFLAGS="-mips64" |
| 1145 |
|
;; |
| 1146 |
|
*:GCC ) |
| 1147 |
# May not work prior to GCC 3.1. |
# May not work prior to GCC 3.1. |
| 1148 |
ARCH_CFLAGS="-m64" |
ARCH_CFLAGS="-m64" |
| 1149 |
;; |
;; |
| 1157 |
ARCH_CFLAGS="-64" |
ARCH_CFLAGS="-64" |
| 1158 |
;; |
;; |
| 1159 |
* ) |
* ) |
| 1160 |
AC_MSG_ERROR(["Do not know how to compile 64-bit with compiler $CXX $compiler_ver $host:$compiler"]) |
AC_MSG_ERROR([Do not know how to compile 64-bit with compiler $CXX $compiler_ver $host:$compiler]) |
| 1161 |
;; |
;; |
| 1162 |
esac |
esac |
| 1163 |
else |
else |
| 1164 |
bit64_sfx= |
bit64_sfx= |
| 1165 |
ARCH_CFLAGS= |
ARCH_CFLAGS= |
| 1166 |
case "$host_os:$compiler" in |
if test "$with_64" = "no" ; then |
| 1167 |
solaris*:WorkShop5 ) |
case "$host:$compiler" in |
| 1168 |
|
*solaris*:WorkShop* | *solaris*:KCC ) |
| 1169 |
|
ARCH_CFLAGS="-xtarget=generic" |
| 1170 |
|
;; |
| 1171 |
|
mips*:GCC ) |
| 1172 |
|
ARCH_CFLAGS="-mipsn32" |
| 1173 |
|
;; |
| 1174 |
|
*:GCC ) |
| 1175 |
|
# May not work prior to GCC 3.1. |
| 1176 |
|
ARCH_CFLAGS="-m32" |
| 1177 |
|
;; |
| 1178 |
|
|
| 1179 |
|
mips-sgi-irix*:MIPSpro73 ) |
| 1180 |
|
ARCH_CFLAGS="-n32" |
| 1181 |
|
CPPFLAGS="$ARCH_CFLAGS $CPPFLAGS" |
| 1182 |
|
AR=${AR:="$CXX $ARCH_CFLAGS -ar -WR,-v -o"} |
| 1183 |
|
;; |
| 1184 |
|
mips-sgi-irix*:KCC ) |
| 1185 |
|
ARCH_CFLAGS="-n32" |
| 1186 |
|
;; |
| 1187 |
|
* ) |
| 1188 |
|
# Just a warning, since 32-bit mode is typically the default anyway... |
| 1189 |
|
AC_MSG_WARN([Do not know how to compile 32-bit with compiler $CXX $compiler_ver $host:$compiler]) |
| 1190 |
|
;; |
| 1191 |
|
esac |
| 1192 |
|
fi |
| 1193 |
|
case "$host:$compiler" in |
| 1194 |
|
*solaris*:WorkShop5 ) |
| 1195 |
LIBS="-Bstatic -L$CXX_PATH/../SC5.0/lib -lm -Bdynamic $LIBS" |
LIBS="-Bstatic -L$CXX_PATH/../SC5.0/lib -lm -Bdynamic $LIBS" |
| 1196 |
MATH_LIBS=" " |
MATH_LIBS=" " |
| 1197 |
;; |
;; |
| 1198 |
solaris*:WorkShop51 ) |
*solaris*:WorkShop51 ) |
| 1199 |
LIBS="-Bstatic -L$CXX_PATH/../lib -lCstd -lCrun -lm -Bdynamic $LIBS" |
LIBS="-Bstatic -L$CXX_PATH/../lib -lCstd -lCrun -lm -Bdynamic $LIBS -lc" |
| 1200 |
MATH_LIBS=" " |
MATH_LIBS=" " |
| 1201 |
;; |
;; |
| 1202 |
|
sparc-sun-solaris*:WorkShop54 ) |
| 1203 |
|
# Using this (still very conservative) non-generic XARCH flavor allows |
| 1204 |
|
# compiler to use the extended instruction set which reportedly speeds |
| 1205 |
|
# up the locking of at least some STL classes by allowing them to use |
| 1206 |
|
# atomic increment instead of mutex; also seems to fix something that |
| 1207 |
|
# caused misterios basic_string<> related crashes in the |
| 1208 |
|
# WorkShop54 -xarch=v8 -mt configuration). |
| 1209 |
|
ARCH_CFLAGS="-xarch=v8plus" |
| 1210 |
|
LIBS="-lCstd $LIBS -lCrun -lc" |
| 1211 |
|
;; |
| 1212 |
changequote(, )dnl |
changequote(, )dnl |
| 1213 |
solaris*:WorkShop5[234] ) |
*solaris*:WorkShop5* ) |
| 1214 |
# MATH_LIBS=" " |
# MATH_LIBS=" " |
| 1215 |
# Redundant for programs, but necessary for dlopen-able shared libs, |
# Redundant for programs, but necessary for dlopen-able shared libs, |
| 1216 |
# at least in the x86 ReleaseMT configuration. |
# at least in the x86 ReleaseMT configuration. |
| 1217 |
LIBS="-lCstd $LIBS" |
LIBS="-lCstd $LIBS -lCrun -lc" |
| 1218 |
;; |
;; |
| 1219 |
changequote([, ])dnl |
changequote([, ])dnl |
| 1220 |
irix*:MIPSpro73 | irix*:KCC ) |
*irix*:MIPSpro73 | *irix*:KCC ) |
| 1221 |
ARCH_CFLAGS="-n32" |
ARCH_CFLAGS="-n32" |
| 1222 |
;; |
;; |
| 1223 |
esac |
esac |
| 1224 |
fi |
fi |
| 1225 |
|
|
| 1226 |
|
case "$host_os:$host_cpu" in |
| 1227 |
|
linux*:alpha*) |
| 1228 |
|
ARCH_CFLAGS="-mieee $ARCH_CFLAGS" |
| 1229 |
|
;; |
| 1230 |
|
esac |
| 1231 |
|
|
| 1232 |
CFLAGS="$ARCH_CFLAGS $CFLAGS" |
CFLAGS="$ARCH_CFLAGS $CFLAGS" |
| 1233 |
CXXFLAGS="$ARCH_CFLAGS $CXXFLAGS" |
CXXFLAGS="$ARCH_CFLAGS $CXXFLAGS" |
| 1234 |
LDFLAGS="$ARCH_CFLAGS $LDFLAGS" |
LDFLAGS="$ARCH_CFLAGS $LDFLAGS" |
| 1235 |
|
|
| 1236 |
|
: ${MATH_LIBS:="-lm"} |
| 1237 |
|
|
| 1238 |
|
### Math lib to be always linked in |
| 1239 |
|
LIBS="$MATH_LIBS $LIBS" |
| 1240 |
|
C_LIBS="$MATH_LIBS $C_LIBS" |
| 1241 |
|
|
| 1242 |
|
if test -n "$with_64"; then |
| 1243 |
|
AC_CACHE_CHECK([whether this system supports --with(out)-64], |
| 1244 |
|
ncbi_cv_sys_with64_ok, |
| 1245 |
|
[AC_LINK_IFELSE([ |
| 1246 |
|
AC_LANG_PROGRAM([#include <string>], |
| 1247 |
|
[std::string* sp = new std::string("foo");])], |
| 1248 |
|
ncbi_cv_sys_with64_ok=yes, ncbi_cv_sys_with64_ok=no)]) |
| 1249 |
|
if test "$ncbi_cv_sys_with64_ok" = no; then |
| 1250 |
|
AC_MSG_ERROR([cannot continue; please try different options]) |
| 1251 |
|
fi |
| 1252 |
|
fi |
| 1253 |
|
|
| 1254 |
### large file support (switch to AC_SYS_LARGEFILE?) |
### large file support (switch to AC_SYS_LARGEFILE?) |
| 1255 |
|
case "$host_os:$compiler:$compiler_version" in |
| 1256 |
|
*:GCC:3[[4-9]]* | *:GCC:[[4-9]]* | *:ICC:[[91]]* ) : ${with_lfs=yes} ;; |
| 1257 |
|
esac |
| 1258 |
|
|
| 1259 |
if test "$with_lfs" = "yes" ; then |
if test "$with_lfs" = "yes" ; then |
| 1260 |
LFSFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" |
LFSFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" |
| 1261 |
CPPFLAGS="$LFSFLAGS $CPPFLAGS" |
CPPFLAGS="$LFSFLAGS $CPPFLAGS" |
| 1264 |
|
|
| 1265 |
#### Flags to enable (potentially unsafe) extra optimization. |
#### Flags to enable (potentially unsafe) extra optimization. |
| 1266 |
if test -z "$DEF_FAST_FLAGS" -o -z "$FAST_CXXFLAGS" ; then |
if test -z "$DEF_FAST_FLAGS" -o -z "$FAST_CXXFLAGS" ; then |
| 1267 |
case "$compiler" in |
case "$compiler:$compiler_version" in |
| 1268 |
GCC ) |
GCC:2* | GCC:344 ) |
| 1269 |
|
# GCC 2.9x sometimes experiences internal errors at high optimization; |
| 1270 |
|
# GCC 3.4.4 (at least on FreeBSD) meanwhile generates crashprone code. |
| 1271 |
|
DEF_FAST_FLAGS="-O2" |
| 1272 |
|
;; |
| 1273 |
|
GCC:* ) |
| 1274 |
DEF_FAST_FLAGS="-O9 -finline-functions -ffast-math -fstrict-aliasing" |
DEF_FAST_FLAGS="-O9 -finline-functions -ffast-math -fstrict-aliasing" |
| 1275 |
if test "$with_profiling" != "yes"; then |
if test "$with_profiling" != "yes"; then |
| 1276 |
# incompatible with -pg |
# incompatible with -pg |
| 1277 |
DEF_FAST_FLAGS="$DEF_FAST_FLAGS -fomit-frame-pointer" |
DEF_FAST_FLAGS="$DEF_FAST_FLAGS -fomit-frame-pointer" |
| 1278 |
fi |
fi |
| 1279 |
;; |
;; |
| 1280 |
|
WorkShop5[[89]]* | WorkShop510 ) |
| 1281 |
|
# Limit optimization to -xO2 (-O now maps to -xO3) due to compiler bugs. |
| 1282 |
|
subst='s/[[ ]]-x*O[[1-9]]*//g' |
| 1283 |
|
CFLAGS="` echo \" $CFLAGS\" | sed -e \"$subst\"` -xO2" |
| 1284 |
|
CXXFLAGS="`echo \" $CXXFLAGS\" | sed -e \"$subst\"` -xO2" |
| 1285 |
|
LDFLAGS="` echo \" $LDFLAGS\" | sed -e \"$subst\"` -xO2" |
| 1286 |
|
DEF_FAST_FLAGS="-xO2" |
| 1287 |
|
;; |
| 1288 |
WorkShop* ) |
WorkShop* ) |
| 1289 |
# (Re)include ARCH_CFLAGS here because -fast implies -xtarget=native. |
DEF_FAST_FLAGS="-fast" |
| 1290 |
DEF_FAST_FLAGS="-fast $ARCH_CFLAGS" |
case "$with_ncbi_public:$host_cpu" in |
| 1291 |
case "$host_cpu" in |
yes:sparc* ) |
| 1292 |
|
DEF_FAST_FLAGS="$DEF_FAST_FLAGS -xtarget=ultra" |
| 1293 |
|
;; |
| 1294 |
|
*:i?86) |
| 1295 |
|
case "$compiler_ver" in |
| 1296 |
|
*5.[[0-4]]*) |
| 1297 |
# Work around a WorkShop standard library bug. |
# Work around a WorkShop standard library bug. |
| 1298 |
i?86) DEF_FAST_FLAGS="$DEF_FAST_FLAGS -D_RWSTD_NO_TEST_AND_SET" ;; |
DEF_FAST_FLAGS="$DEF_FAST_FLAGS -D_RWSTD_NO_TEST_AND_SET" |
| 1299 |
|
;; |
| 1300 |
esac |
esac |
| 1301 |
;; |
;; |
| 1302 |
KCC ) |
esac |
| 1303 |
|
# (Re)include ARCH_CFLAGS here because -fast implies -xtarget=native. |
| 1304 |
|
DEF_FAST_FLAGS="$DEF_FAST_FLAGS $ARCH_CFLAGS" |
| 1305 |
|
;; |
| 1306 |
|
KCC:* ) |
| 1307 |
DEF_FAST_FLAGS="+K3" |
DEF_FAST_FLAGS="+K3" |
| 1308 |
case "$host_os" in |
case "$host_os" in |
| 1309 |
solaris* ) DEF_FAST_FLAGS="$DEF_FAST_FLAGS -fast $ARCH_CFLAGS" ;; |
solaris* ) DEF_FAST_FLAGS="$DEF_FAST_FLAGS -fast $ARCH_CFLAGS" ;; |
| 1310 |
esac |
esac |
| 1311 |
;; |
;; |
| 1312 |
ICC ) |
ICC:* ) |
| 1313 |
if test "$with_mt" = "yes"; then |
if test "$with_mt" = "yes" -a "$compiler_version" -lt 800; then |
| 1314 |
DEF_FAST_FLAGS="-O3 -ip" |
DEF_FAST_FLAGS="-O3 -ip" |
| 1315 |
|
elif test "$compiler_version" -ge 800 -a "$compiler_version" -lt 900; then |
| 1316 |
|
DEF_FAST_FLAGS="-O2" |
| 1317 |
else |
else |
| 1318 |
DEF_FAST_FLAGS="-O3 -axW -ip" |
DEF_FAST_FLAGS="-O3 -axW -ip" |
| 1319 |
fi |
fi |
| 1320 |
;; |
;; |
| 1321 |
MIPSpro* ) |
MIPSpro* ) |
| 1322 |
DEF_FAST_FLAGS="-O3 -Ofast" |
# -Ofast would be preferable, but runs into resource limits when |
| 1323 |
|
# building libxblast.so. :-/ |
| 1324 |
|
DEF_FAST_FLAGS="-O2" |
| 1325 |
;; |
;; |
| 1326 |
Compaq ) |
Compaq:* ) |
| 1327 |
DEF_FAST_FLAGS="-fast" |
DEF_FAST_FLAGS="-fast" |
| 1328 |
;; |
;; |
| 1329 |
* ) |
* ) |
| 1345 |
if test -z "$CFLAGS_DLL" -a -z "$CXXFLAGS_DLL" ; then |
if test -z "$CFLAGS_DLL" -a -z "$CXXFLAGS_DLL" ; then |
| 1346 |
case "$host_os:$compiler" in |
case "$host_os:$compiler" in |
| 1347 |
darwin*:GCC ) |
darwin*:GCC ) |
| 1348 |
# Moved to regular flags, due to some cases of inclusion. |
CFLAGS_DLL="-fno-common" |
| 1349 |
# CFLAGS_DLL="-fno-common" |
CXXFLAGS_DLL="-fno-common" |
|
# CXXFLAGS_DLL="-fno-common" |
|
| 1350 |
;; |
;; |
| 1351 |
*:GCC | linux*:KCC ) |
*:GCC | linux* ) |
| 1352 |
CFLAGS_DLL="-fPIC" |
CFLAGS_DLL="-fPIC" |
| 1353 |
CXXFLAGS_DLL="-fPIC" |
CXXFLAGS_DLL="-fPIC" |
| 1354 |
;; |
;; |
| 1355 |
solaris*:WorkShop* | irix*:MIPSpro73 | \ |
solaris*:WorkShop* | irix*:MIPSpro73 | \ |
| 1356 |
solaris*:KCC | irix*:KCC | linux*:ICC) |
solaris*:KCC | irix*:KCC ) |
| 1357 |
CFLAGS_DLL="-KPIC" |
CFLAGS_DLL="-KPIC" |
| 1358 |
CXXFLAGS_DLL="-KPIC" |
CXXFLAGS_DLL="-KPIC" |
| 1359 |
;; |
;; |
| 1381 |
;; |
;; |
| 1382 |
esac |
esac |
| 1383 |
fi |
fi |
| 1384 |
|
case "$host_os" in |
| 1385 |
|
linux*|solaris* ) RUNPATH_ORIGIN="$CONF_f_runpath'\$\$ORIGIN'" ;; |
| 1386 |
|
* ) RUNPATH_ORIGIN="-DNCBI_RPO_SUFFIX_EATER=" ;; |
| 1387 |
|
esac |
| 1388 |
|
|
| 1389 |
case "$compiler:$compiler_version" in |
case "$compiler:$compiler_version:$with_bin_release" in |
| 1390 |
GCC:3* ) |
GCC:*:yes ) |
| 1391 |
|
libstdcxx=`$CXX $LDFLAGS -print-file-name=libstdc++.a` |
| 1392 |
|
case "$libstdcxx" in |
| 1393 |
|
/*) |
| 1394 |
|
LIBS="$libstdcxx $LIBS" |
| 1395 |
|
LINK=$C_LINK |
| 1396 |
|
;; |
| 1397 |
|
*) |
| 1398 |
|
AC_MSG_WARN([Unable to find static libstdc++ requested by --with-bin-release.]) |
| 1399 |
|
;; |
| 1400 |
|
esac |
| 1401 |
|
;; |
| 1402 |
|
GCC:* ) |
| 1403 |
# Need to specify runpath for compiler-provided libraries |
# Need to specify runpath for compiler-provided libraries |
| 1404 |
case $compiler_version in |
case $compiler_version in |
| 1405 |
30* ) major=3 ;; |
30* ) major=3 ;; |
| 1406 |
31* ) major=4 ;; |
31* ) major=4 ;; |
| 1407 |
* ) major=5 ;; # ABI theoretically stable from 3.2 on |
3[[23]]*) major=5 ;; |
| 1408 |
|
* ) major=6 ;; |
| 1409 |
esac |
esac |
| 1410 |
found=false |
found=false |
| 1411 |
for f in libstdc++.so.$major libgcc_s.so.1 libstdc++.a; do |
for f in libstdc++.so.$major libgcc_s.so.1 libstdc++.a; do |
| 1413 |
dir=`dirname "$path"` |
dir=`dirname "$path"` |
| 1414 |
abs_dir=`cd "$dir" && pwd` |
abs_dir=`cd "$dir" && pwd` |
| 1415 |
case "$dir:$abs_dir" in |
case "$dir:$abs_dir" in |
| 1416 |
*:/lib | *:/usr/lib ) break ;; # no rpath needed |
*:/lib | *:/usr/lib | *:/usr/lib32 | *:/usr/lib64 ) |
| 1417 |
/* ) found=true; break ;; |
# no rpath needed |
| 1418 |
|
break |
| 1419 |
|
;; |
| 1420 |
|
/* ) |
| 1421 |
|
found=true |
| 1422 |
|
break |
| 1423 |
|
;; |
| 1424 |
esac |
esac |
| 1425 |
done |
done |
| 1426 |
if test "$found" = "true" -a -n "$CONF_f_runpath"; then |
if test "$found" = "true" -a -n "$CONF_f_runpath"; then |
| 1442 |
# (Undocumented, and unavailable at all in older versions. :-/) |
# (Undocumented, and unavailable at all in older versions. :-/) |
| 1443 |
LDFLAGS="-static-libcxa $LDFLAGS" |
LDFLAGS="-static-libcxa $LDFLAGS" |
| 1444 |
;; |
;; |
| 1445 |
|
ICC:8* ) |
| 1446 |
|
# In principle, these settings should work, and avoid the need to |
| 1447 |
|
# depend on Intel's libraries at runtime. |
| 1448 |
|
# APP_LDFLAGS="-static-libcxa $APP_LDFLAGS" |
| 1449 |
|
# DLL_LDFLAGS="-nodefaultlibs $DLL_LDFLAGS" |
| 1450 |
|
# In practice, they can break applications that use plugins. :-/ |
| 1451 |
|
LDFLAGS="$CONF_f_runpath$compiler_root/lib $LDFLAGS" |
| 1452 |
|
;; |
| 1453 |
|
ICC:9* ) |
| 1454 |
|
# -i-static moved from common LDFLAGS to accommodate those few |
| 1455 |
|
# DLLs (plugins for external programs such as Python) that need to |
| 1456 |
|
# link ICC's libraries dynamically. |
| 1457 |
|
APP_LDFLAGS="-i-static $APP_LDFLAGS" |
| 1458 |
|
DLL_LDFLAGS="-i-static -nodefaultlibs $DLL_LDFLAGS" |
| 1459 |
|
# Running icpc on a bunch of object files doesn't always ensure that |
| 1460 |
|
# the C++ standard library is actually linked in, and we shouldn't |
| 1461 |
|
# rely on help from wrapper scripts. |
| 1462 |
|
LINK="$LINK -Kc++" |
| 1463 |
|
;; |
| 1464 |
|
ICC:1???:* ) |
| 1465 |
|
APP_LDFLAGS="-i-static $APP_LDFLAGS" |
| 1466 |
|
DLL_LDFLAGS="-i-static -nodefaultlibs $DLL_LDFLAGS" |
| 1467 |
|
# Redundant for apps, but necessary for plugins to be adequately |
| 1468 |
|
# self-contained, at least on 32-bit Linux. |
| 1469 |
|
LIBS="$LIBS -lstdc++" |
| 1470 |
|
LINK="$LINK -Kc++" |
| 1471 |
|
# Defining _GCC_NEXT_LIMITS_H ensures that <limits.h> chaining doesn't |
| 1472 |
|
# stop short, as can otherwise happen. :-/ |
| 1473 |
|
CPPFLAGS="$CPPFLAGS -D_GCC_NEXT_LIMITS_H" |
| 1474 |
|
;; |
| 1475 |
esac |
esac |
| 1476 |
|
|
| 1477 |
# DLLs and profiling don't mix on all platforms |
# DLLs and profiling don't mix on all platforms |
| 1493 |
if test "$with_dll" = "yes" ; then |
if test "$with_dll" = "yes" ; then |
| 1494 |
case "$host_os:$compiler" in |
case "$host_os:$compiler" in |
| 1495 |
linux*:GCC | irix*:* | solaris*:WorkShop* | *:KCC | linux*:ICC \ |
linux*:GCC | irix*:* | solaris*:WorkShop* | *:KCC | linux*:ICC \ |
| 1496 |
| solaris*:GCC | osf*:* ) |
| solaris*:GCC | osf*:* | darwin*:GCC | freebsd*:GCC ) |
| 1497 |
;; |
;; |
| 1498 |
* ) |
* ) |
| 1499 |
echo |
echo |
| 1500 |
echo "DLLs may not be buildable by $CXX $compiler_ver on $host!" |
echo "DLLs may not be buildable by $CXX $compiler_ver on $host!" |
| 1501 |
changequote(, )dnl |
NCBI_CAUTION([Do you still want to try build DLLs (at your own risk)?]) |
|
echo "Do you still want to try build DLLs (at your own risk)? [y/n]" |
|
|
changequote([, ])dnl |
|
|
read answer |
|
|
case "$answer" in |
|
|
y | Y | yes | YES ) ;; |
|
|
* ) AC_MSG_WARN([Configuration has been canceled by user.]) ; exit 1 ;; |
|
|
esac |
|
| 1502 |
echo |
echo |
| 1503 |
;; |
;; |
| 1504 |
esac |
esac |
| 1511 |
*) LIB_OR_DLL="lib"; dll_sfx="" ;; |
*) LIB_OR_DLL="lib"; dll_sfx="" ;; |
| 1512 |
esac |
esac |
| 1513 |
|
|
| 1514 |
if test "$with_dll" = "no"; then # no DLLs whatsoever! |
DLL= |
| 1515 |
FORCE_STATIC_LIB="LIB_OR_DLL = lib" |
DLL_LIB_SETTING='$(DLL_DLIB)' |
| 1516 |
else |
IF_WITH_DLL= |
| 1517 |
FORCE_STATIC_LIB= |
UNLESS_WITH_DLL='# ' |
|
fi |
|
|
|
|
|
if test "$LIB_OR_DLL" = "both"; then |
|
| 1518 |
STATIC="-static" |
STATIC="-static" |
| 1519 |
else |
USUAL_AND_DLL=both |
| 1520 |
|
USUAL_AND_LIB=both |
| 1521 |
|
|
| 1522 |
|
case "$LIB_OR_DLL" in |
| 1523 |
|
dll) |
| 1524 |
STATIC= |
STATIC= |
| 1525 |
fi |
USUAL_AND_DLL=dll |
| 1526 |
|
;; |
| 1527 |
|
lib) |
| 1528 |
|
DLL=-dll |
| 1529 |
|
DLL_LIB_SETTING='$(DLL_LIB)' |
| 1530 |
|
IF_WITH_DLL='# ' |
| 1531 |
|
UNLESS_WITH_DLL= |
| 1532 |
|
USUAL_AND_LIB=lib |
| 1533 |
|
;; |
| 1534 |
|
esac |
| 1535 |
|
|
| 1536 |
|
AC_SUBST(DLL) |
| 1537 |
|
AC_SUBST(DLL_LIB_SETTING) |
| 1538 |
|
AC_SUBST(IF_WITH_DLL) |
| 1539 |
|
AC_SUBST(UNLESS_WITH_DLL) |
| 1540 |
AC_SUBST(STATIC) |
AC_SUBST(STATIC) |
| 1541 |
|
AC_SUBST(USUAL_AND_DLL) |
| 1542 |
|
AC_SUBST(USUAL_AND_LIB) |
| 1543 |
|
|
| 1544 |
|
|
| 1545 |
#### GNU compiler:: common flags and definitions |
#### GNU compiler:: common flags and definitions |
| 1577 |
case "$host_os" in |
case "$host_os" in |
| 1578 |
solaris* ) CPPFLAGS="-D__EXTENSIONS__ -D__STDC__=0 $CPPFLAGS" ;; |
solaris* ) CPPFLAGS="-D__EXTENSIONS__ -D__STDC__=0 $CPPFLAGS" ;; |
| 1579 |
esac |
esac |
|
# Often hangs for no good reason :-/; limit time to ~17 minutes per instance |
|
|
if test -x compilers/wrapper.KCC.sh; then |
|
|
wrap="compilers/wrapper.KCC.sh" |
|
|
CC_WRAPPER="$CC_WRAPPER $wrap" |
|
|
CXX_WRAPPER="$CXX_WRAPPER $wrap" |
|
|
AR_WRAPPER="$AR_WRAPPER $wrap" |
|
|
CXXCPP="$CXX -E" # Don't double-wrap... |
|
|
fi |
|
|
if test -n "$kcc_license" ; then |
|
|
kcc_CC="$CC" |
|
|
kcc_CXX="$CXX" |
|
|
CC="./compilers/cxx_filter.KCC.sh $CC" |
|
|
CXX="./compilers/cxx_filter.KCC.sh $CXX" |
|
|
fi |
|
| 1580 |
fi |
fi |
| 1581 |
|
|
| 1582 |
|
|
| 1585 |
if test -n "$icc_license" ; then |
if test -n "$icc_license" ; then |
| 1586 |
icc_CC="$CC" |
icc_CC="$CC" |
| 1587 |
icc_CXX="$CXX" |
icc_CXX="$CXX" |
| 1588 |
CC="./compilers/cxx_filter.ICC.sh $CC" |
CC="./compilers/unix/cxx_filter.ICC.sh $CC" |
| 1589 |
CXX="./compilers/cxx_filter.ICC.sh $CXX" |
CXX="./compilers/unix/cxx_filter.ICC.sh $CXX" |
| 1590 |
fi |
fi |
| 1591 |
fi |
fi |
| 1592 |
|
|
| 1600 |
Rules="rules_with_autodep" |
Rules="rules_with_autodep" |
| 1601 |
elif test "$with_autodep" = "no" ; then |
elif test "$with_autodep" = "no" ; then |
| 1602 |
Rules="rules" |
Rules="rules" |
| 1603 |
elif make --version 2>/dev/null | grep 'GNU Make' ; then |
elif make --version 2>/dev/null | grep 'GNU Make' >/dev/null ; then |
| 1604 |
Rules="rules_with_autodep" |
Rules="rules_with_autodep" |
| 1605 |
else |
else |
| 1606 |
Rules="rules" |
Rules="rules" |
| 1607 |
fi |
fi |
| 1608 |
|
|
| 1609 |
|
|
| 1610 |
|
### Support for precompiled headers |
| 1611 |
|
GCCPCH="#" |
| 1612 |
|
if test "$compiler" = GCC -a "$with_pch" = "yes" \ |
| 1613 |
|
-a "${with_universal-no}" = "no"; then |
| 1614 |
|
AC_CACHE_CHECK([whether $CXX supports precompiled headers], ncbi_cv_cxx_pch, |
| 1615 |
|
[echo '#include <iostream>' > conftest.hpp |
| 1616 |
|
echo $CXX $CPPFLAGS $CXXFLAGS -xc++-header -c conftest.hpp >&AS_MESSAGE_LOG_FD |
| 1617 |
|
if $CXX $CPPFLAGS $CXXFLAGS -xc++-header -c conftest.hpp >&AS_MESSAGE_LOG_FD 2>&1 \ |
| 1618 |
|
&& test -f conftest.hpp.gch; then |
| 1619 |
|
ncbi_cv_cxx_pch=yes |
| 1620 |
|
else |
| 1621 |
|
ncbi_cv_cxx_pch=no |
| 1622 |
|
fi]) |
| 1623 |
|
if test "$ncbi_cv_cxx_pch" = "yes"; then |
| 1624 |
|
if test "$Rules" = "rules"; then |
| 1625 |
|
AC_MSG_WARN([Your version of make does not fully support PCH-related dependencies.]) |
| 1626 |
|
fi |
| 1627 |
|
CXXFLAGS="-DNCBI_USE_PCH $CXXFLAGS" |
| 1628 |
|
GCCPCH="" |
| 1629 |
|
fi |
| 1630 |
|
fi |
| 1631 |
|
|
| 1632 |
|
|
| 1633 |
#### Tools |
#### Tools |
| 1634 |
AC_PROG_LN_S |
AC_PROG_LN_S |
| 1635 |
AC_PROG_RANLIB |
AC_PROG_RANLIB |
| 1636 |
AC_CHECK_PROG(AR, ar, ar cr, ErrorCannotFind_AR) |
AC_CHECK_PROG(AR, ar, ar cr, ErrorCannotFind_AR) |
| 1637 |
|
if test "x$RANLIB" != "x:"; then |
| 1638 |
|
AC_CACHE_CHECK([ranlib's effectiveness], ncbi_cv_prog_ranlib_effect, |
| 1639 |
|
[AC_LANG_CONFTEST([AC_LANG_SOURCE([[int libfunc(void) { return 0; }]])]) |
| 1640 |
|
echo $CXX $CPPFLAGS $CXXFLAGS -c conftest.$ac_ext >&AS_MESSAGE_LOG_FD |
| 1641 |
|
$CXX $CPPFLAGS $CXXFLAGS -c conftest.$ac_ext >&AS_MESSAGE_LOG_FD 2>&1 |
| 1642 |
|
echo $AR conftest.a conftest.o >&AS_MESSAGE_LOG_FD |
| 1643 |
|
$AR conftest.a conftest.o >&AS_MESSAGE_LOG_FD 2>&1 |
| 1644 |
|
save_LIBS=$LIBS |
| 1645 |
|
LIBS="conftest.a $LIBS" |
| 1646 |
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern int libfunc(void);]], |
| 1647 |
|
[[return libfunc();]])], |
| 1648 |
|
[ok_without=true], [ok_without=false]) |
| 1649 |
|
echo $RANLIB conftest.a >&AS_MESSAGE_LOG_FD |
| 1650 |
|
$RANLIB conftest.a >&AS_MESSAGE_LOG_FD |
| 1651 |
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern int libfunc(void);]], |
| 1652 |
|
[[return libfunc();]])], |
| 1653 |
|
[ok_with=true], [ok_with=false]) |
| 1654 |
|
LIBS=$save_LIBS |
| 1655 |
|
case $ok_with:$ok_without in |
| 1656 |
|
true:false) ncbi_cv_prog_ranlib_effect=positive ;; |
| 1657 |
|
false:true) ncbi_cv_prog_ranlib_effect=negative ;; |
| 1658 |
|
true:true) ncbi_cv_prog_ranlib_effect=neutral ;; |
| 1659 |
|
false:false) ncbi_cv_prog_ranlib_effect=unknown ;; |
| 1660 |
|
esac |
| 1661 |
|
]) |
| 1662 |
|
case "$ncbi_cv_prog_ranlib_effect" in |
| 1663 |
|
negative) RANLIB=: ;; |
| 1664 |
|
unknown) |
| 1665 |
|
AC_MSG_WARN([Failed to make a working library with or without ranlib.]) |
| 1666 |
|
;; |
| 1667 |
|
esac |
| 1668 |
|
fi |
| 1669 |
if test "$with_strip" = yes; then |
if test "$with_strip" = yes; then |
| 1670 |
AC_CHECK_PROG(STRIP, strip, strip, @:) |
AC_CHECK_PROG(STRIP, strip, strip, @:) |
| 1671 |
|
AC_CACHE_CHECK([whether strip loses runtime type information], |
| 1672 |
|
ncbi_cv_strip_loses_rtti, |
| 1673 |
|
[if test "$cross_compiling" = yes; then |
| 1674 |
|
case "$host_os" in |
| 1675 |
|
darwin* ) ncbi_cv_strip_loses_rtti=yes ;; |
| 1676 |
|
# No problems observed elsewhere so far. |
| 1677 |
|
* ) ncbi_cv_strip_loses_rtti=no ;; |
| 1678 |
|
esac |
| 1679 |
|
else |
| 1680 |
|
AC_LANG_CONFTEST([AC_LANG_PROGRAM( |
| 1681 |
|
[[#include <iostream> |
| 1682 |
|
#include <typeinfo> |
| 1683 |
|
struct SomeStruct { };]], |
| 1684 |
|
[[std::cout << typeid(SomeStruct).name();]])]) |
| 1685 |
|
echo $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o conftest$ac_exeext \ |
| 1686 |
|
conftest.$ac_ext >&AS_MESSAGE_LOG_FD |
| 1687 |
|
$CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o conftest$ac_exeext \ |
| 1688 |
|
conftest.$ac_ext >&AS_MESSAGE_LOG_FD 2>&1 |
| 1689 |
|
$STRIP conftest$ac_exeext |
| 1690 |
|
if (ulimit -c 0; ./conftest$ac_exeext) >/dev/null 2>&1; then |
| 1691 |
|
ncbi_cv_strip_loses_rtti=no |
| 1692 |
|
else |
| 1693 |
|
ncbi_cv_strip_loses_rtti=yes |
| 1694 |
|
fi |
| 1695 |
|
rm -rf conftest* |
| 1696 |
|
fi]) |
| 1697 |
|
if test "$ncbi_cv_strip_loses_rtti" = "yes"; then |
| 1698 |
|
NCBI_CAUTION([Do you still want to proceed (at your own risk)?]) |
| 1699 |
|
fi |
| 1700 |
else |
else |
| 1701 |
STRIP=@: |
STRIP=@: |
| 1702 |
fi |
fi |
| 1703 |
case "$host_os" in |
case "$host_os" in |
| 1704 |
irix* ) |
irix* | aix5.[2-9]* ) |
| 1705 |
# lorder and tsort exist but don't work. |
# lorder and tsort exist but don't work. |
| 1706 |
LORDER=echo |
LORDER=echo |
| 1707 |
TSORT=cat |
TSORT=cat |
| 1717 |
;; |
;; |
| 1718 |
esac |
esac |
| 1719 |
|
|
| 1720 |
|
|
| 1721 |
|
# When using ccache and distcc together, ccache needs to be primary, |
| 1722 |
|
# so look for distcc(.sh) first. |
| 1723 |
|
|
| 1724 |
|
if test -x $NCBI/bin/distcc.sh ; then |
| 1725 |
|
: ${DISTCC=$NCBI/bin/distcc.sh} |
| 1726 |
|
: ${with_distcc=yes} |
| 1727 |
|
fi |
| 1728 |
|
|
| 1729 |
|
if test "$with_distcc" = "yes" ; then |
| 1730 |
|
AC_CHECK_PROG(DISTCC, distcc, distcc, []) |
| 1731 |
|
if test -n "$DISTCC" ; then |
| 1732 |
|
# Test distcc reasonably thoroughly to avoid possible gotchas. |
| 1733 |
|
cat > distcctest.c << EOF |
| 1734 |
|
#include <stddef.h> |
| 1735 |
|
#if !defined(__GNUC__) && !defined(offsetof) |
| 1736 |
|
# define offsetof(T, F) ((size_t)((char*) &(((T*) 0)->F) - (char*) 0)) |
| 1737 |
|
#endif |
| 1738 |
|
struct S { int x; }; |
| 1739 |
|
int f() { return offsetof(struct S, x); } |
| 1740 |
|
EOF |
| 1741 |
|
DISTCC_FALLBACK=0 |
| 1742 |
|
export DISTCC_FALLBACK |
| 1743 |
|
AC_CACHE_CHECK([whether any distcc servers are available], |
| 1744 |
|
ncbi_cv_prog_distcc_servers, |
| 1745 |
|
[if test -x /usr/bin/cc; then testcc=/usr/bin/cc; else testcc=$CC; fi |
| 1746 |
|
if $DISTCC $testcc -c distcctest.c \ |
| 1747 |
|
2>&AS_MESSAGE_LOG_FD ; then |
| 1748 |
|
ncbi_cv_prog_distcc_servers=yes |
| 1749 |
|
else |
| 1750 |
|
ncbi_cv_prog_distcc_servers=no |
| 1751 |
|
fi]) |
| 1752 |
|
if test "$ncbi_cv_prog_distcc_servers" = no; then |
| 1753 |
|
AS_UNSET(DISTCC) |
| 1754 |
|
fi |
| 1755 |
|
if test -n "$DISTCC" ; then |
| 1756 |
|
AC_CACHE_CHECK([whether $DISTCC is compatible with $CC], |
| 1757 |
|
ncbi_cv_prog_distcc_vs_cc, |
| 1758 |
|
[if $DISTCC $CC -c distcctest.c 2>&AS_MESSAGE_LOG_FD ; then |
| 1759 |
|
ncbi_cv_prog_distcc_vs_cc=yes |
| 1760 |
|
else |
| 1761 |
|
ncbi_cv_prog_distcc_vs_cc=no |
| 1762 |
|
fi]) |
| 1763 |
|
if test "$ncbi_cv_prog_distcc_vs_cc" = yes; then |
| 1764 |
|
CC_WRAPPER="$DISTCC $CC_WRAPPER" |
| 1765 |
|
else |
| 1766 |
|
AS_UNSET(DISTCC) |
| 1767 |
|
fi |
| 1768 |
|
fi |
| 1769 |
|
if test -n "$DISTCC" ; then |
| 1770 |
|
AC_CACHE_CHECK([whether $DISTCC is compatible with $CXX], |
| 1771 |
|
ncbi_cv_prog_distcc_vs_cxx, |
| 1772 |
|
[mv distcctest.c distcctest.cpp |
| 1773 |
|
if $DISTCC $CXX -c distcctest.cpp 2>&AS_MESSAGE_LOG_FD ; then |
| 1774 |
|
ncbi_cv_prog_distcc_vs_cxx=yes |
| 1775 |
|
else |
| 1776 |
|
ncbi_cv_prog_distcc_vs_cxx=no |
| 1777 |
|
fi]) |
| 1778 |
|
if test "$ncbi_cv_prog_distcc_vs_cxx" = yes; then |
| 1779 |
|
CXX_WRAPPER="$DISTCC $CXX_WRAPPER" |
| 1780 |
|
else |
| 1781 |
|
AS_UNSET(DISTCC) |
| 1782 |
|
fi |
| 1783 |
|
fi |
| 1784 |
|
rm -f distcctest.* |
| 1785 |
|
elif test "$with_distcc" = "yes" ; then |
| 1786 |
|
AC_MSG_WARN([distcc explicitly requested, but not found in PATH.]) |
| 1787 |
|
fi |
| 1788 |
|
fi |
| 1789 |
|
|
| 1790 |
|
if test -z "$with_ccache" -a -n "$DISTCC" -a -z "$CCACHE_DIR" ; then |
| 1791 |
|
# Using CCACHE together with DISTCC causes problems when the involved DISTCC |
| 1792 |
|
# servers share the same home dir, as in that case the caches from |
| 1793 |
|
# different servers can mix up rather badly, corrupting each other. |
| 1794 |
|
# On the other hand, most NCBI accounts have $CCACHE_DIR automatically set |
| 1795 |
|
# to a non-shared, per-machine location (such as "/tmp/.ccache-username"). |
| 1796 |
|
with_ccache="no" |
| 1797 |
|
fi |
| 1798 |
|
|
| 1799 |
|
if test "$with_ccache" != "no"; then |
| 1800 |
AC_CHECK_PROG(CCACHE, ccache, ccache, []) |
AC_CHECK_PROG(CCACHE, ccache, ccache, []) |
| 1801 |
if test -n "$CCACHE" ; then |
if test -n "$CCACHE" ; then |
| 1802 |
CC_WRAPPER="$CC_WRAPPER $CCACHE" |
if test -n "$CC_WRAPPER"; then |
| 1803 |
CXX_WRAPPER="$CXX_WRAPPER $CCACHE" |
CC_WRAPPER="CCACHE_PREFIX=$CC_WRAPPER $CCACHE" |
| 1804 |
|
else |
| 1805 |
|
CC_WRAPPER=$CCACHE |
| 1806 |
|
fi |
| 1807 |
|
if test -n "$CXX_WRAPPER"; then |
| 1808 |
|
CXX_WRAPPER="CCACHE_PREFIX=$CXX_WRAPPER $CCACHE" |
| 1809 |
|
else |
| 1810 |
|
CXX_WRAPPER=$CCACHE |
| 1811 |
|
fi |
| 1812 |
|
elif test "$with_ccache" = "yes"; then |
| 1813 |
|
AC_MSG_WARN([ccache explicitly requested, but not found in PATH.]) |
| 1814 |
|
fi |
| 1815 |
fi |
fi |
| 1816 |
|
|
| 1817 |
|
# Note the path, since syntax is version-specific.... |
| 1818 |
|
AC_PATH_PROG(TAIL, tail) |
| 1819 |
|
AC_MSG_CHECKING([whether $TAIL accepts modern syntax (-n N)]) |
| 1820 |
|
if $TAIL -n 1 config.log >/dev/null 2>&1; then |
| 1821 |
|
TAIL_N="$TAIL -n " |
| 1822 |
|
AC_MSG_RESULT(yes) |
| 1823 |
|
else |
| 1824 |
|
TAIL_N="$TAIL -" |
| 1825 |
|
AC_MSG_RESULT(no) |
| 1826 |
|
fi |
| 1827 |
|
|
| 1828 |
|
AC_PROG_EGREP |
| 1829 |
|
AC_MSG_CHECKING([how to run $EGREP quietly]) |
| 1830 |
|
if test -z "`echo foo | $EGREP -q fo+ 2>>config.log || echo $?`"; then |
| 1831 |
|
EGREP_Q="$EGREP -q" |
| 1832 |
|
elif test -z "`echo foo | $EGREP -s fo+ 2>>config.log || echo $?`"; then |
| 1833 |
|
EGREP_Q="$EGREP -s" |
| 1834 |
|
else |
| 1835 |
|
EGREP_Q=">/dev/null $EGREP" |
| 1836 |
|
fi |
| 1837 |
|
AC_MSG_RESULT($EGREP_Q) |
| 1838 |
|
|
| 1839 |
|
AC_CHECK_PROG(VALGRIND_PATH, valgrind, valgrind) |
| 1840 |
|
|
| 1841 |
|
|
| 1842 |
#### Check if "${build_root}" is defined; provide a default one |
#### Check if "${build_root}" is defined; provide a default one |
| 1843 |
if test -n "${with_build_root}" ; then |
if test -n "${with_build_root}" ; then |
| 1844 |
build_root=${with_build_root} |
build_root=${with_build_root} |
| 1845 |
fi |
fi |
| 1846 |
|
|
| 1847 |
|
### Possibly add the version to the build directory name, but preseve |
| 1848 |
|
### the original default when reconfiguring. |
| 1849 |
|
if test -z "${with_version}" -a -n "${ac_cv_header_stdc}"; then |
| 1850 |
|
with_version=${ncbi_cv_with_version:-no} |
| 1851 |
|
fi |
| 1852 |
if test -z "${build_root}" ; then |
if test -z "${build_root}" ; then |
| 1853 |
build_root="${srcdir}/${compiler}" |
build_root="${srcdir}/${compiler}" |
| 1854 |
case "$compiler:$with_version" in |
case "$compiler:$with_version" in |
| 1855 |
*[[0-9]]:*) ;; |
*[[0-9]]:* | *:no) ;; |
| 1856 |
*:yes) build_root=${build_root}${compiler_version} ;; |
*) build_root=${build_root}${compiler_version} ;; |
| 1857 |
esac |
esac |
| 1858 |
|
ncbi_cv_with_version=${with_version:-yes} |
| 1859 |
else |
else |
| 1860 |
: ${with_suffix:="no"} |
: ${with_suffix:="no"} |
| 1861 |
fi |
fi |
| 1862 |
|
|
| 1863 |
|
|
| 1864 |
#### Release/Debug |
#### Release/Debug |
| 1865 |
if test "$with_debug" = "no" ; then |
case "${with_debug}:${with_optimization}" in |
| 1866 |
release_debug="Release" |
no:*) |
| 1867 |
|
release_debug=Release |
| 1868 |
|
DEBUG_SFX=Release |
| 1869 |
D_SFX= |
D_SFX= |
| 1870 |
else |
;; |
| 1871 |
release_debug="Debug" |
yes:yes | :yes) |
| 1872 |
|
release_debug=DebugOpt |
| 1873 |
|
DEBUG_SFX=Debug |
| 1874 |
D_SFX=d |
D_SFX=d |
| 1875 |
fi |
;; |
| 1876 |
DEBUG_SFX=${release_debug} |
*) |
| 1877 |
|
release_debug=Debug |
| 1878 |
|
DEBUG_SFX=Debug |
| 1879 |
|
D_SFX=d |
| 1880 |
|
;; |
| 1881 |
|
esac |
| 1882 |
|
|
| 1883 |
|
|
| 1884 |
#### Profiling; try to turn on both function weight and basic-block counting |
#### Profiling; try to turn on both function weight and basic-block counting |
| 1886 |
prof_sfx="Prof" |
prof_sfx="Prof" |
| 1887 |
case "$compiler" in |
case "$compiler" in |
| 1888 |
Compaq) PFFLAGS="-pg" ;; |
Compaq) PFFLAGS="-pg" ;; |
| 1889 |
GCC) PFFLAGS="-pg -fprofile-arcs" ;; |
GCC) PFFLAGS="-pg" ;; |
| 1890 |
ICC) PFFLAGS="-p" ;; |
ICC) PFFLAGS="-p" ;; |
| 1891 |
KCC) PFFLAGS="-pg" ;; |
KCC) PFFLAGS="-pg" ;; |
| 1892 |
MIPSpro73) PFFLAGS="" ;; # pixie(1) adds info at runtime |
MIPSpro73) PFFLAGS="" ;; # pixie(1) adds info at runtime |
| 1904 |
fi |
fi |
| 1905 |
|
|
| 1906 |
|
|
| 1907 |
|
### Should go before any test compiler runs |
| 1908 |
|
AC_GNU_SOURCE |
| 1909 |
|
|
| 1910 |
|
#### Determine whether this is implicitly a 64-bit platform |
| 1911 |
|
AC_TYPE_SIZE_T |
| 1912 |
|
if test "${with_universal-no}" = "no"; then |
| 1913 |
|
AC_CHECK_SIZEOF(size_t) |
| 1914 |
|
NCBI_PLATFORM_BITS=`expr 8 \* $ac_cv_sizeof_size_t` |
| 1915 |
|
AC_DEFINE_UNQUOTED(NCBI_PLATFORM_BITS, $NCBI_PLATFORM_BITS, |
| 1916 |
|
[Define to the architecture size.]) |
| 1917 |
|
if test $NCBI_PLATFORM_BITS -eq 64; then |
| 1918 |
|
bit64_sfx=64 |
| 1919 |
|
fi |
| 1920 |
|
fi |
| 1921 |
|
|
| 1922 |
|
|
| 1923 |
|
### Intel Thread Checker |
| 1924 |
|
if test "${with_tcheck-no}" != "no" ; then |
| 1925 |
|
if test "${release_debug}${mt_sfx}" != "DebugMT" ; then |
| 1926 |
|
AC_MSG_WARN([--with-tcheck is most likely to be effective in DebugMT builds.]) |
| 1927 |
|
fi |
| 1928 |
|
if test "$compiler" = "ICC"; then |
| 1929 |
|
case "$bit64_sfx" in |
| 1930 |
|
64) tcbin=bin/32e ;; |
| 1931 |
|
* ) tcbin=bin/32 ;; |
| 1932 |
|
esac |
| 1933 |
|
if test "$with_tcheck" != yes; then |
| 1934 |
|
TCHECK_BIN=$with_tcheck/$tcbin |
| 1935 |
|
fi |
| 1936 |
|
AC_PATH_PROG(TCHECK_CL, tcheck_cl, [], $TCHECK_BIN:$PATH:/opt/intel/itt/$tcbin:/usr/local/intel/itt-3.1/tcheck/$tcbin) |
| 1937 |
|
if test -n "$TCHECK_CL"; then |
| 1938 |
|
CFLAGS="$CFLAGS -tcheck -O0" |
| 1939 |
|
CXXFLAGS="$CXXFLAGS -tcheck -O0" |
| 1940 |
|
LDFLAGS="$LDFLAGS -tcheck -O0 -L`dirname $TCHECK_CL`" |
| 1941 |
|
fi |
| 1942 |
|
fi |
| 1943 |
|
CPPFLAGS="$CPPFLAGS -DNCBI_TCHECK" |
| 1944 |
|
fi |
| 1945 |
|
|
| 1946 |
|
|
| 1947 |
#### Add "Release"/"Debug", "MT", "DLL", "64", "_p" suffixes to "${build_root}" |
#### Add "Release"/"Debug", "MT", "DLL", "64", "_p" suffixes to "${build_root}" |
| 1948 |
if test "$with_suffix" != "no" ; then |
if test "$with_suffix" != "no" ; then |
| 1949 |
build_root="${build_root}-${release_debug}${mt_sfx}${dll_sfx}${bit64_sfx}${prof_sfx}" |
build_root="${build_root}-${release_debug}${mt_sfx}${dll_sfx}${bit64_sfx}${prof_sfx}" |
| 1955 |
build_root="${build_root}--${host}" |
build_root="${build_root}--${host}" |
| 1956 |
fi |
fi |
| 1957 |
|
|
| 1958 |
|
if test -n "$with_build_root_sfx" ; then |
| 1959 |
|
build_root=$build_root$with_build_root_sfx |
| 1960 |
|
fi |
| 1961 |
|
|
| 1962 |
|
case "$host_os" in |
| 1963 |
|
linux*) |
| 1964 |
|
kver=`uname -r | sed -e 's/-.*//'` |
| 1965 |
|
libcver=`ldd --version | awk 'NR == 1 { print $NF }'` |
| 1966 |
|
verbose_host=$host_cpu-$host_vendor-linux$kver-gnu$libcver |
| 1967 |
|
;; |
| 1968 |
|
*) verbose_host=$host ;; |
| 1969 |
|
esac |
| 1970 |
|
|
| 1971 |
#### Overall configuration mode summary |
#### Overall configuration mode summary |
| 1972 |
signature="${compiler}_${compiler_version}-${release_debug}${mt_sfx}${dll_sfx}${bit64_sfx}${prof_sfx}--${host}-`(hostname || uname -n) 2>/dev/null | sed 1q`" |
signature="${compiler}_${compiler_version}-${release_debug}${mt_sfx}${dll_sfx}${bit64_sfx}${prof_sfx}--${verbose_host}-`(hostname || uname -n) 2>/dev/null | sed 1q`" |
| 1973 |
|
AC_DEFINE_UNQUOTED(NCBI_SIGNATURE, "$signature", |
| 1974 |
|
[Build signature: compiler-name '_' compiler-version '-' configuration |
| 1975 |
|
'--' platform-name '-' hostname]) |
| 1976 |
|
|
| 1977 |
|
|
| 1978 |
#### Check if there is "${build_root}" dir |
#### Check if there is "${build_root}" dir |
| 1979 |
test -d "${build_root}" || mkdir -p "${build_root}" |
test -d "${build_root}" || mkdir -p "${build_root}" |
| 1980 |
|
test -d "${build_root}" || AC_MSG_ERROR([Couldn't create ${build_root}]) |
| 1981 |
|
|
| 1982 |
|
#### Try to find a version of pwd that yields /net paths. |
| 1983 |
|
AC_PATH_PROG(AMQ, amq, [], $PATH:/usr/sbin:/sbin) |
| 1984 |
|
case "$AMQ" in |
| 1985 |
|
*/amq) |
| 1986 |
|
AC_CACHE_CHECK([whether $AMQ -w works], ncbi_cv_prog_amq_w, |
| 1987 |
|
[if $AMQ -w >/dev/null 2>&1; then |
| 1988 |
|
ncbi_cv_prog_amq_w=yes |
| 1989 |
|
else |
| 1990 |
|
ncbi_cv_prog_amq_w=no |
| 1991 |
|
fi]) |
| 1992 |
|
if test "$ncbi_cv_prog_amq_w" = yes; then |
| 1993 |
|
smart_pwd="$AMQ -w" |
| 1994 |
|
else |
| 1995 |
|
smart_pwd=pwd |
| 1996 |
|
fi |
| 1997 |
|
;; |
| 1998 |
|
*) |
| 1999 |
|
smart_pwd=pwd |
| 2000 |
|
;; |
| 2001 |
|
esac |
| 2002 |
|
|
| 2003 |
#### Make "build_root" absolute |
#### Make "build_root" absolute |
| 2004 |
case "${build_root}" in |
case "${build_root}" in |
| 2009 |
then |
then |
| 2010 |
build_root="$PWD" |
build_root="$PWD" |
| 2011 |
else |
else |
| 2012 |
build_root="`(cd ${build_root}; pwd)`" |
NCBI_FIX_DIR(build_root) |
| 2013 |
fi |
fi |
| 2014 |
;; |
;; |
| 2015 |
* ) build_root="`(cd ${build_root}; pwd)`" ;; |
* ) NCBI_FIX_DIR(build_root) ;; |
| 2016 |
esac |
esac |
| 2017 |
|
if test -n "$with_fake_root"; then |
| 2018 |
|
build_root=$with_fake_root/`basename $build_root` |
| 2019 |
|
fi |
| 2020 |
|
|
| 2021 |
|
|
| 2022 |
#### Set runpath (may depend on build root) |
#### Set runpath (may depend on build root) |
| 2037 |
pure_runpath= |
pure_runpath= |
| 2038 |
elif test -n "$with_runpath" -a "$with_runpath" != "yes" ; then |
elif test -n "$with_runpath" -a "$with_runpath" != "yes" ; then |
| 2039 |
root_base=`basename $build_root` |
root_base=`basename $build_root` |
| 2040 |
pure_runpath=`echo ${with_runpath} | sed s/{}/$root_base/` |
pure_runpath=`echo ${with_runpath} | sed s/{}/$root_base/g` |
| 2041 |
runpath="${CONF_f_runpath}${pure_runpath}" |
runpath="${CONF_f_runpath}${pure_runpath}" |
| 2042 |
case "$host_os:$compiler" in |
case "$host_os:$compiler" in |
| 2043 |
darwin* ) |
darwin* ) |
| 2045 |
# harmless elsewhere, since it only affects projects that indirectly |
# harmless elsewhere, since it only affects projects that indirectly |
| 2046 |
# need one of these libraries. (There seems to be no general |
# need one of these libraries. (There seems to be no general |
| 2047 |
# equivalent of -rpath-link.) |
# equivalent of -rpath-link.) |
| 2048 |
for l in dbapi_driver gui_utils; do |
for l in dbapi_driver gui_utils ncbi_xloader_genbank ncbi_xreader \ |
| 2049 |
|
ncbi_xreader_id1 ncbi_xreader_pubseqos; do |
| 2050 |
ll=lib$l.dylib |
ll=lib$l.dylib |
| 2051 |
LDFLAGS="$LDFLAGS -dylib_file ${pure_runpath}/$ll:\$(libdir)/$ll" |
LDFLAGS="$LDFLAGS -dylib_file ${pure_runpath}/$ll:\$(libdir)/$ll" |
| 2052 |
done |
done |
| 2056 |
runpath="$runpath -Wl,-rpath-link,\$(libdir)" |
runpath="$runpath -Wl,-rpath-link,\$(libdir)" |
| 2057 |
fi |
fi |
| 2058 |
;; |
;; |
| 2059 |
|
*:ICC ) |
| 2060 |
|
runpath="$runpath -Xlinker -rpath-link -Xlinker \$(libdir)" |
| 2061 |
|
;; |
| 2062 |
esac |
esac |
| 2063 |
elif test "$with_runpath" = "yes" -o "$with_dll" != "no" ; then |
elif test "$with_runpath" = "yes" -o "$with_dll" != "no" ; then |
| 2064 |
runpath="${CONF_f_runpath}\$(libdir)" |
runpath="${CONF_f_runpath}\$(libdir)" |
| 2076 |
|
|
| 2077 |
#### Linker command-line to build DLL (may depend on runpath) |
#### Linker command-line to build DLL (may depend on runpath) |
| 2078 |
has_dll_loadable="@# " |
has_dll_loadable="@# " |
| 2079 |
|
ALLOW_UNDEF= |
| 2080 |
|
FORBID_UNDEF= |
| 2081 |
case "$compiler" in |
case "$compiler" in |
| 2082 |
GCC | MIPSpro73 | ICC | Compaq ) |
GCC | ICC ) |
| 2083 |
|
LINK_DLL="$LINK $ARCH_CFLAGS -shared -o" # possibly overridden below |
| 2084 |
case "$host_os" in |
case "$host_os" in |
| 2085 |
solaris* ) |
solaris* ) |
| 2086 |
# See http://realm.progsoc.uts.edu.au/~subtle/solaris28_link.html |
# See http://realm.progsoc.uts.edu.au/~subtle/solaris28_link.html |
| 2087 |
LINK_DLL="$LINK $ARCH_CFLAGS -shared -mimpure-text -o" |
LINK_DLL="$LINK $ARCH_CFLAGS -shared -mimpure-text -o" |
| 2088 |
|
FORBID_UNDEF="-Wl,-z,defs" |
| 2089 |
;; |
;; |
| 2090 |
darwin* ) |
darwin* ) |
| 2091 |
# There is a distinction between shared libraries (dylibs) |
# There is a distinction between shared libraries (dylibs) |
| 2093 |
# See <http://fink.sourceforge.net/doc/porting/shared.php>. |
# See <http://fink.sourceforge.net/doc/porting/shared.php>. |
| 2094 |
has_dll_loadable="" |
has_dll_loadable="" |
| 2095 |
if $CXX -v 2>&1 | grep -q Apple; then |
if $CXX -v 2>&1 | grep -q Apple; then |
| 2096 |
LINK_DLL="$LINK $ARCH_CFLAGS -dynamiclib -flat_namespace -undefined suppress -install_name ${pure_runpath%%:*}/\$(XDLL) -o" |
LINK_DLL="$LINK $ARCH_CFLAGS -dynamiclib -install_name ${pure_runpath%%:*}/\$(XDLL) -o" |
| 2097 |
LINK_LOADABLE="$LINK $ARCH_CFLAGS -bundle -flat_namespace -undefined suppress -o" |
LINK_LOADABLE="$LINK $ARCH_CFLAGS -bundle -o" |
| 2098 |
else |
ALLOW_UNDEF='-undefined suppress' |
| 2099 |
LINK_DLL="$CC $ARCH_CFLAGS -nostartfiles -Wl,-dynamic -Wl,-flat_namespace -Wl,-undefined,suppress -install_name ${pure_runpath%%:*}/\$(XDLL) -o" |
FORBID_UNDEF='-undefined error' |
| 2100 |
LINK_LOADABLE="$CC $ARCH_CFLAGS -nostartfiles -Wl,-dynamic -Wl,-bundle -Wl,-flat_namespace -Wl,-undefined,suppress -Wl,-read_only_relocs,warning -lbundle1.o -o" |
else |
| 2101 |
|
LINK_DLL="$CC $ARCH_CFLAGS -nostartfiles -Wl,-dynamic -install_name ${pure_runpath%%:*}/\$(XDLL) -o" |
| 2102 |
|
LINK_LOADABLE="$CC $ARCH_CFLAGS -nostartfiles -Wl,-dynamic -Wl,-bundle -Wl,-read_only_relocs,warning -lbundle1.o -o" |
| 2103 |
|
ALLOW_UNDEF='-Wl,-undefined,suppress' |
| 2104 |
|
FORBID_UNDEF='-Wl,-undefined,error' |
| 2105 |
fi |
fi |
| 2106 |
;; |
;; |
| 2107 |
|
linux* | *gnu* ) # | *bsd* |
| 2108 |
|
case "$compiler:$compiler_version" in |
| 2109 |
|
ICC:9* | ICC:1??? ) |
| 2110 |
|
ncbi_cv_prog_cc_wl_no_asu=no |
| 2111 |
|
LIBS="$LIBS -lc" |
| 2112 |
|
C_LIBS="$C_LIBS -lc" |
| 2113 |
|
;; |
| 2114 |
|
ICC:* ) |
| 2115 |
|
;; |
| 2116 |
* ) |
* ) |
| 2117 |
LINK_DLL="$LINK $ARCH_CFLAGS -shared -o" |
FORBID_UNDEF='-Wl,--no-undefined' |
| 2118 |
;; |
;; |
| 2119 |
esac |
esac |
| 2120 |
;; |
;; |
| 2121 |
|
irix* ) |
| 2122 |
|
FORBID_UNDEF='-Wl,-no_unresolved' |
| 2123 |
|
;; |
| 2124 |
|
osf* ) |
| 2125 |
|
ALLOW_UNDEF='-Wl,-expect_unresolved,\*' |
| 2126 |
|
FORBID_UNDEF='-Wl,-error_unresolved' |
| 2127 |
|
;; |
| 2128 |
|
esac |
| 2129 |
|
AC_CACHE_CHECK([whether $CC supports -Wl,--no-allow-shlib-undefined], |
| 2130 |
|
ncbi_cv_prog_cc_wl_no_asu, |
| 2131 |
|
[orig_LDFLAGS=$LDFLAGS |
| 2132 |
|
LDFLAGS="$CXXFLAGS_DLL -shared -Wl,--no-allow-shlib-undefined $LDFLAGS" |
| 2133 |
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], |
| 2134 |
|
[ncbi_cv_prog_cc_wl_no_asu=yes], [ncbi_cv_prog_cc_wl_no_asu=no]) |
| 2135 |
|
LDFLAGS=$orig_LDFLAGS]) |
| 2136 |
|
if test "$ncbi_cv_prog_cc_wl_no_asu" = yes; then |
| 2137 |
|
FORBID_UNDEF="$FORBID_UNDEF -Wl,--no-allow-shlib-undefined" |
| 2138 |
|
fi |
| 2139 |
|
;; |
| 2140 |
|
MIPSpro73 ) |
| 2141 |
|
LINK_DLL="$LINK $ARCH_CFLAGS -shared -o" |
| 2142 |
|
FORBID_UNDEF="-no_unresolved" |
| 2143 |
|
;; |
| 2144 |
|
Compaq ) |
| 2145 |
|
LINK_DLL="$LINK $ARCH_CFLAGS -shared -o" |
| 2146 |
|
ALLOW_UNDEF='-expect_unresolved \*' |
| 2147 |
|
FORBID_UNDEF='-error_unresolved' |
| 2148 |
|
;; |
| 2149 |
WorkShop* ) |
WorkShop* ) |
| 2150 |
LINK_DLL="$LINK $ARCH_CFLAGS $MT_FLAG -G -h \$@ -o" |
LINK_DLL="$LINK $ARCH_CFLAGS $MT_FLAG -G -h \$(XDLL) -o" |
| 2151 |
|
FORBID_UNDEF="-z defs" |
| 2152 |
;; |
;; |
| 2153 |
KCC ) |
KCC ) |
| 2154 |
LINK_DLL="$LINK $ARCH_CFLAGS $MT_FLAG --soname \$@ -o" |
LINK_DLL="$LINK $ARCH_CFLAGS $MT_FLAG --soname \$(XDLL) -o" |
| 2155 |
|
FORBID_UNDEF="-z defs" |
| 2156 |
|
;; |
| 2157 |
|
VisualAge ) |
| 2158 |
|
# NOTE: --without-dll still recommended, as the linker doesn't seem |
| 2159 |
|
# to support building shared libraries with undefined symbols. |
| 2160 |
|
LINK_DLL="$LINK $ARCH_CFLAGS $MT_FLAG -qmkshrobj -o" |
| 2161 |
|
# ALLOW_UNDEF="???" |
| 2162 |
;; |
;; |
| 2163 |
* ) |
* ) |
| 2164 |
if test "$with_dll" = "yes" && test -z "$LINK_DLL" ; then |
if test "$with_dll" = "yes" && test -z "$LINK_DLL" ; then |
| 2165 |
AC_MSG_ERROR(["Do not know how to build DLLs with compiler $CXX $compiler_ver"]) |
AC_MSG_ERROR([Do not know how to build DLLs with compiler $CXX $compiler_ver]) |
| 2166 |
|
elif test -z "$LINK_DLL"; then |
| 2167 |
|
with_dll=no |
| 2168 |
fi |
fi |
| 2169 |
;; |
;; |
| 2170 |
esac |
esac |
| 2171 |
|
|
| 2172 |
|
if test "$with_dll" = "no"; then # no DLLs whatsoever! |
| 2173 |
|
DLL= |
| 2174 |
|
FORCE_STATIC_LIB="LIB_OR_DLL = lib" |
| 2175 |
|
APP_LIB_SETTING='$(STATIC_LIB)' |
| 2176 |
|
APP_LIBS_SETTING='$(STATIC_LIBS)' |
| 2177 |
|
else |
| 2178 |
|
FORCE_STATIC_LIB= |
| 2179 |
|
APP_LIB_SETTING='$(LIB)' |
| 2180 |
|
APP_LIBS_SETTING='$(LIBS)' |
| 2181 |
|
NCBI_FEATURE(DLL) |
| 2182 |
|
# Some shared libraries end up containing static libraries, so make |
| 2183 |
|
# sure to use DLL flags for both on platforms where such inclusion |
| 2184 |
|
# would otherwise be illegal.... |
| 2185 |
|
case "$host_os:$host_cpu:$bit64_sfx" in |
| 2186 |
|
# linux*:*86:*) ;; |
| 2187 |
|
linux* | darwin* | solaris*:64 ) |
| 2188 |
|
CFLAGS="$CFLAGS $CFLAGS_DLL" |
| 2189 |
|
CFLAGS_DLL= |
| 2190 |
|
CXXFLAGS="$CXXFLAGS $CXXFLAGS_DLL" |
| 2191 |
|
CXXFLAGS_DLL= |
| 2192 |
|
;; |
| 2193 |
|
esac |
| 2194 |
|
AC_DEFINE(NCBI_DLL_SUPPORT, 1, |
| 2195 |
|
[Define to 1 if building dynamic libraries at all |
| 2196 |
|
(albeit not necessarily by default).]) |
| 2197 |
|
if test "$with_dll" = "yes"; then |
| 2198 |
|
NCBI_FEATURE(DLL_BUILD) |
| 2199 |
|
AC_DEFINE(NCBI_DLL_BUILD, 1, |
| 2200 |
|
[Define to 1 if building dynamic libraries by default.]) |
| 2201 |
|
: ${with_plugin_auto_load=yes} |
| 2202 |
|
fi |
| 2203 |
|
fi |
| 2204 |
|
|
| 2205 |
|
if test "$with_plugin_auto_load" = yes; then |
| 2206 |
|
AC_DEFINE(NCBI_PLUGIN_AUTO_LOAD, 1, |
| 2207 |
|
[Define to 1 if the plugin manager should load DLLs by default.]) |
| 2208 |
|
fi |
| 2209 |
|
|
| 2210 |
|
# Make sure we have commands for both C and C++ preprocessors |
| 2211 |
|
AC_PROG_CPP |
| 2212 |
|
dnl AC_PROG_CXXCPP |
| 2213 |
|
|
| 2214 |
|
|
| 2215 |
#### Make "srcdir" absolute |
#### Make "srcdir" absolute |
| 2216 |
case "${srcdir}" in |
case "${srcdir}" in |
| 2221 |
then |
then |
| 2222 |
srcdir="$PWD" |
srcdir="$PWD" |
| 2223 |
else |
else |
| 2224 |
srcdir="`(cd ${srcdir}; pwd)`" |
NCBI_FIX_DIR(srcdir) |
| 2225 |
fi |
fi |
| 2226 |
;; |
;; |
| 2227 |
* ) srcdir="`(cd ${srcdir}; pwd)`" ;; |
* ) NCBI_FIX_DIR(srcdir) ;; |
| 2228 |
esac |
esac |
| 2229 |
|
real_srcdir=$srcdir |
| 2230 |
|
if test -n "$with_fake_root"; then |
| 2231 |
|
srcdir=$build_root/.. |
| 2232 |
|
fi |
| 2233 |
|
|
| 2234 |
|
|
| 2235 |
|
#### Ensure that all explicitly requested subtrees actually exist |
| 2236 |
|
NCBI_CHECK_SUBTREE(algo) |
| 2237 |
|
dnl NCBI_CHECK_SUBTREE(app) |
| 2238 |
|
if test "$with_app" = "no" ; then |
| 2239 |
|
NoConfProjects="$NoConfProjects app" |
| 2240 |
|
fi |
| 2241 |
|
|
| 2242 |
|
if test ! -f ${real_srcdir}/src/app/Makefile.in ; then |
| 2243 |
|
if test "${with_app-no}" != "no" ; then |
| 2244 |
|
AC_MSG_ERROR([--with-app: APP sources are missing]) |
| 2245 |
|
fi |
| 2246 |
|
with_app="no" |
| 2247 |
|
fi |
| 2248 |
|
|
| 2249 |
|
dnl NCBI_CHECK_SUBTREE(bdb) # deferred until end, as --with-bdb does double duty |
| 2250 |
|
dnl NCBI_CHECK_SUBTREE(cgi) # --without-cgi deliberately unavailable for now |
| 2251 |
|
if test -f ${real_srcdir}/src/cgi/Makefile.in -a \ |
| 2252 |
|
-d ${real_srcdir}/include/cgi; then |
| 2253 |
|
NCBI_PROJECT(cgi) |
| 2254 |
|
else |
| 2255 |
|
AC_MSG_WARN([CGI tree missing; some projects may fail to build.]) |
| 2256 |
|
fi |
| 2257 |
|
|
| 2258 |
|
NCBI_CHECK_SUBTREE(ctools) |
| 2259 |
|
NCBI_CHECK_SUBTREE(dbapi) |
| 2260 |
|
NCBI_CHECK_SUBTREE(gui) |
| 2261 |
|
NCBI_CHECK_SUBTREE(objects) |
| 2262 |
|
NCBI_CHECK_SUBTREE(serial) |
| 2263 |
|
|
| 2264 |
|
|
| 2265 |
#### Source, include, and build directories |
#### Source, include, and build directories |
| 2266 |
ncbiconf="$build_root/inc/ncbiconf.h" |
ncbiconf="$build_root/inc/ncbiconf_unix.h" |
| 2267 |
|
ncbiconf_old="$build_root/inc/ncbiconf.h" |
| 2268 |
|
if test -f "$ncbiconf_old" -a ! -f "$ncbiconf"; then |
| 2269 |
|
mv "$ncbiconf_old" "$ncbiconf" |
| 2270 |
|
fi |
| 2271 |
if test "$build_root" = "$srcdir" ; then |
if test "$build_root" = "$srcdir" ; then |
| 2272 |
builddir="$srcdir/src" |
builddir="$srcdir/src" |
| 2273 |
else |
else |
| 2284 |
if test "$no_create" != "yes" -a -f "${ncbiconf}" ; then |
if test "$no_create" != "yes" -a -f "${ncbiconf}" ; then |
| 2285 |
echo |
echo |
| 2286 |
echo "There is already a built \"${ncbiconf}\"!" |
echo "There is already a built \"${ncbiconf}\"!" |
| 2287 |
changequote(, )dnl |
NCBI_CAUTION([Do you want to re-configure in \"${builddir}\"?]) |
|
echo "Do you want to re-configure in \"${builddir}\"? [y/n]" |
|
|
changequote([, ])dnl |
|
|
read answer |
|
|
case "$answer" in |
|
|
y | Y | yes | YES ) ;; |
|
|
* ) AC_MSG_ERROR([Re-configuration has been canceled by user.]) ;; |
|
|
esac |
|
| 2288 |
echo |
echo |
| 2289 |
fi |
fi |
| 2290 |
|
|
| 2313 |
if test "$CONF_f_outexe" = " " ; then f_outexe="" ; else f_outexe="${CONF_f_outexe:=-o }" ; fi |
if test "$CONF_f_outexe" = " " ; then f_outexe="" ; else f_outexe="${CONF_f_outexe:=-o }" ; fi |
| 2314 |
|
|
| 2315 |
|
|
| 2316 |
BINCOPY="${CONFIG_SHELL} \$(top_srcdir)/scripts/if_diff.sh \"cp -p\"" |
BINCOPY="cp -p" |
| 2317 |
if test "$OSTYPE" = "darwin" -a -x /Developer/Tools/CpMac; then |
MAC_BINCOPY="/Developer/Tools/CpMac -p" |
| 2318 |
BINCOPY="${CONFIG_SHELL} \$(top_srcdir)/scripts/if_diff.sh \"/Developer/Tools/CpMac -p\"" |
if test "$with_bincopy" != "yes"; then |
|
elif test "$with_bincopy" != "yes"; then |
|
| 2319 |
AC_CACHE_CHECK([whether cross-directory hard links work], |
AC_CACHE_CHECK([whether cross-directory hard links work], |
| 2320 |
ncbi_cv_sys_xdir_ln, |
ncbi_cv_sys_xdir_ln, |
| 2321 |
[mkdir conftestdir |
[mkdir conftestdir |
| 2327 |
fi |
fi |
| 2328 |
rm -rf conftestdir conftestfile]) |
rm -rf conftestdir conftestfile]) |
| 2329 |
if test "$ncbi_cv_sys_xdir_ln" = "yes"; then |
if test "$ncbi_cv_sys_xdir_ln" = "yes"; then |
| 2330 |
BINCOPY="${CONFIG_SHELL} \$(top_srcdir)/scripts/if_diff.sh \"ln -f\"" |
BINCOPY="ln -f" |
| 2331 |
|
MAC_BINCOPY="\$(top_srcdir)/scripts/common/impl/ln_mac.sh" |
| 2332 |
fi |
fi |
| 2333 |
fi |
fi |
| 2334 |
|
ifdiff="${CONFIG_SHELL} \$(top_srcdir)/scripts/common/impl/if_diff.sh" |
| 2335 |
|
if test "$OSTYPE" = "darwin" -a -x /Developer/Tools/CpMac; then |
| 2336 |
|
BINCOPY="$ifdiff \"$MAC_BINCOPY\"" |
| 2337 |
|
else |
| 2338 |
|
BINCOPY="$ifdiff \"$BINCOPY\"" |
| 2339 |
|
fi |
| 2340 |
|
|
| 2341 |
|
|
| 2342 |
#### Manage the debug-vs.-optimization flags ("--*-debug", "--*-optimization") |
#### Manage the debug-vs.-optimization flags ("--*-debug", "--*-optimization") |
| 2347 |
CFLAGS=` echo " $CFLAGS" | sed 's/[ ]-g[0-9]*//g'` |
CFLAGS=` echo " $CFLAGS" | sed 's/[ ]-g[0-9]*//g'` |
| 2348 |
CXXFLAGS=`echo " $CXXFLAGS" | sed 's/[ ]-g[0-9]*//g'` |
CXXFLAGS=`echo " $CXXFLAGS" | sed 's/[ ]-g[0-9]*//g'` |
| 2349 |
LDFLAGS=` echo " $LDFLAGS" | sed 's/[ ]-g[0-9]*//g'` |
LDFLAGS=` echo " $LDFLAGS" | sed 's/[ ]-g[0-9]*//g'` |
| 2350 |
|
CPPFLAGS="-DNDEBUG $CPPFLAGS" |
| 2351 |
else |
else |
| 2352 |
with_optimization=${with_optimization:="no"} |
with_optimization=${with_optimization:="no"} |
| 2353 |
if echo " $CFLAGS" |grep -v >/dev/null '[ ]-g[0-9]*' ; then |
if echo " $CFLAGS" |grep -v >/dev/null '[ ]-g[0-9]*' ; then |
| 2354 |
CFLAGS="$CFLAGS -g" ; fi |
CFLAGS="$CFLAGS -g" ; fi |
| 2355 |
if echo " $CXXFLAGS" |grep -v >/dev/null '[ ]-g[0-9]*' ; then |
if echo " $CXXFLAGS" |grep -v >/dev/null '[ ]-g[0-9]*' ; then |
| 2356 |
CXXFLAGS="$CXXFLAGS -g" ; fi |
CXXFLAGS="$CXXFLAGS -g" ; fi |
| 2357 |
if test "$with_optimization" = "no" ; then |
if test "${with_tcheck=no}" = "no" ; then |
| 2358 |
CPPFLAGS="-D_DEBUG $CPPFLAGS" ; fi |
CPPFLAGS="-D_DEBUG $CPPFLAGS" |
| 2359 |
|
else |
| 2360 |
|
CPPFLAGS="-DNDEBUG $CPPFLAGS" |
| 2361 |
|
fi |
| 2362 |
if echo " $LDFLAGS" |grep -v >/dev/null '[ ]-g[0-9]*' ; |
if echo " $LDFLAGS" |grep -v >/dev/null '[ ]-g[0-9]*' ; |
| 2363 |
then LDFLAGS="$LDFLAGS -g" ; fi |
then LDFLAGS="$LDFLAGS -g" ; fi |
| 2364 |
STRIP="@:" |
STRIP="@:" |
| 2365 |
fi |
fi |
| 2366 |
|
|
| 2367 |
NOPT_CFLAGS=` echo " $CFLAGS" | sed 's/[ ]-O[0-9]*//g'` |
NOPT_CFLAGS=` echo " $CFLAGS" | sed 's/[ ]-x*O[0-9]*//g'` |
| 2368 |
NOPT_CXXFLAGS=`echo " $CXXFLAGS" | sed 's/[ ]-O[0-9]*//g'` |
NOPT_CXXFLAGS=`echo " $CXXFLAGS" | sed 's/[ ]-x*O[0-9]*//g'` |
| 2369 |
NOPT_LDFLAGS=` echo " $LDFLAGS" | sed 's/[ ]-O[0-9]*//g'` |
NOPT_LDFLAGS=` echo " $LDFLAGS" | sed 's/[ ]-x*O[0-9]*//g'` |
| 2370 |
|
if test "${with_tcheck-no}" != "no"; then |
| 2371 |
|
# Suppress warnings when building with ICC. |
| 2372 |
|
NOPT_CFLAGS="$NOPT_CFLAGS -O0" |
| 2373 |
|
NOPT_CXXFLAGS="$NOPT_CXXFLAGS -O0" |
| 2374 |
|
NOPT_LDFLAGS="$NOPT_LDFLAGS -O0" |
| 2375 |
|
fi |
| 2376 |
if test "$with_optimization" = "no" ; then |
if test "$with_optimization" = "no" ; then |
| 2377 |
CFLAGS="$NOPT_CFLAGS" |
CFLAGS="$NOPT_CFLAGS" |
| 2378 |
CXXFLAGS="$NOPT_CXXFLAGS" |
CXXFLAGS="$NOPT_CXXFLAGS" |
| 2379 |
LDFLAGS=` echo " $LDFLAGS" | sed 's/[ ]-O[0-9]*//g'` |
LDFLAGS="$NOPT_LDFLAGS" |
| 2380 |
FAST_CFLAGS="$CFLAGS" |
FAST_CFLAGS="$CFLAGS" |
| 2381 |
FAST_CXXFLAGS="$CXXFLAGS" |
FAST_CXXFLAGS="$CXXFLAGS" |
| 2382 |
FAST_LDFLAGS="$LDFLAGS" |
FAST_LDFLAGS="$LDFLAGS" |
| 2383 |
else |
else |
| 2384 |
if echo " $CFLAGS" |grep -v >/dev/null '[ ]-O[0-9]*' ; then |
if echo " $CFLAGS" |grep -v >/dev/null '[ ]-x*O[0-9]*' ; then |
| 2385 |
CFLAGS="$CFLAGS -O" ; fi |
CFLAGS="$CFLAGS -O" ; fi |
| 2386 |
if echo " $CXXFLAGS" |grep -v >/dev/null '[ ]-O[0-9]*' ; then |
if echo " $CXXFLAGS" |grep -v >/dev/null '[ ]-x*O[0-9]*' ; then |
| 2387 |
CXXFLAGS="$CXXFLAGS -O" ; fi |
CXXFLAGS="$CXXFLAGS -O" ; fi |
| 2388 |
CPPFLAGS="-DNDEBUG $CPPFLAGS" |
if echo " $LDFLAGS" |grep -v >/dev/null '[ ]-x*O[0-9]*' ; then |
|
if echo " $LDFLAGS" |grep -v >/dev/null '[ ]-O[0-9]*' ; then |
|
| 2389 |
LDFLAGS="$LDFLAGS -O" ; fi |
LDFLAGS="$LDFLAGS -O" ; fi |
| 2390 |
FAST_CFLAGS="$NOPT_CFLAGS $FAST_CFLAGS" |
FAST_CFLAGS="$NOPT_CFLAGS $FAST_CFLAGS" |
| 2391 |
FAST_CXXFLAGS="$NOPT_CXXFLAGS $FAST_CXXFLAGS" |
FAST_CXXFLAGS="$NOPT_CXXFLAGS $FAST_CXXFLAGS" |
| 2392 |
FAST_LDFLAGS="$NOPT_LDFLAGS $FAST_LDFLAGS" |
FAST_LDFLAGS="$NOPT_LDFLAGS $FAST_LDFLAGS" |
| 2393 |
fi |
fi |
|
|
|
|
if test "$with_debug" = "no" -a "$with_optimization" = "no" ; then |
|
|
CPPFLAGS="-DNDEBUG $CPPFLAGS" |
|
|
fi |
|
| 2394 |
fi |
fi |
| 2395 |
changequote([, ])dnl |
changequote([, ])dnl |
| 2396 |
|
|
| 2404 |
AC_CHECK_HEADERS(fstream fstream.h) |
AC_CHECK_HEADERS(fstream fstream.h) |
| 2405 |
AC_CHECK_HEADERS(strstream strstream.h strstrea.h) |
AC_CHECK_HEADERS(strstream strstream.h strstrea.h) |
| 2406 |
|
|
| 2407 |
AC_CHECK_HEADERS(limits) |
AC_CHECK_HEADERS(inttypes.h limits) |
| 2408 |
|
|
| 2409 |
### Check for the platform (very roughly) |
### Check for the platform (very roughly) |
| 2410 |
AC_CHECK_HEADERS(unistd.h, x_have_unistd="yes") |
AC_CHECK_HEADERS(unistd.h, x_have_unistd="yes") |
| 2413 |
if test "$x_have_windows" = "yes" -a "x$host_os" != "xcygwin32" -a "x$host_os" != "xcygwin"; then |
if test "$x_have_windows" = "yes" -a "x$host_os" != "xcygwin32" -a "x$host_os" != "xcygwin"; then |
| 2414 |
AC_DEFINE(NCBI_OS_MSWIN, 1, [Define to 1 on Windows.]) |
AC_DEFINE(NCBI_OS_MSWIN, 1, [Define to 1 on Windows.]) |
| 2415 |
AC_DEFINE(NCBI_OS, "MSWIN", [Operating system name]) |
AC_DEFINE(NCBI_OS, "MSWIN", [Operating system name]) |
| 2416 |
|
NCBI_FEATURE(MSWin) |
| 2417 |
elif test "$x_have_unistd" = "yes" ; then |
elif test "$x_have_unistd" = "yes" ; then |
| 2418 |
AC_DEFINE(NCBI_OS_UNIX, 1, [Define to 1 on Unix.]) |
AC_DEFINE(NCBI_OS_UNIX, 1, [Define to 1 on Unix.]) |
| 2419 |
AC_DEFINE(NCBI_OS, "UNIX", [Operating system name]) |
AC_DEFINE(NCBI_OS, "UNIX", [Operating system name]) |
| 2420 |
|
|
| 2421 |
UNIX_SRC='$(UNIX_SRC)' |
UNIX_SRC='$(UNIX_SRC)' |
| 2422 |
UNIX_USR_PROJ='$(UNIX_USR_PROJ)' |
UNIX_USR_PROJ='$(UNIX_USR_PROJ)' |
| 2423 |
WithFeatures="$WithFeatures unix" |
NCBI_FEATURE(unix) |
| 2424 |
|
NCBI_FEATURE(WinMain) # to accommodate a PTB-specific (ab)use of REQUIRES |
| 2425 |
|
|
| 2426 |
# Extra defines for variants we care about |
# Extra defines for variants we care about |
| 2427 |
case "$OSTYPE" in |
case "$OSTYPE" in |
| 2428 |
aix) AC_DEFINE(NCBI_OS_AIX, 1, [Define to 1 on AIX.]) ;; |
aix) |
| 2429 |
*bsd) AC_DEFINE(NCBI_OS_BSD, 1, [Define to 1 on *BSD.]) ;; |
AC_DEFINE(NCBI_OS_AIX, 1, [Define to 1 on AIX.]) |
| 2430 |
cygwin) AC_DEFINE(NCBI_OS_CYGWIN, 1, [Define to 1 on Cygwin.]) ;; |
NCBI_FEATURE(AIX) |
| 2431 |
darwin) AC_DEFINE(NCBI_OS_DARWIN, 1, [Define to 1 on Mac OS X.]) ;; |
;; |
| 2432 |
irix) AC_DEFINE(NCBI_OS_IRIX, 1, [Define to 1 on IRIX.]) ;; |
*bsd) |
| 2433 |
linux) AC_DEFINE(NCBI_OS_LINUX, 1, [Define to 1 on Linux.]) ;; |
AC_DEFINE(NCBI_OS_BSD, 1, [Define to 1 on *BSD.]) |
| 2434 |
osf) AC_DEFINE(NCBI_OS_OSF1, 1, [Define to 1 on Tru64 Unix.]) ;; |
NCBI_FEATURE(BSD) |
| 2435 |
solaris) AC_DEFINE(NCBI_OS_SOLARIS, 1, [Define to 1 on Solaris.]) ;; |
;; |
| 2436 |
|
cygwin) |
| 2437 |
|
AC_DEFINE(NCBI_OS_CYGWIN, 1, [Define to 1 on Cygwin.]) |
| 2438 |
|
NCBI_FEATURE(Cygwin) |
| 2439 |
|
if test "$with_mt" = yes; then NCBI_FEATURE(CygwinMT); fi |
| 2440 |
|
;; |
| 2441 |
|
darwin) |
| 2442 |
|
AC_DEFINE(NCBI_OS_DARWIN, 1, [Define to 1 on Mac OS X.]) |
| 2443 |
|
NCBI_FEATURE(Darwin) |
| 2444 |
|
if false; then NCBI_FEATURE(XCODE); fi |
| 2445 |
|
;; |
| 2446 |
|
irix) |
| 2447 |
|
AC_DEFINE(NCBI_OS_IRIX, 1, [Define to 1 on IRIX.]) |
| 2448 |
|
NCBI_FEATURE(IRIX) |
| 2449 |
|
;; |
| 2450 |
|
linux) |
| 2451 |
|
AC_DEFINE(NCBI_OS_LINUX, 1, [Define to 1 on Linux.]) |
| 2452 |
|
NCBI_FEATURE(Linux) |
| 2453 |
|
;; |
| 2454 |
|
osf) |
| 2455 |
|
AC_DEFINE(NCBI_OS_OSF1, 1, [Define to 1 on Tru64 Unix.]) |
| 2456 |
|
NCBI_FEATURE(OSF) |
| 2457 |
|
;; |
| 2458 |
|
solaris) |
| 2459 |
|
AC_DEFINE(NCBI_OS_SOLARIS, 1, [Define to 1 on Solaris.]) |
| 2460 |
|
NCBI_FEATURE(Solaris) |
| 2461 |
|
;; |
| 2462 |
esac |
esac |
| 2463 |
else |
else |
| 2464 |
AC_DEFINE(NCBI_OS_MAC, 1, [Define to 1 on MacOS.]) |
dnl Classic Mac OS, no longer supported; the following line is |
| 2465 |
|
dnl commented out to avoid cluttering config.h.in. |
| 2466 |
|
dnl AC_DEFINE(NCBI_OS_MAC, 1, [Define to 1 on MacOS.]) |
| 2467 |
AC_DEFINE(NCBI_OS, "MAC", [Operating system name]) |
AC_DEFINE(NCBI_OS, "MAC", [Operating system name]) |
| 2468 |
|
NCBI_FEATURE(MacOS) |
| 2469 |
fi |
fi |
| 2470 |
|
|
| 2471 |
|
case "$host_os" in |
| 2472 |
|
cygwin* | osf* ) |
| 2473 |
|
AC_DEFINE(NETDB_REENTRANT, 1, |
| 2474 |
|
[Define to 1 if the BSD-style netdb interface is reentrant.]) |
| 2475 |
|
;; |
| 2476 |
|
esac |
| 2477 |
|
|
| 2478 |
# AC_CHECK_TYPES is insufficient, as linking may still fail :-/ |
# AC_CHECK_TYPES is insufficient, as linking may still fail :-/ |
| 2479 |
AC_CACHE_CHECK([for wstring], ac_cv_type_wstring_linkable, |
AC_CACHE_CHECK([for wstring], ac_cv_type_wstring_linkable, |
| 2480 |
[AC_LINK_IFELSE([AC_LANG_PROGRAM( |
[AC_LINK_IFELSE([AC_LANG_PROGRAM( |
| 2489 |
|
|
| 2490 |
AC_CHECK_TYPES(socklen_t,,,[#include <sys/types.h> |
AC_CHECK_TYPES(socklen_t,,,[#include <sys/types.h> |
| 2491 |
#include <sys/socket.h>]) |
#include <sys/socket.h>]) |
| 2492 |
AC_CHECK_HEADERS(dlfcn.h sys/sockio.h sys/sysinfo.h) |
AC_CHECK_HEADERS(atomic.h dlfcn.h ieeefp.h poll.h sys/mount.h sys/sockio.h \ |
| 2493 |
# for FreeTDS 0.60 |
sys/statvfs.h sys/sysinfo.h sys/vfs.h) |
| 2494 |
AC_CHECK_HEADERS(arpa/inet.h malloc.h netinet/in.h sys/socket.h) |
# for FreeTDS 0.6x |
| 2495 |
|
AC_CHECK_HEADERS(arpa/inet.h errno.h malloc.h netdb.h \ |
| 2496 |
|
netinet/in.h netinet/tcp.h paths.h signal.h \ |
| 2497 |
|
sys/ioctl.h sys/select.h sys/socket.h sys/time.h wchar.h) |
| 2498 |
|
AC_HEADER_TIME |
| 2499 |
|
|
| 2500 |
### Check for some reentrant library functions (only needed in MT mode) |
## gethostbyname_r() -- 2 different variants: 5-arg (Solaris), 6-arg (Linux). |
|
|
|
|
if test "$with_mt" = "yes" ; then |
|
|
|
|
|
## gethostbyname_r() -- 3 different variants: 5-arg (Solaris), 6-arg (Linux), |
|
|
## 3-arg (OSF/1 cruft) |
|
| 2501 |
|
|
| 2502 |
AC_CACHE_CHECK([for gethostbyname_r], ncbi_cv_func_gethostbyname_r, |
AC_CACHE_CHECK([for gethostbyname_r], ncbi_cv_func_gethostbyname_r, |
| 2503 |
[ncbi_cv_func_gethostbyname_r="no" |
[ncbi_cv_func_gethostbyname_r="no" |
| 2528 |
ncbi_cv_func_gethostbyname_r="6" |
ncbi_cv_func_gethostbyname_r="6" |
| 2529 |
] |
] |
| 2530 |
) |
) |
|
fi |
|
|
if test "$ncbi_cv_func_gethostbyname_r" = "no" ; then |
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
|
|
[[#include <netdb.h>]], |
|
|
[[ |
|
|
void* dummy = (void*) &gethostbyname_r; |
|
|
int err; |
|
|
struct hostent* hp = 0; |
|
|
struct hostent_data* hdp = 0; |
|
|
err = gethostbyname_r("", hp, hdp); |
|
|
]])], |
|
|
[ |
|
|
ncbi_cv_func_gethostbyname_r="3" |
|
|
] |
|
|
) |
|
| 2531 |
fi]) |
fi]) |
| 2532 |
|
|
| 2533 |
if test "$ncbi_cv_func_gethostbyname_r" != "no" ; then |
if test "$ncbi_cv_func_gethostbyname_r" != "no" ; then |
| 2534 |
AC_DEFINE_UNQUOTED(HAVE_GETHOSTBYNAME_R, $ncbi_cv_func_gethostbyname_r, |
AC_DEFINE_UNQUOTED(HAVE_GETHOSTBYNAME_R, $ncbi_cv_func_gethostbyname_r, |
| 2535 |
[If you have the `gethostbyname_r' function, define to the number of |
[If you have the `gethostbyname_r' function, define to the number of |
| 2536 |
arguments it takes (normally 3, 5 or 6).]) |
arguments it takes (normally 5 or 6).]) |
| 2537 |
fi |
fi |
| 2538 |
|
|
| 2539 |
|
|
| 2540 |
## gethostbyaddr_r() -- 3 different variants: 7-arg (Solaris), 8-arg (Linux), |
## gethostbyaddr_r() -- 2 different variants: 7-arg (Solaris), 8-arg (Linux). |
|
## 5-arg (OSF/1 cruft) |
|
| 2541 |
|
|
| 2542 |
AC_CACHE_CHECK([for gethostbyaddr_r], ncbi_cv_func_gethostbyaddr_r, |
AC_CACHE_CHECK([for gethostbyaddr_r], ncbi_cv_func_gethostbyaddr_r, |
| 2543 |
[ncbi_cv_func_gethostbyaddr_r="no" |
[ncbi_cv_func_gethostbyaddr_r="no" |
| 2580 |
ncbi_cv_func_gethostbyaddr_r="8" |
ncbi_cv_func_gethostbyaddr_r="8" |
| 2581 |
] |
] |
| 2582 |
) |
) |
|
fi |
|
|
if test "$ncbi_cv_func_gethostbyaddr_r" = "no" ; then |
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
|
|
[[ |
|
|
#include <netdb.h> |
|
|
#include <sys/types.h> |
|
|
#include <sys/socket.h> |
|
|
]], |
|
|
[[ |
|
|
void* dummy = (void*) &gethostbyaddr_r; |
|
|
int err; |
|
|
unsigned int host; |
|
|
struct hostent* hp = 0; |
|
|
struct hostent_data* hdp = 0; |
|
|
int res = gethostbyaddr_r((char *) &host, sizeof(host), AF_INET, |
|
|
hp, hdp); |
|
|
]])], |
|
|
[ |
|
|
ncbi_cv_func_gethostbyaddr_r="5" |
|
|
] |
|
|
) |
|
| 2583 |
fi]) |
fi]) |
| 2584 |
|
|
| 2585 |
if test "$ncbi_cv_func_gethostbyaddr_r" != "no" ; then |
if test "$ncbi_cv_func_gethostbyaddr_r" != "no" ; then |
| 2586 |
AC_DEFINE_UNQUOTED(HAVE_GETHOSTBYADDR_R, $ncbi_cv_func_gethostbyaddr_r, |
AC_DEFINE_UNQUOTED(HAVE_GETHOSTBYADDR_R, $ncbi_cv_func_gethostbyaddr_r, |
| 2587 |
[If you have the `gethostbyaddr_r' function, define to the number of |
[If you have the `gethostbyaddr_r' function, define to the number of |
| 2588 |
arguments it takes (normally 5, 7 or 8).]) |
arguments it takes (normally 7 or 8).]) |
| 2589 |
fi |
fi |
| 2590 |
|
|
| 2591 |
|
|
| 2592 |
## getservbyname_r() -- 3 different variants: 5-arg (Solaris), 6-arg (Linux), |
## getservbyname_r() -- 2 different variants: 5-arg (Solaris), 6-arg (Linux). |
|
## 4-arg (OSF/1 cruft) |
|
| 2593 |
|
|
| 2594 |
AC_CACHE_CHECK([for getservbyname_r], ncbi_cv_func_getservbyname_r, |
AC_CACHE_CHECK([for getservbyname_r], ncbi_cv_func_getservbyname_r, |
| 2595 |
[ncbi_cv_func_getservbyname_r="no" |
[ncbi_cv_func_getservbyname_r="no" |
| 2620 |
ncbi_cv_func_getservbyname_r="6" |
ncbi_cv_func_getservbyname_r="6" |
| 2621 |
] |
] |
| 2622 |
) |
) |
|
fi |
|
|
if test "$ncbi_cv_func_getservbyname_r" = "no" ; then |
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
|
|
[[#include <netdb.h>]], |
|
|
[[ |
|
|
void* dummy = (void*) &getservbyname_r; |
|
|
int err; |
|
|
struct servent* sp = 0; |
|
|
struct servent_data* sdp = 0; |
|
|
err = getservbyname_r("", "", sp, sdp); |
|
|
]])], |
|
|
[ |
|
|
ncbi_cv_func_getservbyname_r="4" |
|
|
] |
|
|
) |
|
| 2623 |
fi]) |
fi]) |
| 2624 |
|
|
| 2625 |
if test "$ncbi_cv_func_getservbyname_r" != "no" ; then |
if test "$ncbi_cv_func_getservbyname_r" != "no" ; then |
| 2626 |
AC_DEFINE_UNQUOTED(HAVE_GETSERVBYNAME_R, $ncbi_cv_func_getservbyname_r, |
AC_DEFINE_UNQUOTED(HAVE_GETSERVBYNAME_R, $ncbi_cv_func_getservbyname_r, |
| 2627 |
[If you have the `getservbyname_r' function, define to the number of |
[If you have the `getservbyname_r' function, define to the number of |
| 2628 |
arguments it takes (normally 4, 5 or 6).]) |
arguments it takes (normally 5 or 6).]) |
| 2629 |
fi |
fi |
| 2630 |
|
|
| 2631 |
|
## getpwuid_r() -- 2 major variants: 4-arg, 5-arg (POSIX). |
| 2632 |
|
## (Alternate 4-arg interface ignored due to rarity.) |
| 2633 |
|
|
| 2634 |
AC_CHECK_FUNCS(localtime_r pthread_setconcurrency pthread_atfork) |
AC_CACHE_CHECK([for getpwuid_r], ncbi_cv_func_getpwuid_r, |
| 2635 |
|
[ncbi_cv_func_getpwuid_r="no" |
| 2636 |
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 2637 |
|
[[#include <unistd.h> |
| 2638 |
|
#include <pwd.h>]], |
| 2639 |
|
[[struct passwd bpw; |
| 2640 |
|
char buf[1024]; |
| 2641 |
|
char *dir = getpwuid_r(getuid(), &bpw, buf, sizeof(buf))->pw_dir; |
| 2642 |
|
]])], |
| 2643 |
|
[ncbi_cv_func_getpwuid_r=4]) |
| 2644 |
|
if test "$ncbi_cv_func_getpwuid_r" = "no" ; then |
| 2645 |
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 2646 |
|
[[#include <unistd.h> |
| 2647 |
|
#include <pwd.h>]], |
| 2648 |
|
[[struct passwd *pw, bpw; |
| 2649 |
|
char buf[1024]; |
| 2650 |
|
getpwuid_r(getuid(), &bpw, buf, sizeof(buf), &pw); |
| 2651 |
|
]])], |
| 2652 |
|
[ncbi_cv_func_getpwuid_r=5]) |
| 2653 |
|
fi]) |
| 2654 |
|
|
| 2655 |
AC_SEARCH_LIBS(sched_yield, rt, |
if test "$ncbi_cv_func_getpwuid_r" != "no" ; then |
| 2656 |
AC_DEFINE(HAVE_SCHED_YIELD, 1, |
AC_DEFINE_UNQUOTED(NCBI_HAVE_GETPWUID_R, $ncbi_cv_func_getpwuid_r, |
| 2657 |
[Define to 1 if you have the `sched_yield' function.]) |
[If you have the `getpwuid_r' function, define to the number of |
| 2658 |
) |
arguments it takes (normally 4 or 5).]) |
| 2659 |
|
fi |
| 2660 |
|
|
| 2661 |
|
# Perform a full-fledged check in C++ to be sure of an actual declaration. |
| 2662 |
|
# Accommodate the old Solaris interface that returns char* rather than int. :-/ |
| 2663 |
|
AC_CACHE_CHECK([for getlogin_r], ncbi_cv_func_getlogin_r, |
| 2664 |
|
[ncbi_cv_func_getlogin_r="no" |
| 2665 |
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 2666 |
|
[[#include <unistd.h>]], |
| 2667 |
|
[[char buf[64]; /* return */ getlogin_r(buf, 64);]])], |
| 2668 |
|
[ncbi_cv_func_getlogin_r=yes], [ncbi_cv_func_getlogin_r=no])]) |
| 2669 |
|
if test $ncbi_cv_func_getlogin_r = yes; then |
| 2670 |
|
AC_DEFINE(HAVE_GETLOGIN_R, 1, |
| 2671 |
|
[Define to 1 if you have the `getlogin_r' function]) |
| 2672 |
|
fi |
| 2673 |
|
|
| 2674 |
|
AC_LANG_PUSH(C) |
| 2675 |
|
# some of these can lose in C++ due to the way autoconf works |
| 2676 |
|
AC_CHECK_FUNCS(localtime_r pthread_setconcurrency pthread_atfork) |
| 2677 |
|
if test "$ac_cv_func_localtime_r" = "yes" ; then |
| 2678 |
|
AC_CACHE_CHECK(return type of localtime_r, ac_cv_func_which_localtime_r, |
| 2679 |
|
[AC_COMPILE_IFELSE( |
| 2680 |
|
[AC_LANG_PROGRAM( |
| 2681 |
|
[[#include <unistd.h> |
| 2682 |
|
#include <time.h>]], |
| 2683 |
|
[[struct tm mytm; |
| 2684 |
|
time_t t; |
| 2685 |
|
int y = localtime_r(&t, &mytm)->tm_year;]])], |
| 2686 |
|
ac_cv_func_which_localtime_r=struct, |
| 2687 |
|
ac_cv_func_which_localtime_r=int)]) |
| 2688 |
|
if test $ac_cv_func_which_localtime_r = struct; then |
| 2689 |
|
AC_DEFINE(HAVE_FUNC_LOCALTIME_R_TM, 1, |
| 2690 |
|
[Define to 1 if your localtime_r returns a struct tm*.]) |
| 2691 |
|
else |
| 2692 |
|
AC_DEFINE(HAVE_FUNC_LOCALTIME_R_INT, 1, |
| 2693 |
|
[Define to 1 if your localtime_r returns a int.]) |
| 2694 |
|
fi |
| 2695 |
|
fi |
| 2696 |
|
|
| 2697 |
|
AC_CACHE_CHECK([whether pthread mutexes are available], |
| 2698 |
|
ncbi_cv_func_pthread_mutex, |
| 2699 |
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM( |
| 2700 |
|
[[#include <pthread.h> |
| 2701 |
|
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;]], |
| 2702 |
|
[[pthread_mutex_lock(&mutex); pthread_mutex_unlock(&mutex);]])], |
| 2703 |
|
[ncbi_cv_func_pthread_mutex=yes], [ncbi_cv_func_pthread_mutex=no])]) |
| 2704 |
|
if test $ncbi_cv_func_pthread_mutex=yes; then |
| 2705 |
|
AC_DEFINE(HAVE_PTHREAD_MUTEX, 1, |
| 2706 |
|
[Define to 1 if pthread mutexes are available.]) |
| 2707 |
fi |
fi |
|
### ...reentrant versions of some standard library functions, MT functions |
|
| 2708 |
|
|
| 2709 |
|
|
| 2710 |
### Check for other standard library functions |
### Check for other standard library functions |
| 2711 |
|
|
| 2712 |
AC_LANG_PUSH(C) |
AC_FUNC_VPRINTF |
| 2713 |
# some of these can lose in C++ due to the way autoconf works |
AC_CHECK_FUNCS(euidaccess atoll basename lchown fseeko getpagesize \ |
| 2714 |
AC_CHECK_FUNCS(strcasecmp strdup sysmp timegm atoll vasprintf getpagesize) |
getpass getpassphrase getpwuid getrusage gettimeofday \ |
| 2715 |
|
getuid readpassphrase readv usleep \ |
| 2716 |
|
asprintf vasprintf vsnprintf select statfs statvfs \ |
| 2717 |
|
strcasecmp strlcat strlcpy strdup strndup strtok_r \ |
| 2718 |
|
sysmp timegm utimes lutimes writev) |
| 2719 |
AC_LANG_POP(C) |
AC_LANG_POP(C) |
| 2720 |
|
|
| 2721 |
|
AC_TYPE_SIGNAL |
| 2722 |
|
test "$ac_cv_func_select" = yes || ncbi_cv_func_select_updates_timeout=no |
| 2723 |
|
AC_CACHE_CHECK([whether select updates the timeout when interrupted], |
| 2724 |
|
ncbi_cv_func_select_updates_timeout, |
| 2725 |
|
[AC_RUN_IFELSE([AC_LANG_PROGRAM( |
| 2726 |
|
[[#include <signal.h> |
| 2727 |
|
#include <sys/types.h> |
| 2728 |
|
#ifdef HAVE_SYS_SELECT_H |
| 2729 |
|
# include <sys/select.h> |
| 2730 |
|
#endif |
| 2731 |
|
#ifdef HAVE_SYS_TIME_H |
| 2732 |
|
# include <sys/time.h> |
| 2733 |
|
#endif |
| 2734 |
|
#ifdef HAVE_UNISTD_H |
| 2735 |
|
# include <unistd.h> |
| 2736 |
|
#endif |
| 2737 |
|
RETSIGTYPE handler(int sig) { }]], |
| 2738 |
|
[[struct timeval timeout = { 5, 0 }; |
| 2739 |
|
signal(SIGALRM, &handler); |
| 2740 |
|
alarm(1); |
| 2741 |
|
select(0, NULL, NULL, NULL, &timeout); |
| 2742 |
|
return timeout.tv_sec == 5;]])], |
| 2743 |
|
[ncbi_cv_func_select_updates_timeout=yes], |
| 2744 |
|
[ncbi_cv_func_select_updates_timeout=no], |
| 2745 |
|
[case "$host_os" in |
| 2746 |
|
linux) ncbi_cv_func_select_updates_timeout=yes ;; |
| 2747 |
|
*) ncbi_cv_func_select_updates_timeout=no ;; |
| 2748 |
|
esac])]) |
| 2749 |
|
if test "$ncbi_cv_func_select_updates_timeout" = yes; then |
| 2750 |
|
AC_DEFINE(SELECT_UPDATES_TIMEOUT, 1, |
| 2751 |
|
[Define to 1 if the `select' function updates its timeout when |
| 2752 |
|
interrupted by a signal.]) |
| 2753 |
|
fi |
| 2754 |
|
|
| 2755 |
|
# We want the program to return 0, which is *false* in C. Also, since |
| 2756 |
|
# use of lowercase seems to be customary if not universal, the default |
| 2757 |
|
# is yes when cross-compiling; anyone cross-compiling for exceptional |
| 2758 |
|
# platforms can set ncbi_cv_func_strcasecmp_lc=no in config.site. |
| 2759 |
|
if test "$ac_cv_func_strcasecmp" = yes; then |
| 2760 |
|
AC_CACHE_CHECK([whether strcasecmp treats letters as lowercase], |
| 2761 |
|
ncbi_cv_func_strcasecmp_lc, |
| 2762 |
|
[AC_RUN_IFELSE([AC_LANG_PROGRAM( |
| 2763 |
|
[[#include <string.h>]], |
| 2764 |
|
[[return strcasecmp("A", "_") <= 0;]])], |
| 2765 |
|
[ncbi_cv_func_strcasecmp_lc=yes], [ncbi_cv_func_strcasecmp_lc=no], |
| 2766 |
|
[ncbi_cv_func_strcasecmp_lc=yes])]) |
| 2767 |
|
if test "$ncbi_cv_func_strcasecmp_lc" = yes; then |
| 2768 |
|
AC_DEFINE(HAVE_STRCASECMP_LC, 1, |
| 2769 |
|
[Define to 1 if strcasecmp treats letters as lowercase.]) |
| 2770 |
|
fi |
| 2771 |
|
fi |
| 2772 |
|
|
| 2773 |
AC_CACHE_CHECK([for Linux-like sysinfo with 1 arg], ncbi_cv_func_sysinfo_1, |
AC_CACHE_CHECK([for Linux-like sysinfo with 1 arg], ncbi_cv_func_sysinfo_1, |
| 2774 |
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 2775 |
[[#include <sys/sysinfo.h>]], |
[[#include <sys/sysinfo.h>]], |
| 2788 |
dnl AC_FUNC_GETLOADAVG |
dnl AC_FUNC_GETLOADAVG |
| 2789 |
AC_CHECK_FUNCS(getloadavg) |
AC_CHECK_FUNCS(getloadavg) |
| 2790 |
|
|
| 2791 |
|
## readdir_r() -- 2 different variants: 2-arg (trad. Solaris), 3-arg (POSIX). |
| 2792 |
|
|
| 2793 |
|
AC_CACHE_CHECK([for readdir_r], ncbi_cv_func_readdir_r, |
| 2794 |
|
[ncbi_cv_func_readdir_r="no" |
| 2795 |
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 2796 |
|
[[#include <dirent.h>]], |
| 2797 |
|
[[DIR* dir; struct dirent* entry; readdir_r(dir, entry, &entry);]])], |
| 2798 |
|
[ncbi_cv_func_readdir_r=3]) |
| 2799 |
|
if test "$ncbi_cv_func_readdir_r" = "no" ; then |
| 2800 |
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 2801 |
|
[[#include <dirent.h>]], |
| 2802 |
|
[[DIR* dir; struct dirent* entry; readdir_r(dir, entry);]])], |
| 2803 |
|
[ncbi_cv_func_readdir_r=2]) |
| 2804 |
|
fi]) |
| 2805 |
|
|
| 2806 |
|
if test "$ncbi_cv_func_readdir_r" != "no" ; then |
| 2807 |
|
AC_DEFINE_UNQUOTED(NCBI_HAVE_READDIR_R, $ncbi_cv_func_readdir_r, |
| 2808 |
|
[If you have the `readdir_r' function, define to the number of |
| 2809 |
|
arguments it takes (normally 2 or 3).]) |
| 2810 |
|
fi |
| 2811 |
|
|
| 2812 |
### Check for typedefs, structures, and compiler features. |
### Check for typedefs, structures, and compiler features. |
| 2813 |
AC_C_CONST |
AC_C_CONST |
|
AC_TYPE_SIZE_T |
|
| 2814 |
|
|
| 2815 |
### Check for C standard types and sizes |
### Check for C standard types and sizes |
| 2816 |
|
if test "${with_universal-no}" = "no"; then |
| 2817 |
AC_C_BIGENDIAN |
AC_C_BIGENDIAN |
| 2818 |
AC_C_CHAR_UNSIGNED |
AC_C_CHAR_UNSIGNED |
|
AC_CHECK_SIZEOF(void*) |
|
| 2819 |
AC_CHECK_SIZEOF(char) |
AC_CHECK_SIZEOF(char) |
| 2820 |
AC_CHECK_SIZEOF(short) |
AC_CHECK_SIZEOF(double) |
| 2821 |
|
AC_CHECK_SIZEOF(float) |
| 2822 |
AC_CHECK_SIZEOF(int) |
AC_CHECK_SIZEOF(int) |
| 2823 |
AC_CHECK_SIZEOF(long) |
AC_CHECK_SIZEOF(long) |
| 2824 |
|
AC_CHECK_SIZEOF(long double) |
| 2825 |
AC_CHECK_SIZEOF(long long) |
AC_CHECK_SIZEOF(long long) |
| 2826 |
|
AC_CHECK_SIZEOF(short) |
| 2827 |
|
AC_CHECK_SIZEOF(void*) |
| 2828 |
AC_CHECK_SIZEOF(__int64) |
AC_CHECK_SIZEOF(__int64) |
| 2829 |
AC_CHECK_SIZEOF(float) |
fi |
| 2830 |
AC_CHECK_SIZEOF(double) |
AC_CHECK_TYPES([intptr_t, uintptr_t]) |
|
AC_CHECK_SIZEOF(long double) |
|
|
AC_CHECK_SIZEOF(size_t) |
|
|
NCBI_PLATFORM_BITS=`expr 8 \* $ac_cv_sizeof_size_t` |
|
|
AC_DEFINE_UNQUOTED(NCBI_PLATFORM_BITS, $NCBI_PLATFORM_BITS, |
|
|
[Define to the architecture size.]) |
|
| 2831 |
|
|
| 2832 |
AC_CHECK_MEMBER(struct sockaddr_in.sin_len, |
AC_CHECK_MEMBER(struct sockaddr_in.sin_len, |
| 2833 |
[AC_DEFINE(HAVE_SIN_LEN, 1, |
[AC_DEFINE(HAVE_SIN_LEN, 1, |
| 2835 |
[], [#include <sys/types.h> |
[], [#include <sys/types.h> |
| 2836 |
#include <netinet/in.h>]) |
#include <netinet/in.h>]) |
| 2837 |
|
|
| 2838 |
|
AC_CHECK_MEMBERS([struct tm.tm_zone, struct tm.__tm_zone], [], [], |
| 2839 |
|
[#include <time.h>]) |
| 2840 |
|
|
| 2841 |
|
|
| 2842 |
AC_CACHE_CHECK([whether function prototypes can use throw(...)], |
AC_CACHE_CHECK([whether function prototypes can use throw(...)], |
| 2843 |
ncbi_cv_cxx_throw_spec, |
ncbi_cv_cxx_throw_spec, |
| 2909 |
fi |
fi |
| 2910 |
|
|
| 2911 |
|
|
| 2912 |
AC_CACHE_CHECK([for ios(_base)::xalloc and related functions], |
AC_CACHE_CHECK([for ios(_base)::register_callback], |
| 2913 |
ncbi_cv_func_ios_xalloc, |
ncbi_cv_func_ios_register_callback, |
| 2914 |
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 2915 |
[[#include <iostream>]], |
[[#include <iostream>]], |
| 2916 |
[[std::cout.pword(std::ios::xalloc()); |
[[std::cout.register_callback(0, std::ios::erase_event);]])], |
| 2917 |
std::cout.register_callback(0, std::ios::erase_event);]])], |
[ncbi_cv_func_ios_register_callback=yes], |
| 2918 |
[ncbi_cv_func_ios_xalloc=yes], [ncbi_cv_func_ios_xalloc=no])]) |
[ncbi_cv_func_ios_register_callback=no])]) |
| 2919 |
if test "$ncbi_cv_func_ios_xalloc" = yes; then |
if test "$ncbi_cv_func_ios_register_callback" = yes; then |
| 2920 |
AC_DEFINE(HAVE_IOS_XALLOC, 1, |
AC_DEFINE(HAVE_IOS_REGISTER_CALLBACK, 1, |
| 2921 |
[Define to 1 if ios(_base)::xalloc et al. exist.]) |
[Define to 1 if you have `ios(_base)::register_callback'.]) |
| 2922 |
fi |
fi |
| 2923 |
|
|
| 2924 |
|
|
| 2966 |
fi |
fi |
| 2967 |
|
|
| 2968 |
|
|
| 2969 |
|
AC_CACHE_CHECK([for std::is_sorted<> in <algorithm>], ncbi_cv_func_is_sorted, |
| 2970 |
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 2971 |
|
[[#include <algorithm>]], |
| 2972 |
|
[[int a[2]; return std::is_sorted(a, a+2) ? 0 : 1;]])], |
| 2973 |
|
[ncbi_cv_func_is_sorted=yes], [ncbi_cv_func_is_sorted=no])]) |
| 2974 |
|
if test "$ncbi_cv_func_is_sorted" = yes; then |
| 2975 |
|
AC_DEFINE(HAVE_IS_SORTED, 1, |
| 2976 |
|
[Define to 1 if <algorithm> supplies `std::is_sorted<>'.]) |
| 2977 |
|
fi |
| 2978 |
|
|
| 2979 |
|
|
| 2980 |
|
|
| 2981 |
|
AC_CACHE_CHECK([for SysV semaphores], ncbi_cv_sys_semaphores, |
| 2982 |
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h> |
| 2983 |
|
#include <sys/sem.h>], |
| 2984 |
|
[struct sembuf buf; int id = semget(0x1234, 0, IPC_CREAT); |
| 2985 |
|
buf.sem_op = SEM_UNDO;])], |
| 2986 |
|
[ncbi_cv_sys_semaphores=yes], [ncbi_cv_sys_semaphores=no])) |
| 2987 |
|
if test "$ncbi_cv_sys_semaphores" = yes; then |
| 2988 |
|
AC_DEFINE(HAVE_SYSV_SEMAPHORES, 1, |
| 2989 |
|
[Define to 1 if you have SysV semaphores.]) |
| 2990 |
|
fi |
| 2991 |
|
|
| 2992 |
AC_CHECK_TYPE([union semun], |
AC_CHECK_TYPE([union semun], |
| 2993 |
AC_DEFINE(HAVE_SEMUN, 1, [Define to 1 if you have `union semun'.]), |
AC_DEFINE(HAVE_SEMUN, 1, [Define to 1 if you have `union semun'.]), |
| 2994 |
[], [#include <sys/sem.h>]) |
[], [#include <sys/types.h> |
| 2995 |
|
#include <sys/sem.h>]) |
| 2996 |
|
|
| 2997 |
|
|
| 2998 |
AC_CACHE_CHECK([which way the stack grows], ncbi_cv_sys_stack_dir, |
AC_CACHE_CHECK([which way the stack grows], ncbi_cv_sys_stack_dir, |
| 3006 |
down) AC_DEFINE(STACK_GROWS_DOWN, 1, [Define to 1 if the stack grows down.]);; |
down) AC_DEFINE(STACK_GROWS_DOWN, 1, [Define to 1 if the stack grows down.]);; |
| 3007 |
esac |
esac |
| 3008 |
|
|
| 3009 |
|
AC_LANG_PUSH(C) |
| 3010 |
|
|
| 3011 |
AC_CACHE_CHECK([whether the preprocessor supports C99-style variadic macros], |
AC_CACHE_CHECK([whether the preprocessor supports C99-style variadic macros], |
| 3012 |
ncbi_cv_cpp_std_varargs, |
ncbi_cv_cpp_std_varargs, |
| 3013 |
[AC_PREPROC_IFELSE( |
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 3014 |
[[#define foo(...) 1 |
[[#define foo(...) 1 |
| 3015 |
#if foo(x,y,z) != 1 |
#if foo(x,y,z) != 1 |
| 3016 |
#error failed |
#error failed |
| 3017 |
#endif]], |
#endif]], [])], |
| 3018 |
[ncbi_cv_cpp_std_varargs=yes], [ncbi_cv_cpp_std_varargs=no])]) |
[ncbi_cv_cpp_std_varargs=yes], [ncbi_cv_cpp_std_varargs=no])]) |
| 3019 |
if test "$ncbi_cv_cpp_std_varargs" = yes; then |
if test "$ncbi_cv_cpp_std_varargs" = yes; then |
| 3020 |
AC_DEFINE(HAVE_CPP_STD_VARARGS, 1, |
AC_DEFINE(HAVE_CPP_STD_VARARGS, 1, |
| 3023 |
|
|
| 3024 |
AC_CACHE_CHECK([whether the preprocessor supports GNU-style variadic macros], |
AC_CACHE_CHECK([whether the preprocessor supports GNU-style variadic macros], |
| 3025 |
ncbi_cv_cpp_gnu_varargs, |
ncbi_cv_cpp_gnu_varargs, |
| 3026 |
[AC_PREPROC_IFELSE( |
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 3027 |
[[#define foo(args...) 1 |
[[#define foo(args...) 1 |
| 3028 |
#if foo(x,y,z) != 1 |
#if foo(x,y,z) != 1 |
| 3029 |
#error failed |
#error failed |
| 3030 |
#endif]], |
#endif]], [])], |
| 3031 |
[ncbi_cv_cpp_gnu_varargs=yes], [ncbi_cv_cpp_gnu_varargs=no])]) |
[ncbi_cv_cpp_gnu_varargs=yes], [ncbi_cv_cpp_gnu_varargs=no])]) |
| 3032 |
if test "$ncbi_cv_cpp_gnu_varargs" = yes; then |
if test "$ncbi_cv_cpp_gnu_varargs" = yes; then |
| 3033 |
AC_DEFINE(HAVE_CPP_GNU_VARARGS, 1, |
AC_DEFINE(HAVE_CPP_GNU_VARARGS, 1, |
| 3034 |
[Define to 1 if the preprocessor supports GNU-style variadic macros.]) |
[Define to 1 if the preprocessor supports GNU-style variadic macros.]) |
| 3035 |
fi |
fi |
| 3036 |
|
|
| 3037 |
|
AC_LANG_POP(C) |
| 3038 |
|
|
| 3039 |
|
# Avoid using unsupported (and noisily ignored) attributes. |
| 3040 |
|
case "$compiler:$compiler_version" in |
| 3041 |
|
GCC:2* | GCC:3[[01]]* | WorkShop* ) |
| 3042 |
|
ncbi_cv_c_deprecation_syntax=none |
| 3043 |
|
ncbi_cv_c_forceinline=inline |
| 3044 |
|
;; |
| 3045 |
|
VisualAge:* ) |
| 3046 |
|
ncbi_cv_c_forceinline=inline |
| 3047 |
|
;; |
| 3048 |
|
esac |
| 3049 |
|
|
| 3050 |
|
AC_CACHE_CHECK([syntax for marking deprecated functions], |
| 3051 |
|
ncbi_cv_c_deprecation_syntax, |
| 3052 |
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 3053 |
|
[[void f(void) __attribute__((__deprecated__)); void f(void) { }]], |
| 3054 |
|
[[f();]])], |
| 3055 |
|
[ncbi_cv_c_deprecation_syntax='__attribute__((__deprecated__))'], |
| 3056 |
|
[ncbi_cv_c_deprecation_syntax=none])]) |
| 3057 |
|
depr=$ncbi_cv_c_deprecation_syntax |
| 3058 |
|
test "$depr" = "none" && depr="" |
| 3059 |
|
AC_DEFINE_UNQUOTED(NCBI_DEPRECATED, $depr, |
| 3060 |
|
[Define to whatever syntax, if any, your compiler supports for marking |
| 3061 |
|
functions as deprecated.]) |
| 3062 |
|
|
| 3063 |
|
AC_LANG_PUSH(C) |
| 3064 |
|
AC_CACHE_CHECK([how to force inlining], |
| 3065 |
|
ncbi_cv_c_forceinline, |
| 3066 |
|
[ncbi_cv_c_forceinline=no |
| 3067 |
|
for fi in forceinline __forceinline__ __forceinline __always_inline \ |
| 3068 |
|
"inline __attribute__((always_inline))" inline __inline__; do |
| 3069 |
|
test "$ncbi_cv_c_forceinline" = "no" || break |
| 3070 |
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([$fi int f(void) { return 0; }])], |
| 3071 |
|
[ncbi_cv_c_forceinline=$fi], []) |
| 3072 |
|
done]) |
| 3073 |
|
forceinline=$ncbi_cv_c_forceinline |
| 3074 |
|
test "$forceinline" = "no" && forceinline="" |
| 3075 |
|
AC_DEFINE_UNQUOTED(NCBI_FORCEINLINE, $forceinline, |
| 3076 |
|
[Define to whatever syntax your compiler supports for marking functions |
| 3077 |
|
as to be inlined even if they might not otherwise be.]) |
| 3078 |
|
|
| 3079 |
|
AC_CACHE_CHECK([whether the C compiler supports __attribute__((destructor))], |
| 3080 |
|
ncbi_cv_c_attribute_destructor, |
| 3081 |
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 3082 |
|
[[void f(void) __attribute__((destructor)); void f(void) { }]], |
| 3083 |
|
[[f();]])], |
| 3084 |
|
[ncbi_cv_c_attribute_destructor=yes], |
| 3085 |
|
[ncbi_cv_c_attribute_destructor=no])]) |
| 3086 |
|
if test $ncbi_cv_c_attribute_destructor = yes; then |
| 3087 |
|
AC_DEFINE(HAVE_ATTRIBUTE_DESTRUCTOR, 1, |
| 3088 |
|
[Define to 1 if your C compiler supports __attribute__((destructor))]) |
| 3089 |
|
fi |
| 3090 |
|
|
| 3091 |
|
case "$compiler:$compiler_version $CFLAGS $CXXFLAGS" in |
| 3092 |
|
GCC:[[4-9]]??\ *\ -fvisibility*|ICC:*\ -fvisibility* ) ;; |
| 3093 |
|
* ) ncbi_cv_c_attribute_visibility_default=unnecessary ;; |
| 3094 |
|
esac |
| 3095 |
|
|
| 3096 |
|
AC_CACHE_CHECK([whether $CC supports __attribute__((visibility("default")))], |
| 3097 |
|
ncbi_cv_c_attribute_visibility_default, |
| 3098 |
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 3099 |
|
[[__attribute__((visibility("default"))) void f(void); void f(void) {}]], |
| 3100 |
|
[[f();]])], |
| 3101 |
|
[ncbi_cv_c_attribute_visibility_default=yes], |
| 3102 |
|
[ncbi_cv_c_attribute_visibility_default=no])]) |
| 3103 |
|
if test $ncbi_cv_c_attribute_visibility_default = yes; then |
| 3104 |
|
AC_DEFINE(HAVE_ATTRIBUTE_VISIBILITY_DEFAULT, 1, |
| 3105 |
|
[Define to 1 if your compiler supports __attribute__((visibility("default")))]) |
| 3106 |
|
fi |
| 3107 |
|
|
| 3108 |
|
AC_CACHE_CHECK([whether the C compiler supports C99 restrict], |
| 3109 |
|
ncbi_cv_c_restrict, |
| 3110 |
|
[ncbi_cv_c_restrict=no |
| 3111 |
|
for restrict in restrict __restrict__ __restrict; do |
| 3112 |
|
test "$ncbi_cv_c_restrict" = "no" || break |
| 3113 |
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([void f(int * $restrict p);])], |
| 3114 |
|
[ncbi_cv_c_restrict=$restrict], []) |
| 3115 |
|
done]) |
| 3116 |
|
restrict=$ncbi_cv_c_restrict |
| 3117 |
|
test "$restrict" = "no" && restrict="" |
| 3118 |
|
AC_DEFINE_UNQUOTED(NCBI_RESTRICT_C, $restrict, |
| 3119 |
|
[Define to whatever syntax, if any, your C compiler supports for marking |
| 3120 |
|
pointers as restricted in the C99 sense.]) |
| 3121 |
|
if test -n "$restrict"; then |
| 3122 |
|
AC_DEFINE(HAVE_RESTRICT_C, 1, |
| 3123 |
|
[Define to 1 if your C compiler supports some variant of the C99 |
| 3124 |
|
`restrict' keyword.]) |
| 3125 |
|
fi |
| 3126 |
|
AC_LANG_POP(C) |
| 3127 |
|
|
| 3128 |
|
AC_CACHE_CHECK([whether the C++ compiler supports C99 restrict], |
| 3129 |
|
ncbi_cv_cxx_restrict, |
| 3130 |
|
[ncbi_cv_cxx_restrict=no |
| 3131 |
|
for restrict in restrict __restrict__ __restrict; do |
| 3132 |
|
test "$ncbi_cv_cxx_restrict" = "no" || break |
| 3133 |
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([void f(int * $restrict p);])], |
| 3134 |
|
[ncbi_cv_cxx_restrict=$restrict], []) |
| 3135 |
|
done]) |
| 3136 |
|
restrict=$ncbi_cv_cxx_restrict |
| 3137 |
|
test "$restrict" = "no" && restrict="" |
| 3138 |
|
AC_DEFINE_UNQUOTED(NCBI_RESTRICT_CXX, $restrict, |
| 3139 |
|
[Define to whatever syntax, if any, your C++ compiler supports for marking |
| 3140 |
|
pointers as restricted in the C99 sense.]) |
| 3141 |
|
if test -n "$restrict"; then |
| 3142 |
|
AC_DEFINE(HAVE_RESTRICT_CXX, 1, |
| 3143 |
|
[Define to 1 if your C++ compiler supports some variant of the C99 |
| 3144 |
|
`restrict' keyword.]) |
| 3145 |
|
fi |
| 3146 |
|
|
| 3147 |
# for FreeTDS |
# for FreeTDS |
| 3148 |
AC_CACHE_CHECK([whether FIONBIO requires BSD_COMP to be defined], |
AC_CACHE_CHECK([whether FIONBIO requires BSD_COMP to be defined], |
| 3187 |
[Define to 0xffffffff if your operating system doesn't.]) |
[Define to 0xffffffff if your operating system doesn't.]) |
| 3188 |
fi |
fi |
| 3189 |
|
|
| 3190 |
|
AC_CACHE_CHECK([whether unaligned reads are permissible], |
| 3191 |
|
ncbi_cv_sys_unaligned_reads, |
| 3192 |
|
[AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]], |
| 3193 |
|
[[ unsigned int a[2] = { 0x01234567, 0x89abcdef }; |
| 3194 |
|
fprintf(stderr, "%x\n", *(unsigned int*)((char*)a + 1)); ]])], |
| 3195 |
|
[ncbi_cv_sys_unaligned_reads=yes], |
| 3196 |
|
[ncbi_cv_sys_unaligned_reads=no], |
| 3197 |
|
[case "$host_cpu" in |
| 3198 |
|
i?86|x86_64|powerpc*|ppc*) ncbi_cv_sys_unaligned_reads=yes ;; |
| 3199 |
|
*) ncbi_cv_sys_unaligned_reads=no ;; |
| 3200 |
|
esac])]) |
| 3201 |
|
if test "$ncbi_cv_sys_unaligned_reads" = yes; then |
| 3202 |
|
AC_DEFINE(HAVE_UNALIGNED_READS, 1, |
| 3203 |
|
[Define to 1 if your system permits reading integers from |
| 3204 |
|
unaligned addresses.]) |
| 3205 |
|
fi |
| 3206 |
|
|
| 3207 |
### Check for the availability of other packages |
### Check for the availability of other packages |
| 3208 |
### -------------------------------------------- |
### -------------------------------------------- |
| 3209 |
|
|
| 3210 |
|
|
| 3211 |
|
AC_MSG_CHECKING([whether in-house NCBI resources are available]) |
| 3212 |
|
if test -n "$NCBI" -a -f "$NCBI/.ncbirc" -a -d /am/coremake_builds/test_data; \ |
| 3213 |
|
then |
| 3214 |
|
NCBI_FEATURE(in-house-resources) |
| 3215 |
|
AC_MSG_RESULT(yes) |
| 3216 |
|
else |
| 3217 |
|
AC_MSG_RESULT(no) |
| 3218 |
|
fi |
| 3219 |
|
|
| 3220 |
### Common-use system and miscellaneous libs |
### Common-use system and miscellaneous libs |
| 3221 |
if test -z "${NETWORK_LIBS+set}"; then |
if test -z "${NETWORK_LIBS+set}"; then |
| 3222 |
AC_CHECK_LIB(nsl, gethostbyname, [libnsl=-lnsl], [libnsl=]) |
AC_CHECK_LIB(nsl, gethostbyname, [libnsl=-lnsl], [libnsl=]) |
| 3223 |
AC_CHECK_LIB(socket, connect, [NETWORK_LIBS="-lsocket $libnsl"], |
AC_CHECK_LIB(socket, connect, [NETWORK_LIBS="-lsocket $libnsl"], |
| 3224 |
[NETWORK_LIBS=$libnsl]) |
[NETWORK_LIBS=$libnsl]) |
| 3225 |
fi |
fi |
| 3226 |
AC_CHECK_LIB(resolv, res_search, [RESOLVER_LIBS="-lresolv"], [RESOLVER_LIBS=]) |
AC_CACHE_CHECK([for res_search in -lresolv], ac_cv_lib_resolv_res_search, |
| 3227 |
|
[orig_LIBS=$LIBS |
| 3228 |
if test "$with_ncbi_public" = "yes" -a "$OSTYPE" = "solaris"; then |
LIBS="-lresolv $NETWORK_LIBS $orig_LIBS" |
| 3229 |
AC_MSG_NOTICE([Skipping checks for get{addr,name}info (new in Solaris 8).]) |
AC_LINK_IFELSE([AC_LANG_PROGRAM( |
| 3230 |
|
[[#include <resolv.h>]], |
| 3231 |
|
[[unsigned char ans[256]; |
| 3232 |
|
int st = res_search("foo.bar", 1, 1, ans, sizeof(ans));]])], |
| 3233 |
|
[ac_cv_lib_resolv_res_search=yes], [ac_cv_lib_resolv_res_search=no]) |
| 3234 |
|
LIBS=$orig_LIBS]) |
| 3235 |
|
if test "$ac_cv_lib_resolv_res_search" = "yes"; then |
| 3236 |
|
RESOLVER_LIBS=-lresolv |
| 3237 |
else |
else |
| 3238 |
|
RESOLVER_LIBS= |
| 3239 |
|
fi |
| 3240 |
|
|
| 3241 |
orig_LIBS=$LIBS |
orig_LIBS=$LIBS |
| 3242 |
LIBS="$NETWORK_LIBS $orig_LIBS" |
LIBS="$NETWORK_LIBS $orig_LIBS" |
| 3243 |
AC_CHECK_FUNCS(getaddrinfo getnameinfo) |
AC_CHECK_FUNCS(inet_ntoa_r) |
| 3244 |
LIBS=$orig_LIBS |
if test "$with_ncbi_public" = "yes" -a "$OSTYPE" = "solaris"; then |
| 3245 |
|
AC_MSG_NOTICE([Skipping checks for network functions new to Solaris 8.]) |
| 3246 |
|
else |
| 3247 |
|
AC_CACHE_CHECK([for getaddrinfo], ac_cv_func_getaddrinfo, |
| 3248 |
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM( |
| 3249 |
|
[[#include <netdb.h>]], |
| 3250 |
|
[[struct addrinfo *p; getaddrinfo("foo", "bar", p, &p);]])], |
| 3251 |
|
[ac_cv_func_getaddrinfo=yes], [ac_cv_func_getaddrinfo=no])]) |
| 3252 |
|
test "$ac_cv_func_getaddrinfo" = "yes" && \ |
| 3253 |
|
AC_DEFINE(HAVE_GETADDRINFO, 1, |
| 3254 |
|
[Define to 1 if you have the `getaddrinfo' function.]) |
| 3255 |
|
AC_CACHE_CHECK([for getnameinfo], ac_cv_func_getnameinfo, |
| 3256 |
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM( |
| 3257 |
|
[[#include <netdb.h> |
| 3258 |
|
#include <sys/types.h> |
| 3259 |
|
#include <sys/socket.h>]], |
| 3260 |
|
[[struct sockaddr p; char buf[256], buf2[256]; |
| 3261 |
|
getnameinfo(&p, sizeof(p), buf, 256, buf2, 256, 0);]])], |
| 3262 |
|
[ac_cv_func_getnameinfo=yes], [ac_cv_func_getnameinfo=no])]) |
| 3263 |
|
test "$ac_cv_func_getnameinfo" = "yes" && \ |
| 3264 |
|
AC_DEFINE(HAVE_GETNAMEINFO, 1, |
| 3265 |
|
[Define to 1 if you have the `getnameinfo' function.]) |
| 3266 |
|
AC_CHECK_FUNCS(freehostent gethostent_r getipnodebyaddr getipnodebyname \ |
| 3267 |
|
inet_ntop) |
| 3268 |
fi |
fi |
| 3269 |
|
LIBS=$orig_LIBS |
|
MATH_LIBS=${MATH_LIBS:="-lm"} |
|
|
|
|
|
|
|
|
### Math lib to be always linked in |
|
|
LIBS="$MATH_LIBS $LIBS" |
|
|
C_LIBS="$MATH_LIBS $C_LIBS" |
|
| 3270 |
|
|
| 3271 |
|
|
| 3272 |
### Save original compiler/linker flags |
### Save original compiler/linker flags |
| 3275 |
orig_LIBS="$LIBS" |
orig_LIBS="$LIBS" |
| 3276 |
|
|
| 3277 |
|
|
| 3278 |
|
### Check for math functions that aren't always available |
| 3279 |
|
AC_CHECK_FUNCS(erf) |
| 3280 |
|
|
| 3281 |
NCBI_CHECK_LIBS(KSTAT, kstat, kstat_open) |
NCBI_CHECK_LIBS(KSTAT, kstat, kstat_open) |
| 3282 |
NCBI_CHECK_LIBS(RPCSVC, rpcsvc, rstat) |
NCBI_CHECK_LIBS(RPCSVC, rpcsvc, rstat) |
| 3283 |
AC_LANG_PUSH(C) |
AC_LANG_PUSH(C) |
| 3287 |
AC_LANG_POP(C) |
AC_LANG_POP(C) |
| 3288 |
case "$host_os:$compiler" in |
case "$host_os:$compiler" in |
| 3289 |
solaris*:GCC ) ac_cv_search_dlopen="-ldl" ;; |
solaris*:GCC ) ac_cv_search_dlopen="-ldl" ;; |
| 3290 |
|
darwin* ) ac_cv_search_iconv="-liconv" ;; |
| 3291 |
esac |
esac |
| 3292 |
NCBI_CHECK_LIBS(DL, dl, dlopen) |
NCBI_CHECK_LIBS(DL, dl, dlopen) |
| 3293 |
# Normally redundant, but needed --with-static-exe. |
# libc's stubs aren't always sufficient... |
|
# (Too bad there's no libdl.a.) |
|
| 3294 |
case "$host_os:$libnsl" in |
case "$host_os:$libnsl" in |
| 3295 |
|
solaris2.[[89]]:* ) orig_LIBS="$DL_LIBS $orig_LIBS" ;; |
| 3296 |
solaris*:-lnsl ) NETWORK_LIBS="$NETWORK_LIBS $DL_LIBS" ;; |
solaris*:-lnsl ) NETWORK_LIBS="$NETWORK_LIBS $DL_LIBS" ;; |
| 3297 |
esac |
esac |
| 3298 |
|
dnl NCBI_CHECK_LIBS(UUID, uuid, uuid_generate) |
| 3299 |
|
AC_SEARCH_LIBS(uuid_generate, uuid, |
| 3300 |
|
[NCBI_PACKAGE(UUID) |
| 3301 |
|
test "x$ac_cv_search_uuid_generate" = "xnone required" || \ |
| 3302 |
|
UUID_LIBS=$ac_cv_search_uuid_generate]) |
| 3303 |
|
dnl NCBI_CHECK_LIBS(FUSE, fuse, fuse_loop) |
| 3304 |
|
AC_SEARCH_LIBS(fuse_loop, fuse, [NCBI_PACKAGE(FUSE)]) |
| 3305 |
NCBI_CHECK_LIBS(RT, rt posix4, clock_gettime) |
NCBI_CHECK_LIBS(RT, rt posix4, clock_gettime) |
| 3306 |
# For FreeTDS, which normally uses a somewhat more elaborate test |
NCBI_CHECK_LIBS(DEMANGLE, demangle, cplus_demangle) |
| 3307 |
NCBI_CHECK_LIBS(ICONV, iconv, iconv) |
# Add to (orig_)LIBS if present for the sake of corelib and the |
| 3308 |
|
# following call to AC_CHECK_FUNCS. |
| 3309 |
|
if test -n "$DEMANGLE_LIBS$RT_LIBS"; then |
| 3310 |
|
LIBS="$DEMANGLE_LIBS $RT_LIBS $LIBS" |
| 3311 |
|
orig_LIBS="$DEMANGLE_LIBS $RT_LIBS $orig_LIBS" |
| 3312 |
|
fi |
| 3313 |
|
AC_CHECK_FUNCS([nanosleep sched_yield]) |
| 3314 |
|
|
| 3315 |
|
dnl NCBI_CHECK_LIBS(ICONV, iconv, iconv) |
| 3316 |
|
# We need to include <iconv.h>, since some implementations rename the symbols. |
| 3317 |
|
# This logic adapted from Bruno Haible's iconv.m4. |
| 3318 |
|
AC_CACHE_CHECK(for library containing iconv, ac_cv_search_iconv, [ |
| 3319 |
|
ac_cv_search_iconv=no |
| 3320 |
|
AC_LINK_IFELSE( |
| 3321 |
|
[AC_LANG_PROGRAM( |
| 3322 |
|
[[#include <stdlib.h> |
| 3323 |
|
#include <iconv.h>]], |
| 3324 |
|
[[iconv_t cd = iconv_open("",""); |
| 3325 |
|
iconv(cd,NULL,NULL,NULL,NULL); |
| 3326 |
|
iconv_close(cd);]])], |
| 3327 |
|
[ac_cv_search_iconv="none required"]) |
| 3328 |
|
if test "$ac_cv_search_iconv" != "none required"; then |
| 3329 |
|
for l in iconv; do |
| 3330 |
|
LIBS="-l$l $orig_LIBS" |
| 3331 |
|
AC_LINK_IFELSE( |
| 3332 |
|
[AC_LANG_PROGRAM( |
| 3333 |
|
[[#include <stdlib.h> |
| 3334 |
|
#include <iconv.h>]], |
| 3335 |
|
[[iconv_t cd = iconv_open("",""); |
| 3336 |
|
iconv(cd,NULL,NULL,NULL,NULL); |
| 3337 |
|
iconv_close(cd);]])], |
| 3338 |
|
[ac_cv_search_iconv=-l$l]) |
| 3339 |
|
LIBS="$orig_LIBS" |
| 3340 |
|
done |
| 3341 |
|
fi]) |
| 3342 |
|
if test "x$ac_cv_search_iconv" != xno; then |
| 3343 |
|
AC_DEFINE(HAVE_LIBICONV, 1, |
| 3344 |
|
[Define to 1 if ICONV is available, either in its own library or as part |
| 3345 |
|
of the standard libraries.]) |
| 3346 |
|
AC_MSG_CHECKING([for iconv declaration]) |
| 3347 |
|
AC_CACHE_VAL(am_cv_proto_iconv, [ |
| 3348 |
|
AC_COMPILE_IFELSE([[ |
| 3349 |
|
#include <stdlib.h> |
| 3350 |
|
#include <iconv.h> |
| 3351 |
|
extern |
| 3352 |
|
#ifdef __cplusplus |
| 3353 |
|
"C" |
| 3354 |
|
#endif |
| 3355 |
|
#if defined(__STDC__) || defined(__cplusplus) |
| 3356 |
|
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); |
| 3357 |
|
#else |
| 3358 |
|
size_t iconv(); |
| 3359 |
|
#endif |
| 3360 |
|
]], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") |
| 3361 |
|
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) |
| 3362 |
|
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` |
| 3363 |
|
AC_MSG_RESULT([$]{ac_t:- |
| 3364 |
|
}[$]am_cv_proto_iconv) |
| 3365 |
|
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, |
| 3366 |
|
[Define as const if the declaration of iconv() needs const.]) |
| 3367 |
|
if test "x$ac_cv_search_iconv" != "xnone required"; then |
| 3368 |
|
ICONV_LIBS=$ac_cv_search_iconv |
| 3369 |
|
fi |
| 3370 |
|
fi |
| 3371 |
|
|
| 3372 |
|
|
| 3373 |
|
### Third-party libraries |
| 3374 |
|
|
| 3375 |
|
if test "$OSTYPE" = linux -a -d "$NCBI"; then |
| 3376 |
|
ncbi_rpath_sed="s,$NCBI/\\(.*\\),/opt/ncbi/$NCBI_PLATFORM_BITS/\\1:&," |
| 3377 |
|
else |
| 3378 |
|
ncbi_rpath_sed= |
| 3379 |
|
fi |
| 3380 |
|
|
| 3381 |
|
no_usr_lib='s,-L/usr/lib[[^/ ]]* ,,g; s,-L/lib[[^/ ]]* ,,g' |
| 3382 |
|
|
| 3383 |
|
NCBI_CHECK_THIRD_PARTY_LIB(z, |
| 3384 |
|
[[AC_LANG_PROGRAM([#include <zlib.h>], |
| 3385 |
|
[[gzFile fp; char buf[1024]; int n = gzread(fp, buf, sizeof(buf))]])]]) |
| 3386 |
|
if test -z "$Z_LIBS"; then |
| 3387 |
|
zlocal=util/compress/zlib |
| 3388 |
|
AC_MSG_NOTICE([using local zlib copy in $zlocal]) |
| 3389 |
|
Z_PATH="<$zlocal>" |
| 3390 |
|
Z_INCLUDE="-I\$(includedir)/$zlocal -I\$(includedir0)/$zlocal" |
| 3391 |
|
# Z_LIBS="-lz" |
| 3392 |
|
Z_LIB="z" |
| 3393 |
|
# AC_DEFINE(USE_LOCAL_ZLIB, 1, [Define to 1 if using a local copy of zlib.]) |
| 3394 |
|
NCBI_PACKAGE(Z) |
| 3395 |
|
NCBI_PACKAGE(LocalZ) |
| 3396 |
|
fi |
| 3397 |
|
|
| 3398 |
|
NCBI_CHECK_THIRD_PARTY_LIB(bz2, |
| 3399 |
|
[[AC_LANG_PROGRAM([#include <bzlib.h>], |
| 3400 |
|
[[BZFILE* fp; char buf[1024]; int err; |
| 3401 |
|
int n = BZ2_bzRead(&err, fp, buf, sizeof(buf))]])]]) |
| 3402 |
|
if test -z "$BZ2_LIBS"; then |
| 3403 |
|
bzlocal=util/compress/bzip2 |
| 3404 |
|
AC_MSG_NOTICE([using local bzlib copy in $bzlocal]) |
| 3405 |
|
BZ2_PATH="<$bzlocal>" |
| 3406 |
|
BZ2_INCLUDE="-I\$(includedir)/$bzlocal -I\$(includedir0)/$bzlocal" |
| 3407 |
|
# BZ2_LIBS="-lbz2" |
| 3408 |
|
BZ2_LIB="bz2" |
| 3409 |
|
AC_DEFINE(USE_LOCAL_BZLIB, 1, [Define to 1 if using a local copy of bzlib.]) |
| 3410 |
|
NCBI_PACKAGE(BZ2) |
| 3411 |
|
NCBI_PACKAGE(LocalBZ2) |
| 3412 |
|
fi |
| 3413 |
|
|
| 3414 |
|
: ${LZO_PATH=$NCBI/lzo2} |
| 3415 |
|
if test -d "$LZO_PATH"; then |
| 3416 |
|
NCBI_FIX_DIR(LZO_PATH) |
| 3417 |
|
fi |
| 3418 |
|
NCBI_CHECK_THIRD_PARTY_LIB_EX(lzo, LZO, lzo2, |
| 3419 |
|
[[AC_LANG_PROGRAM([#include <lzo/lzo1x.h>], |
| 3420 |
|
[[lzo_uint32 c = lzo_crc32(0, (const unsigned char*)"foo", 3);]])]]) |
| 3421 |
|
|
| 3422 |
|
if test -z "$PCRE_PATH" && pcre-config --version >/dev/null 2>&1; then |
| 3423 |
|
p=`pcre-config --prefix` |
| 3424 |
|
test "x$p" = "x/usr" || PCRE_PATH=$p |
| 3425 |
|
fi |
| 3426 |
|
NCBI_CHECK_THIRD_PARTY_LIB(pcre, |
| 3427 |
|
[[AC_LANG_PROGRAM([#include <pcre.h>], |
| 3428 |
|
[[const char*s[]={"x"}; pcre* p; pcre_extra* x = pcre_study(p, 1, s);]])]]) |
| 3429 |
|
if test -z "$PCRE_LIBS"; then |
| 3430 |
|
pcrelocal=util/regexp |
| 3431 |
|
AC_MSG_NOTICE([using local PCRE copy in $pcrelocal]) |
| 3432 |
|
PCRE_PATH="<$pcrelocal>" |
| 3433 |
|
PCRE_INCLUDE="-I\$(includedir)/$pcrelocal -I\$(includedir0)/$pcrelocal" |
| 3434 |
|
# PCRE_LIBS="-lregexp" |
| 3435 |
|
# PCREPOSIX_LIBS="-lregexp" |
| 3436 |
|
PCRE_LIB="regexp" |
| 3437 |
|
AC_DEFINE(USE_LOCAL_PCRE, 1, [Define to 1 if using a local copy of PCRE.]) |
| 3438 |
|
NCBI_PACKAGE(PCRE) |
| 3439 |
|
NCBI_PACKAGE(LocalPCRE) |
| 3440 |
|
else |
| 3441 |
|
PCREPOSIX_LIBS=`echo "$PCRE_LIBS" | sed -e 's/-lpcre/-lpcreposix -lpcre/'` |
| 3442 |
|
fi |
| 3443 |
|
|
| 3444 |
|
## SSL/TLS libraries |
| 3445 |
|
case "$with_gnutls" in |
| 3446 |
|
no ) ac_cv_path_LIBGNUTLS_CONFIG=no ;; |
| 3447 |
|
yes | '' ) : ${GNUTLS_PATH=$NCBI/gnutls} ;; |
| 3448 |
|
* ) GNUTLS_PATH=$with_gnutls ;; |
| 3449 |
|
esac |
| 3450 |
|
if test -d "$GNUTLS_PATH"; then |
| 3451 |
|
NCBI_FIX_DIR(GNUTLS_PATH) |
| 3452 |
|
fi |
| 3453 |
|
AC_PATH_PROG(LIBGNUTLS_CONFIG, libgnutls-config, [], [${GNUTLS_BIN-$GNUTLS_PATH/${compiler_vpfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}/bin}:$GNUTLS_PATH/bin${bit64_sfx}:$GNUTLS_PATH/bin:$PATH]) |
| 3454 |
|
if test "x$with_gnutls" != xno -a -x "$LIBGNUTLS_CONFIG"; then |
| 3455 |
|
if test -z "$GNUTLS_PATH"; then |
| 3456 |
|
p=`libgnutls-config --prefix` |
| 3457 |
|
test "x$p" = "x/usr" || GNUTLS_PATH=$p |
| 3458 |
|
fi |
| 3459 |
|
GNUTLS_INCLUDE=`$LIBGNUTLS_CONFIG --cflags` |
| 3460 |
|
NCBI_RPATHIFY_OUTPUT(GNUTLS_LIBPATH, [$LIBGNUTLS_CONFIG --exec-prefix], |
| 3461 |
|
[s,^,-L,; s,$,/lib,;]) |
| 3462 |
|
GNUTLS_CONFIG_LIBS="`$LIBGNUTLS_CONFIG --libs` $Z_LIBS" |
| 3463 |
|
else |
| 3464 |
|
AS_UNSET(GNUTLS_CONFIG_LIBS) |
| 3465 |
|
fi |
| 3466 |
|
NCBI_CHECK_THIRD_PARTY_LIB(gnutls, |
| 3467 |
|
[[AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>]], |
| 3468 |
|
[[gnutls_session s; gnutls_init(&s, GNUTLS_CLIENT);]])]], |
| 3469 |
|
$GNUTLS_CONFIG_LIBS) |
| 3470 |
|
if test -n "$GNUTLS_CONFIG_LIBS"; then |
| 3471 |
|
NCBI_RPATHIFY_OUTPUT(GNUTLS_LIBS, [echo $GNUTLS_CONFIG_LIBS], [$no_usr_lib]) |
| 3472 |
|
fi |
| 3473 |
|
|
| 3474 |
|
NCBI_CHECK_THIRD_PARTY_LIB_EX(openssl, OPENSSL, ssl, |
| 3475 |
|
[[AC_LANG_PROGRAM([[#include <openssl/ssl.h>]], |
| 3476 |
|
[[SSL_library_init();]])]], |
| 3477 |
|
-lcrypto) |
| 3478 |
|
|
| 3479 |
|
OPENSSL_STATIC_LIBS=$OPENSSL_LIBS |
| 3480 |
|
for d in `echo " $OPENSSL_LIBS" | fmt -w 1 | sed -ne 's/^ *-L//p'` \ |
| 3481 |
|
/usr/local/lib${bit64_sfx} /usr/local/lib /usr/lib${bit64_sfx} /usr/lib; do |
| 3482 |
|
if test -f $d/libssl.a -a -f $d/libcrypto.a; then |
| 3483 |
|
OPENSSL_STATIC_LIBS="$d/libssl.a $d/libcrypto.a" |
| 3484 |
|
break |
| 3485 |
|
elif test -f $d/libssl.so -o -f $d/libssl.dylib; then |
| 3486 |
|
break |
| 3487 |
|
fi |
| 3488 |
|
done |
| 3489 |
|
|
| 3490 |
|
if test -n "$GNUTLS_LIBS"; then |
| 3491 |
|
TLS_INCLUDE=$GNUTLS_INCLUDE |
| 3492 |
|
TLS_LIBS=$GNUTLS_LIBS |
| 3493 |
|
else |
| 3494 |
|
TLS_INCLUDE=$OPENSSL_INCLUDE |
| 3495 |
|
TLS_LIBS=$OPENSSL_LIBS |
| 3496 |
|
fi |
| 3497 |
|
|
| 3498 |
## SYBASE libraries |
## SYBASE libraries |
| 3499 |
|
|
| 3500 |
NETWORK_PURE_LIBS="$NETWORK_LIBS" |
NETWORK_PURE_LIBS="$NETWORK_LIBS" |
| 3501 |
|
ncbi_xreader_pubseqos= |
| 3502 |
|
UNLESS_PUBSEQOS= |
| 3503 |
if test "$with_sybase" != "no" ; then |
if test "$with_sybase" != "no" ; then |
| 3504 |
net_sybase_root="/netopt/Sybase/clients" |
net_sybase_root="/netopt/Sybase/clients" |
| 3505 |
local_sybase_root="/export/home/sybase/clients" |
local_sybase_root="/export/home/sybase/clients" |
|
default_local_sybase="$local_sybase_root/current" |
|
| 3506 |
sybase_lib=lib$bit64_sfx |
sybase_lib=lib$bit64_sfx |
| 3507 |
: ${with_sybase_local:="no"} |
resolve_sybase=true |
| 3508 |
|
default_pointer=default-${NCBI_PLATFORM_BITS}bit |
| 3509 |
: ${with_sybase_new:="no"} |
: ${with_sybase_new:="no"} |
| 3510 |
|
case "$host_os" in |
| 3511 |
|
linux* ) |
| 3512 |
|
: ${with_sybase_local:=yes} |
| 3513 |
|
;; |
| 3514 |
|
* ) |
| 3515 |
|
if test -d "$net_sybase_root" ; then |
| 3516 |
|
: ${with_sybase_local:=no} |
| 3517 |
|
else |
| 3518 |
|
: ${with_sybase_local:=yes} |
| 3519 |
|
fi |
| 3520 |
|
;; |
| 3521 |
|
esac |
| 3522 |
|
|
| 3523 |
if test "$with_sybase_local" != "no" ; then |
if test "$with_sybase_local" != "no" ; then |
| 3524 |
if test "$with_sybase_local" = "yes" ; then |
if test "$with_sybase_local" = "yes" ; then |
| 3525 |
with_sybase_local=${SYBASE_PATH:-$default_local_sybase} |
if test -n "$SYBASE_PATH" ; then |
| 3526 |
fi |
with_sybase_local=$SYBASE_PATH |
|
AC_CACHE_CHECK([for local Sybase install in $with_sybase_local], |
|
|
ncbi_cv_path_sybase_local, |
|
|
[if test -d "$with_sybase_local"; then |
|
|
ncbi_cv_path_sybase_local=yes |
|
| 3527 |
else |
else |
| 3528 |
ncbi_cv_path_sybase_local=no |
if test "$with_sybase_new" = "yes" ; then |
| 3529 |
fi]) |
with_sybase_local=$local_sybase_root/new |
| 3530 |
if test "$ncbi_cv_path_sybase_local" = yes; then |
elif test -f "$local_sybase_root/$default_pointer" ; then |
| 3531 |
|
with_sybase_local=`cat $local_sybase_root/$default_pointer` |
| 3532 |
|
resolve_sybase=false |
| 3533 |
|
else |
| 3534 |
|
with_sybase_local=$local_sybase_root/current |
| 3535 |
|
fi |
| 3536 |
|
if test -d "$with_sybase_local$NCBI_PLATFORM_BITS" ; then |
| 3537 |
|
with_sybase_local=$with_sybase_local$NCBI_PLATFORM_BITS |
| 3538 |
|
fi |
| 3539 |
|
fi # default paths |
| 3540 |
|
fi # no command-line path |
| 3541 |
|
if test -d "$with_sybase_local" ; then |
| 3542 |
SYBASE_PATH=$with_sybase_local |
SYBASE_PATH=$with_sybase_local |
| 3543 |
|
SYBASE_LCL_PATH= |
| 3544 |
else |
else |
| 3545 |
with_sybase_local=no |
with_sybase_local=no |
| 3546 |
fi |
fi |
| 3547 |
fi |
fi |
| 3548 |
|
|
| 3549 |
if test "$with_sybase_local" = "no" ; then |
if test "$with_sybase_local" = "no" ; then |
| 3550 |
if test "$with_sybase_new" = "yes" ; then |
if test "$with_sybase_new" = "yes" ; then |
| 3551 |
case "$host_os:$bit64_sfx" in |
if test -d "$net_sybase_root/new$NCBI_PLATFORM_BITS" ; then |
| 3552 |
linux* ) new_version=12.5.0.1; net_suffix="" ;; |
SYBASE_LCL_PATH=$local_sybase_root/new$NCBI_PLATFORM_BITS |
| 3553 |
solaris*:64) new_version=12.5.64; net_suffix="-EBF9728" ;; |
SYBASE_PATH=$net_sybase_root/new$NCBI_PLATFORM_BITS |
| 3554 |
solaris* ) new_version=12.5; net_suffix="-EBF9723" ;; |
elif test -d "$net_sybase_root/new" ; then |
| 3555 |
* ) new_version=""; |
SYBASE_LCL_PATH=$local_sybase_root/new |
| 3556 |
AC_MSG_WARN([--with-sybase-new is unsupported on this platform; ignoring it.]) ;; |
SYBASE_PATH=$net_sybase_root/new |
|
esac |
|
|
if test -n "$new_version"; then |
|
|
new_sybase_path=$net_sybase_root/$new_version-$net_suffix |
|
|
new_sybase_local=$local_sybase_root/$new_version |
|
|
AC_CACHE_CHECK([for new Sybase install in $new_sybase_local:$new_sybase_path], |
|
|
ncbi_cv_path_sybase_new, |
|
|
[if test -d $new_sybase_path; then |
|
|
if test -d $new_sybase_local; then |
|
|
ncbi_cv_path_sybase_new=yes |
|
|
else |
|
|
ncbi_cv_path_sybase_new=net-only |
|
|
fi |
|
| 3557 |
else |
else |
|
ncbi_cv_path_sybase_new=no |
|
|
fi]) |
|
|
if test "$ncbi_cv_path_sybase_new" = no; then |
|
| 3558 |
with_sybase_new=no |
with_sybase_new=no |
|
else |
|
|
SYBASE_PATH=$new_sybase_path |
|
|
sybase_lib=lib |
|
|
if "$ncbi_cv_path_sybase_new" = yes; then |
|
|
SYBASE_LCL_PATH=$new_sybase_local |
|
| 3559 |
fi |
fi |
| 3560 |
fi |
fi |
| 3561 |
fi # New Sybase potentially available? |
|
| 3562 |
fi # New Sybase requested? |
if test -z "$SYBASE_PATH" ; then |
| 3563 |
if test "$with_sybase_new" = "no" ; then |
if test -f "$net_sybase_root/$default_pointer" ; then |
| 3564 |
: ${SYBASE_PATH:="$net_sybase_root/current"} |
SYBASE_LCL_PATH= |
| 3565 |
: ${SYBASE_LCL_PATH:="$local_sybase_root/current"} |
SYBASE_PATH=`cat $local_sybase_root/$default_pointer` |
| 3566 |
|
resolve_sybase=false |
| 3567 |
|
elif test -d "$net_sybase_root/current$NCBI_PLATFORM_BITS" ; then |
| 3568 |
|
SYBASE_LCL_PATH=$local_sybase_root/current$NCBI_PLATFORM_BITS |
| 3569 |
|
SYBASE_PATH=$net_sybase_root/current$NCBI_PLATFORM_BITS |
| 3570 |
|
elif test -d "$net_sybase_root/current" ; then |
| 3571 |
|
SYBASE_LCL_PATH=$local_sybase_root/current |
| 3572 |
|
SYBASE_PATH=$net_sybase_root/current |
| 3573 |
|
else |
| 3574 |
|
SYBASE_LCL_PATH= |
| 3575 |
|
SYBASE_PATH=$SYBASE |
| 3576 |
|
fi |
| 3577 |
|
fi |
| 3578 |
|
fi |
| 3579 |
|
|
| 3580 |
|
# Lock in the version we found, ignoring symlinks further up |
| 3581 |
|
case "$SYBASE_PATH" in |
| 3582 |
|
*/[[1-9]]* ) resolve_sybase=false ;; |
| 3583 |
|
esac |
| 3584 |
|
if test -d "$SYBASE_PATH" && $resolve_sybase; then |
| 3585 |
|
# SYBASE_PATH_=`cd $SYBASE_PATH && /bin/pwd` |
| 3586 |
|
SYBASE_PATH_=`ls -ld $SYBASE_PATH | sed -ne 's/.* -> //p'` |
| 3587 |
|
case "$SYBASE_PATH_" in |
| 3588 |
|
'' ) ;; |
| 3589 |
|
/* ) |
| 3590 |
|
SYBASE_VERSION=`basename $SYBASE_PATH_` |
| 3591 |
|
SYBASE_PATH=`dirname $SYBASE_PATH`/$SYBASE_VERSION |
| 3592 |
|
test -d "$SYBASE_PATH" || SYBASE_PATH=$SYBASE_PATH_ |
| 3593 |
|
;; |
| 3594 |
|
* ) |
| 3595 |
|
orig_parent=`dirname $SYBASE_PATH` |
| 3596 |
|
SYBASE_VERSION=`basename $SYBASE_PATH_` |
| 3597 |
|
SYBASE_PATH=$orig_parent/$SYBASE_VERSION |
| 3598 |
|
test -d "$SYBASE_PATH" || SYBASE_PATH=$orig_parent/$SYBASE_PATH_ |
| 3599 |
|
;; |
| 3600 |
|
esac |
| 3601 |
|
fi |
| 3602 |
|
|
| 3603 |
|
if test -d "$SYBASE_LCL_PATH" && $resolve_sybase ; then |
| 3604 |
|
# SYBASE_LCL_PATH_=`cd $SYBASE_LCL_PATH && /bin/pwd` |
| 3605 |
|
SYBASE_LCL_PATH_=`ls -ld $SYBASE_LCL_PATH | sed -ne 's/.* -> //p'` |
| 3606 |
|
case "$SYBASE_LCL_PATH_" in |
| 3607 |
|
'' ) ;; |
| 3608 |
|
/* ) |
| 3609 |
|
SYBASE_LCL_VERSION=`basename $SYBASE_LCL_PATH_` |
| 3610 |
|
SYBASE_LCL_PATH=`dirname $SYBASE_LCL_PATH`/$SYBASE_LCL_VERSION |
| 3611 |
|
test -d "$SYBASE_LCL_PATH" || SYBASE_LCL_PATH=$SYBASE_LCL_PATH_ |
| 3612 |
|
;; |
| 3613 |
|
* ) |
| 3614 |
|
orig_parent=`dirname $SYBASE_LCL_PATH` |
| 3615 |
|
SYBASE_LCL_VERSION=`basename $SYBASE_LCL_PATH_` |
| 3616 |
|
SYBASE_LCL_PATH=$orig_parent/$SYBASE_LCL_VERSION |
| 3617 |
|
test -d "$SYBASE_LCL_PATH" || \ |
| 3618 |
|
SYBASE_LCL_PATH=$orig_parent/$SYBASE_LCL_PATH_ |
| 3619 |
|
;; |
| 3620 |
|
esac |
| 3621 |
|
elif test -n "$SYBASE_LCL_PATH" ; then |
| 3622 |
|
SYBASE_LCL_PATH=`dirname $SYBASE_LCL_PATH`/$SYBASE_VERSION |
| 3623 |
|
fi |
| 3624 |
|
|
| 3625 |
|
if test -n "$SYBASE_VERSION" -a -n "$SYBASE_LCL_VERSION" \ |
| 3626 |
|
-a "$SYBASE_VERSION" != "$SYBASE_LCL_VERSION" ; then |
| 3627 |
|
AC_MSG_WARN([ignoring inconsistent local Sybase symlink: $SYBASE_LCL_VERSION vs. $SYBASE_VERSION]) |
| 3628 |
|
SYBASE_LCL_PATH=`dirname $SYBASE_LCL_PATH`/$SYBASE_VERSION |
| 3629 |
|
fi |
| 3630 |
|
|
| 3631 |
|
if test -n "$SYBASE" ; then |
| 3632 |
|
if test -d "$net_sybase_root" -o -d "$local_sybase_root" ; then |
| 3633 |
|
case $SYBASE in |
| 3634 |
|
$net_sybase_root/* | $local_sybase_root/* ) ;; |
| 3635 |
|
* ) AC_MSG_WARN([ignoring non-standard SYBASE setting: $SYBASE]) ;; |
| 3636 |
|
# Ignored regardless, but standard values are not so concerning. |
| 3637 |
|
esac |
| 3638 |
|
fi |
| 3639 |
fi |
fi |
|
fi # No local Sybase (requested)? |
|
| 3640 |
|
|
| 3641 |
SYBASE_LIBPATH="$SYBASE_PATH/${sybase_lib}" |
SYBASE_LIBPATH="$SYBASE_PATH/${sybase_lib}" |
| 3642 |
syb_sfx=$bit64_sfx |
syb_sfx=$bit64_sfx |
| 3643 |
if test "$with_mt" = "yes" ; then |
if test "$with_mt" = "yes" ; then |
| 3644 |
AC_CACHE_CHECK([for reentrant Sybase libraries], ncbi_cv_lib_sybase_r, |
AC_CACHE_CHECK([for reentrant Sybase libraries], ncbi_cv_lib_sybase_r, |
| 3645 |
[if test -f "$SYBASE_LIBPATH/libct_r$bit64_sfx.a"; then |
[if test -f "$SYBASE_LIBPATH/libct_r$bit64_sfx.so"; then |
| 3646 |
ncbi_cv_lib_sybase_r=yes |
ncbi_cv_lib_sybase_r=yes |
| 3647 |
else |
else |
| 3648 |
ncbi_cv_lib_sybase_r=no |
ncbi_cv_lib_sybase_r=no |
| 3655 |
linux*) sybtcl=-lsybtcl$syb_sfx; sybtli="" ;; |
linux*) sybtcl=-lsybtcl$syb_sfx; sybtli="" ;; |
| 3656 |
*) sybtcl=-ltcl$syb_sfx; sybtli=-ltli$syb_sfx ;; |
*) sybtcl=-ltcl$syb_sfx; sybtli=-ltli$syb_sfx ;; |
| 3657 |
esac |
esac |
| 3658 |
|
test -f "$SYBASE_LIBPATH/libtli.so" || sybtli= |
| 3659 |
|
|
| 3660 |
# quick-patch for the bad "tli" lib (Solaris8/Intel specific) |
# quick-patch for the bad "tli" lib (Solaris8/Intel specific) |
| 3661 |
case "$host_os:$host_vendor" in |
case "$host_os:$host_vendor" in |
| 3676 |
# deduce conf.macro: SYBASE_INCLUDE, SYBASE_LIBS, SYBASE_DLLS, SYBASE_DBLIBS |
# deduce conf.macro: SYBASE_INCLUDE, SYBASE_LIBS, SYBASE_DLLS, SYBASE_DBLIBS |
| 3677 |
SYBASE_INCLUDE="-I$SYBASE_PATH/include $SYBASE_INCLUDE" |
SYBASE_INCLUDE="-I$SYBASE_PATH/include $SYBASE_INCLUDE" |
| 3678 |
if test -z "$SYBASE_LCL_PATH" ; then |
if test -z "$SYBASE_LCL_PATH" ; then |
| 3679 |
SYBASE_LPATH="-L$SYBASE_LIBPATH ${CONF_f_runpath}$SYBASE_LIBPATH" |
NCBI_RPATHIFY(SYBASE_LPATH, $SYBASE_LIBPATH) |
| 3680 |
else |
else |
| 3681 |
SYBASE_LCL_LIBPATH="$SYBASE_LCL_PATH/${sybase_lib}" |
SYBASE_LCL_LIBPATH="$SYBASE_LCL_PATH/${sybase_lib}" |
| 3682 |
SYBASE_LPATH="-L$SYBASE_LCL_LIBPATH -L$SYBASE_LIBPATH ${CONF_f_runpath}$SYBASE_LCL_LIBPATH:$SYBASE_LIBPATH" |
NCBI_RPATHIFY(SYBASE_LPATH, $SYBASE_LCL_LIBPATH $SYBASE_LIBPATH) |
| 3683 |
SYBASE_INCLUDE="-I$SYBASE_LCL_PATH/include $SYBASE_INCLUDE" |
SYBASE_INCLUDE="-I$SYBASE_LCL_PATH/include $SYBASE_INCLUDE" |
| 3684 |
fi |
fi |
| 3685 |
SYBASE_LIBS="$SYBASE_LPATH $SYBASE_LIBLIST" |
SYBASE_LIBS="$SYBASE_LPATH $SYBASE_LIBLIST" |
| 3695 |
[ncbi_cv_lib_sybase=yes], [ncbi_cv_lib_sybase=no])]) |
[ncbi_cv_lib_sybase=yes], [ncbi_cv_lib_sybase=no])]) |
| 3696 |
|
|
| 3697 |
if test "$ncbi_cv_lib_sybase" = yes; then |
if test "$ncbi_cv_lib_sybase" = yes; then |
| 3698 |
WithPackages="$WithPackages Sybase" |
NCBI_PACKAGE(Sybase) |
| 3699 |
AC_DEFINE(HAVE_LIBSYBASE, 1, |
AC_DEFINE(HAVE_LIBSYBASE, 1, |
| 3700 |
[Define to 1 if SYBASE libraries are available.]) |
[Define to 1 if SYBASE libraries are available.]) |
| 3701 |
if test "$with_mt" = "yes" -a "$ncbi_cv_lib_sybase_r" = "yes"; then |
if test "$with_mt" = "yes" -a "$ncbi_cv_lib_sybase_r" = "yes"; then |
| 3702 |
AC_DEFINE(HAVE_SYBASE_REENTRANT, 1, |
AC_DEFINE(HAVE_SYBASE_REENTRANT, 1, |
| 3703 |
[Define to 1 if SYBASE has reentrant libraries.]) |
[Define to 1 if SYBASE has reentrant libraries.]) |
| 3704 |
fi |
fi |
| 3705 |
|
if test "$with_dbapi" != no -a -f ${real_srcdir}/src/objtools/data_loaders/genbank/pubseq/Makefile.ncbi_xreader_pubseqos.lib ; then |
| 3706 |
AC_CACHE_CHECK([for PubSeq service availability], ncbi_cv_db_pubseq, |
AC_CACHE_CHECK([for PubSeq service availability], ncbi_cv_db_pubseq, |
| 3707 |
[if grep PUBSEQ_OS $SYBASE_PATH/interfaces >/dev/null; then |
[if grep PUBSEQ_OS $SYBASE_PATH/interfaces >/dev/null; then |
| 3708 |
ncbi_cv_db_pubseq=yes |
ncbi_cv_db_pubseq=yes |
| 3712 |
if test "$ncbi_cv_db_pubseq" = yes; then |
if test "$ncbi_cv_db_pubseq" = yes; then |
| 3713 |
AC_DEFINE(HAVE_PUBSEQ_OS, 1, |
AC_DEFINE(HAVE_PUBSEQ_OS, 1, |
| 3714 |
[Define to 1 if the PUBSEQ service is available.]) |
[Define to 1 if the PUBSEQ service is available.]) |
| 3715 |
|
NCBI_FEATURE(PubSeqOS) |
| 3716 |
|
ncbi_xreader_pubseqos=ncbi_xreader_pubseqos |
| 3717 |
|
ncbi_xreader_pubseqos2=ncbi_xreader_pubseqos2 |
| 3718 |
|
UNLESS_PUBSEQOS=\# |
| 3719 |
|
fi |
| 3720 |
fi |
fi |
| 3721 |
|
|
| 3722 |
SYBASE_DBLIBS="$SYBASE_LPATH -lsybdb${bit64_sfx}" |
SYBASE_DBLIBS="$SYBASE_LPATH -lsybdb${bit64_sfx}" |
| 3723 |
AC_CACHE_CHECK([for Sybase DBLib], ncbi_cv_lib_sybdb, |
AC_CACHE_CHECK([for Sybase DBLib], ncbi_cv_lib_sybdb, |
| 3724 |
[CPPFLAGS="$SYBASE_INCLUDE $prig_CPPFLAGS" |
[CPPFLAGS="$SYBASE_INCLUDE $orig_CPPFLAGS" |
| 3725 |
LIBS="$SYBASE_DBLIBS $SYBASE_LIBS $SYBASE_DLLS $SYBASE_NETWORK_LIBS $DL_LIBS $orig_LIBS" |
LIBS="$SYBASE_DBLIBS $SYBASE_LIBS $SYBASE_DLLS $SYBASE_NETWORK_LIBS $DL_LIBS $orig_LIBS" |
| 3726 |
AC_LINK_IFELSE([AC_LANG_PROGRAM( |
AC_LINK_IFELSE([AC_LANG_PROGRAM( |
| 3727 |
[[ |
[[ |
| 3734 |
]])], |
]])], |
| 3735 |
[ncbi_cv_lib_sybdb=yes], [ncbi_cv_lib_sybdb=no])]) |
[ncbi_cv_lib_sybdb=yes], [ncbi_cv_lib_sybdb=no])]) |
| 3736 |
if test "$ncbi_cv_lib_sybdb" = yes; then |
if test "$ncbi_cv_lib_sybdb" = yes; then |
| 3737 |
WithPackages="$WithPackages DBLib" |
NCBI_PACKAGE(DBLib) |
| 3738 |
AC_DEFINE(HAVE_LIBSYBDB, 1, |
AC_DEFINE(HAVE_LIBSYBDB, 1, |
| 3739 |
[Define to 1 if SYBASE DBLib is available.]) |
[Define to 1 if SYBASE DBLib is available.]) |
| 3740 |
else |
else |
|
WithoutPackages="$WithoutPackages DBLib" |
|
| 3741 |
SYBASE_DBLIBS= |
SYBASE_DBLIBS= |
| 3742 |
fi |
fi |
| 3743 |
# apply the Sybase patch to $NETWORK_LIBS |
# apply the Sybase patch to $NETWORK_LIBS |
| 3745 |
NETWORK_LIBS="$SYBASE_LPATH $SYBASE_NETWORK_LIBS" |
NETWORK_LIBS="$SYBASE_LPATH $SYBASE_NETWORK_LIBS" |
| 3746 |
fi |
fi |
| 3747 |
else |
else |
| 3748 |
with_sybase=no |
NCBI_MISSING_PACKAGE(sybase) |
| 3749 |
fi |
fi |
| 3750 |
fi # with_sybase != no? |
fi # with_sybase != no? |
| 3751 |
|
|
| 3752 |
if test "$with_sybase" = no; then |
if test "$with_sybase" = no; then |
|
WithoutPackages="$WithoutPackages Sybase DBLib" |
|
| 3753 |
SYBASE_PATH="No_Sybase" |
SYBASE_PATH="No_Sybase" |
| 3754 |
SYBASE_INCLUDE= |
SYBASE_INCLUDE= |
| 3755 |
SYBASE_LIBS= |
SYBASE_LIBS= |
| 3767 |
## FreeTDS libraries |
## FreeTDS libraries |
| 3768 |
freetds= |
freetds= |
| 3769 |
if test "$with_ftds" != "no" ; then |
if test "$with_ftds" != "no" ; then |
| 3770 |
if test -z "$with_ftds" -o "$with_ftds" = "yes" ; then |
ftds64=ftds64 |
| 3771 |
with_ftds=8 |
try_local=yes |
| 3772 |
fi |
: ${FTDS_PATH:="/netopt/Sybase/clients-mssql/current"} |
| 3773 |
if test "$with_ftds" = 8 ; then |
case "$with_ftds" in |
| 3774 |
FTDS8_LOCAL_PATH="dbapi/driver/ftds8/freetds" |
64 | yes | '' ) |
| 3775 |
if test -f ${srcdir}/src/$FTDS8_LOCAL_PATH/Makefile.in ; then |
ftds_ver=64 |
| 3776 |
FTDS8_LIB="sybdb_ftds${STATIC} tds_ftds${STATIC}" |
ftds64=ftds |
| 3777 |
FTDS8_PATH="<$FTDS8_LOCAL_PATH>" |
;; |
| 3778 |
FTDS8_INCLUDE="-I\$(includedir)/$FTDS8_LOCAL_PATH -I\$(includedir0)/$FTDS8_LOCAL_PATH" |
* ) |
| 3779 |
|
FTDS_PATH=$with_ftds |
| 3780 |
|
try_local=no |
| 3781 |
|
;; |
| 3782 |
|
esac |
| 3783 |
|
: ${FTDS_CTLIBS:="-lct -ltds"} |
| 3784 |
|
NCBI_RPATHIFY(FTDS_CTLIBS, $FTDS_PATH/lib, [ ]$FTDS_CTLIBS) |
| 3785 |
|
FTDS_INCLUDE="-I$FTDS_PATH/include" |
| 3786 |
|
NCBI_LOCAL_FTDS(64) |
| 3787 |
|
if test -n "$freetds" ; then |
| 3788 |
|
FTDS_LIB="\$(FTDS${ftds_ver}_LIB)" |
| 3789 |
|
FTDS_LIBS="\$(FTDS${ftds_ver}_LIBS)" |
| 3790 |
|
FTDS_INCLUDE="\$(FTDS${ftds_ver}_INCLUDE)" |
| 3791 |
|
if test "$with_ftds_renamed" != "no" ; then |
| 3792 |
|
AC_DEFINE(NCBI_FTDS_RENAME_SYBDB, 1, |
| 3793 |
|
[Rename DBLIB symbols in FTDS to avoid name clash with Sybase DBLIB.]) |
| 3794 |
fi |
fi |
| 3795 |
test -n "$FTDS8_PATH" && FTDS_PATH=$FTDS8_PATH && freetds="freetds" |
AC_MSG_NOTICE([Using bundled FreeTDS (version $ftds_ver) from $FTDS_PATH]) |
| 3796 |
else |
else |
| 3797 |
FTDS_PATH="$with_ftds" |
FTDS_LIBS="$FTDS_CTLIBS" |
|
fi |
|
|
if test -n "$freetds" ; then |
|
|
FTDS_LIB="\$(FTDS${with_ftds}_LIB)" |
|
|
FTDS_INCLUDE="\$(FTDS${with_ftds}_INCLUDE)" |
|
|
AC_MSG_NOTICE([Using bundled FreeTDS (protocol v$with_ftds) from $FTDS_PATH]) |
|
|
else |
|
|
FTDS_PATH=${FTDS_PATH:="/netopt/Sybase/clients-mssql/current"} |
|
|
FTDS_LIBS=${FTDS_LIBS:="-lsybdb -ltds"} |
|
|
FTDS_LIBS="-L$FTDS_PATH/lib ${CONF_f_runpath}$FTDS_PATH/lib $FTDS_LIBS" |
|
|
FTDS_INCLUDE="-I$FTDS_PATH/include" |
|
|
|
|
| 3798 |
AC_CACHE_CHECK([for FreeTDS in $FTDS_PATH], ncbi_cv_lib_freetds, |
AC_CACHE_CHECK([for FreeTDS in $FTDS_PATH], ncbi_cv_lib_freetds, |
| 3799 |
[CPPFLAGS="$FTDS_INCLUDE $orig_CPPFLAGS" |
[CPPFLAGS="$FTDS_INCLUDE $orig_CPPFLAGS" |
| 3800 |
LIBS="$FTDS_LIBS $NETWORK_LIBS $orig_LIBS" |
LIBS="$FTDS_LIBS $NETWORK_LIBS $orig_LIBS" |
| 3812 |
]])], |
]])], |
| 3813 |
[ncbi_cv_lib_freetds=yes], [ncbi_cv_lib_freetds=no])]) |
[ncbi_cv_lib_freetds=yes], [ncbi_cv_lib_freetds=no])]) |
| 3814 |
if test "$ncbi_cv_lib_freetds" = "no"; then |
if test "$ncbi_cv_lib_freetds" = "no"; then |
| 3815 |
with_ftds=no |
# Don't panic when using partial trees lacking dbapi/driver/ftdsN. |
| 3816 |
else |
NCBI_MISSING_PACKAGE(ftds) |
|
FTDS8_INCLUDE=$FTDS_INCLUDE |
|
|
FTDS8_LIBS=$FTDS_LIBS |
|
| 3817 |
fi |
fi |
| 3818 |
fi |
fi |
| 3819 |
fi |
fi |
| 3822 |
FTDS_INCLUDE= |
FTDS_INCLUDE= |
| 3823 |
FTDS_LIBS= |
FTDS_LIBS= |
| 3824 |
FTDS_LIB= |
FTDS_LIB= |
| 3825 |
FTDS8_INCLUDE= |
FTDS64_INCLUDE= |
| 3826 |
FTDS8_LIBS= |
FTDS64_LIBS= |
| 3827 |
FTDS8_LIB= |
FTDS64_LIB= |
| 3828 |
|
FTDS64_CTLIB_INCLUDE= |
| 3829 |
|
FTDS64_CTLIB_LIBS= |
| 3830 |
|
FTDS64_CTLIB_LIB= |
| 3831 |
freetds= |
freetds= |
|
WithoutPackages="$WithoutPackages FreeTDS" |
|
| 3832 |
else |
else |
| 3833 |
AC_DEFINE(HAVE_LIBFTDS, 1, |
AC_DEFINE(HAVE_LIBFTDS, 1, |
| 3834 |
[Define to 1 if FreeTDS libraries are available.]) |
[Define to 1 if FreeTDS libraries are available.]) |
| 3835 |
WithPackages="$WithPackages FreeTDS" |
NCBI_PACKAGE(FreeTDS) |
| 3836 |
fi |
fi |
| 3837 |
AC_SUBST(FTDS8_INCLUDE) |
AC_SUBST(FTDS64_INCLUDE) |
| 3838 |
AC_SUBST(FTDS8_LIBS) |
AC_SUBST(FTDS64_LIBS) |
| 3839 |
AC_SUBST(FTDS8_LIB) |
AC_SUBST(FTDS64_LIB) |
| 3840 |
|
AC_SUBST(FTDS64_CTLIB_INCLUDE) |
| 3841 |
|
AC_SUBST(FTDS64_CTLIB_LIBS) |
| 3842 |
|
AC_SUBST(FTDS64_CTLIB_LIB) |
| 3843 |
AC_SUBST(FTDS_INCLUDE) |
AC_SUBST(FTDS_INCLUDE) |
| 3844 |
AC_SUBST(FTDS_LIBS) |
AC_SUBST(FTDS_LIBS) |
| 3845 |
AC_SUBST(FTDS_LIB) |
AC_SUBST(FTDS_LIB) |
| 3846 |
AC_SUBST(freetds) |
AC_SUBST(freetds) |
| 3847 |
|
AC_SUBST(ftds64) |
| 3848 |
|
|
| 3849 |
|
|
| 3850 |
## MySQL |
## MySQL |
| 3851 |
if test "$with_mysql" != "no" ; then |
if test "$with_mysql" != "no" ; then |
| 3852 |
: ${MYSQL_BINPATH=${MYSQL_PATH-/netopt/mysql/current}/bin} |
case "$with_mysql" in |
| 3853 |
|
yes | "" ) : ${MYSQL_PATH=/netopt/mysql/current} ;; |
| 3854 |
|
* ) MYSQL_PATH=$with_mysql ;; |
| 3855 |
|
esac |
| 3856 |
|
: ${MYSQL_BINPATH=$MYSQL_PATH/bin} |
| 3857 |
AC_PATH_PROG(mysql_config, mysql_config, [], [$MYSQL_BINPATH:$PATH]) |
AC_PATH_PROG(mysql_config, mysql_config, [], [$MYSQL_BINPATH:$PATH]) |
| 3858 |
if test -n "$mysql_config" ; then |
if test -n "$mysql_config" ; then |
| 3859 |
: ${MYSQL_BINPATH=`dirname $mysql_config`} |
: ${MYSQL_BINPATH=`dirname $mysql_config`} |
| 3860 |
# Kill off single quotes, due to later requoting |
# Kill off single quotes, due to later requoting |
| 3861 |
: ${MYSQL_INCLUDE=`$mysql_config --cflags | tr -d \'`} |
: ${MYSQL_INCLUDE=`$mysql_config --include | tr -d \'`} |
| 3862 |
: ${MYSQL_LIBS=`$mysql_config --libs |\ |
NCBI_RPATHIFY_OUTPUT_COND(MYSQL_LIBS, $mysql_config --libs${mt_sfx:+_r}, |
| 3863 |
sed -e "s/'//g; s/-L\\([[^ ]]*\\)/-L\\1 ${CONF_f_runpath}\\1/"`} |
[s/'//g; ]) |
| 3864 |
AC_CACHE_CHECK([whether MySQL works], ncbi_cv_lib_mysql, |
AC_CACHE_CHECK([whether MySQL works], ncbi_cv_lib_mysql, |
| 3865 |
[CPPFLAGS="$MYSQL_INCLUDE $orig_CPPFLAGS" |
[CPPFLAGS="$MYSQL_INCLUDE $orig_CPPFLAGS" |
| 3866 |
LIBS="$MYSQL_LIBS $orig_LIBS" |
LIBS="$MYSQL_LIBS $orig_LIBS" |
| 3869 |
[[MYSQL *p; p = mysql_init(p);]])], |
[[MYSQL *p; p = mysql_init(p);]])], |
| 3870 |
[ncbi_cv_lib_mysql=yes], [ncbi_cv_lib_mysql=no])]) |
[ncbi_cv_lib_mysql=yes], [ncbi_cv_lib_mysql=no])]) |
| 3871 |
if test "$ncbi_cv_lib_mysql" = no; then |
if test "$ncbi_cv_lib_mysql" = no; then |
| 3872 |
with_mysql=no |
NCBI_MISSING_PACKAGE(mysql) |
| 3873 |
fi |
fi |
| 3874 |
else |
else |
| 3875 |
with_mysql=no |
NCBI_MISSING_PACKAGE(mysql) |
| 3876 |
fi |
fi |
| 3877 |
fi |
fi |
| 3878 |
if test "$with_mysql" = "no" ; then |
if test "$with_mysql" = "no" ; then |
| 3879 |
MYSQL_PATH="No_MYSQL" |
MYSQL_PATH="No_MYSQL" |
| 3880 |
MYSQL_INCLUDE= |
MYSQL_INCLUDE= |
| 3881 |
MYSQL_LIBS= |
MYSQL_LIBS= |
|
WithoutPackages="$WithoutPackages MySQL" |
|
| 3882 |
else |
else |
| 3883 |
WithPackages="$WithPackages MySQL" |
NCBI_PACKAGE(MySQL) |
| 3884 |
AC_DEFINE(HAVE_MYSQL, 1, [Define to 1 if MySQL is available.]) |
AC_DEFINE(HAVE_MYSQL, 1, [Define to 1 if MySQL is available.]) |
| 3885 |
fi |
fi |
| 3886 |
|
|
| 3888 |
## Berkeley DB library |
## Berkeley DB library |
| 3889 |
if test "$with_bdb" != "no" ; then |
if test "$with_bdb" != "no" ; then |
| 3890 |
case "$with_bdb" in |
case "$with_bdb" in |
| 3891 |
yes | "" ) : ${BERKELEYDB_PATH:="$NCBI/BerkeleyDB"} ;; |
yes | "" ) |
| 3892 |
*/* ) BERKELEYDB_PATH=$with_bdb ;; |
: ${BERKELEYDB_PATH:="$NCBI/BerkeleyDB"} |
| 3893 |
* ) BERKELEYDB_PATH=$NCBI/BerkeleyDB-${with_bdb} ;; |
;; |
| 3894 |
esac |
*/*) |
| 3895 |
BERKELEYDB_INCLUDE="-I$BERKELEYDB_PATH/include" |
BERKELEYDB_PATH=$with_bdb |
| 3896 |
for d in "${release_debug}${bit64_sfx}" "lib${bit64_sfx}" lib; do |
AS_UNSET(BERKELEYDB_INCLUDE) |
| 3897 |
BERKELEYDB_LIBPATH=${BERKELEYDB_PATH}/$d |
AS_UNSET(BERKELEYDB_LIBPATH) |
| 3898 |
test -d ${BERKELEYDB_LIBPATH} && break |
AS_UNSET(BERKELEYDB_LIBS) |
| 3899 |
|
;; |
| 3900 |
|
*) |
| 3901 |
|
BERKELEYDB_PATH=$NCBI/BerkeleyDB-${with_bdb} |
| 3902 |
|
AS_UNSET(BERKELEYDB_INCLUDE) |
| 3903 |
|
AS_UNSET(BERKELEYDB_LIBPATH) |
| 3904 |
|
AS_UNSET(BERKELEYDB_LIBS) |
| 3905 |
|
;; |
| 3906 |
|
esac |
| 3907 |
|
if test -d "$BERKELEYDB_PATH"; then |
| 3908 |
|
NCBI_FIX_DIR(BERKELEYDB_PATH) |
| 3909 |
|
: ${BERKELEYDB_INCLUDE:="-I$BERKELEYDB_PATH/include"} |
| 3910 |
|
fi |
| 3911 |
|
if test -z "${BERKELEYDB_LIBPATH}"; then |
| 3912 |
|
for d in "${compiler_vpfx}${DEBUG_SFX}" "${compiler_pfx}${DEBUG_SFX}" \ |
| 3913 |
|
"${DEBUG_SFX}" lib; do |
| 3914 |
|
for sfx in "$mt_sfx$bit64_sfx" "$bit64_sfx$mt_sfx" "$bit64_sfx" \ |
| 3915 |
|
"$mt_sfx" ""; do |
| 3916 |
|
BERKELEYDB_LIBPATH=${BERKELEYDB_PATH}/$d$sfx |
| 3917 |
|
test -d "${BERKELEYDB_LIBPATH}" && break |
| 3918 |
done |
done |
| 3919 |
BERKELEYDB_LIBS="-L${BERKELEYDB_LIBPATH} ${CONF_f_runpath}${BERKELEYDB_LIBPATH} -ldb" |
test -d "${BERKELEYDB_LIBPATH}" && break |
| 3920 |
|
done |
| 3921 |
|
fi |
| 3922 |
|
if test -d "$BERKELEYDB_LIBPATH"; then |
| 3923 |
|
NCBI_RPATHIFY_COND(BERKELEYDB_LIBS:, ${BERKELEYDB_LIBPATH}, [ -ldb]) |
| 3924 |
|
else |
| 3925 |
|
: ${BERKELEYDB_LIBS:="-ldb"} |
| 3926 |
|
fi |
| 3927 |
if test -f "${BERKELEYDB_LIBPATH}/libdb-static.a"; then |
if test -f "${BERKELEYDB_LIBPATH}/libdb-static.a"; then |
| 3928 |
BERKELEYDB_STATIC_LIBS="-L${BERKELEYDB_LIBPATH} -ldb-static" |
BERKELEYDB_STATIC_LIBS="-L${BERKELEYDB_LIBPATH} -ldb-static" |
| 3929 |
else |
else |
| 3938 |
[[ DB* dbp; db_create(&dbp, NULL, 0); dbp->app_private = 0; ]])], |
[[ DB* dbp; db_create(&dbp, NULL, 0); dbp->app_private = 0; ]])], |
| 3939 |
[ncbi_cv_lib_berkeley_db=yes], [ncbi_cv_lib_berkeley_db=no])]) |
[ncbi_cv_lib_berkeley_db=yes], [ncbi_cv_lib_berkeley_db=no])]) |
| 3940 |
if test "$ncbi_cv_lib_berkeley_db" = "no"; then |
if test "$ncbi_cv_lib_berkeley_db" = "no"; then |
| 3941 |
with_bdb="no" |
NCBI_MISSING_PACKAGE(bdb) |
| 3942 |
else |
else |
| 3943 |
AC_CACHE_CHECK([Berkeley DB version (4.1 or newer required)], |
AC_CACHE_CHECK([Berkeley DB version (4.3 or newer required)], |
| 3944 |
ncbi_cv_lib_berkeley_db_version, |
ncbi_cv_lib_berkeley_db_version, |
| 3945 |
[AC_LANG_CONFTEST([AC_LANG_SOURCE([[ |
[AC_LANG_CONFTEST([AC_LANG_SOURCE([[ |
| 3946 |
#include <db.h> |
#include <db.h> |
| 3952 |
rm -f contest* |
rm -f contest* |
| 3953 |
]) |
]) |
| 3954 |
case "$ncbi_cv_lib_berkeley_db_version" in |
case "$ncbi_cv_lib_berkeley_db_version" in |
| 3955 |
1.* | 2.* | 3.* | 4.0.* ) |
1.* | 2.* | 3.* | 4.[[0-2]].* ) |
| 3956 |
AC_MSG_WARN( |
AC_MSG_WARN( |
| 3957 |
[Your Berkeley DB version is too old to use. (Needed 4.1.)]) |
[Your Berkeley DB version is too old to use. (Needed >= 4.3.)]) |
| 3958 |
|
if test -n "$with_bdb"; then |
| 3959 |
|
AC_MSG_ERROR([--with-bdb: Berkeley DB library is too old]) |
| 3960 |
|
fi |
| 3961 |
with_bdb=no |
with_bdb=no |
| 3962 |
;; |
;; |
| 3963 |
4.1.* ) ;; |
4.[[3-6]].* ) ;; |
| 3964 |
* ) |
* ) |
| 3965 |
AC_MSG_WARN( |
AC_MSG_WARN( |
| 3966 |
[Untested Berkeley DB version; may prove incompatible.]) |
[Untested Berkeley DB version; may prove incompatible.]) |
| 3974 |
BERKELEYDB_PATH="No_BerkeleyDB" |
BERKELEYDB_PATH="No_BerkeleyDB" |
| 3975 |
BERKELEYDB_INCLUDE= |
BERKELEYDB_INCLUDE= |
| 3976 |
BERKELEYDB_LIBS= |
BERKELEYDB_LIBS= |
| 3977 |
WithoutPackages="$WithoutPackages BerkeleyDB" |
BERKELEYDB_STATIC_LIBS= |
| 3978 |
|
BERKELEYDB_CXX_LIBS= |
| 3979 |
|
BERKELEYDB_CXX_STATIC_LIBS= |
| 3980 |
else |
else |
| 3981 |
WithPackages="$WithPackages BerkeleyDB" |
NCBI_PACKAGE(BerkeleyDB) |
| 3982 |
AC_DEFINE(HAVE_BERKELEY_DB, 1, |
AC_DEFINE(HAVE_BERKELEY_DB, 1, |
| 3983 |
[Define to 1 if Berkeley DB libraries are available.]) |
[Define to 1 if Berkeley DB libraries are available.]) |
| 3984 |
|
if test -d "$BERKELEYDB_LIBPATH"; then |
| 3985 |
|
NCBI_RPATHIFY_COND(BERKELEYDB_CXX_LIBS:, ${BERKELEYDB_LIBPATH}, |
| 3986 |
|
[ -ldb_cxx -ldb]) |
| 3987 |
|
else |
| 3988 |
|
: ${BERKELEYDB_CXX_LIBS:="-ldb_cxx -ldb"} |
| 3989 |
|
fi |
| 3990 |
|
if test -f "${BERKELEYDB_LIBPATH}/libdb_cxx-static.a"; then |
| 3991 |
|
BERKELEYDB_CXX_STATIC_LIBS="-L${BERKELEYDB_LIBPATH} -ldb_cxx-static -ldb-static" |
| 3992 |
|
else |
| 3993 |
|
BERKELEYDB_CXX_STATIC_LIBS=${BERKELEYDB_CXX_LIBS} |
| 3994 |
|
fi |
| 3995 |
|
AC_CACHE_CHECK([for native Berkeley DB C++ wrappers (optional)], |
| 3996 |
|
ncbi_cv_lib_berkeley_db_cxx, |
| 3997 |
|
[CPPFLAGS="$BERKELEYDB_INCLUDE $orig_CPPFLAGS" |
| 3998 |
|
LIBS="$BERKELEYDB_CXX_LIBS $orig_LIBS" |
| 3999 |
|
AC_LINK_IFELSE([AC_LANG_PROGRAM( |
| 4000 |
|
[[#include <db_cxx.h>]], |
| 4001 |
|
[[DbEnv env(0); Db db(&env, 0); db.set_app_private(NULL);]])], |
| 4002 |
|
[ncbi_cv_lib_berkeley_db_cxx=yes], |
| 4003 |
|
[ncbi_cv_lib_berkeley_db_cxx=no])]) |
| 4004 |
|
if test "$ncbi_cv_lib_berkeley_db_cxx" = "yes"; then |
| 4005 |
|
NCBI_PACKAGE(BerkeleyDB++) |
| 4006 |
|
AC_DEFINE(HAVE_BERKELEY_DB_CXX, 1, |
| 4007 |
|
[Define to 1 if the Berkeley `db_cxx' library is available.]) |
| 4008 |
|
else |
| 4009 |
|
BERKELEYDB_CXX_LIBS= |
| 4010 |
|
BERKELEYDB_CXX_STATIC_LIBS= |
| 4011 |
|
fi |
| 4012 |
fi |
fi |
| 4013 |
|
|
| 4014 |
|
|
| 4015 |
## ODBC |
## ODBC |
|
if test "$with_odbc" != "no" ; then |
|
| 4016 |
case "$with_odbc" in |
case "$with_odbc" in |
| 4017 |
yes | "" ) : ${ODBC_PATH:="/opt/machine/merant"} ;; |
# yes | "" ) : ${ODBC_PATH:="/opt/machine/merant"} ;; |
| 4018 |
*/* ) ODBC_PATH=$with_odbc ;; |
yes | "" ) : ${ODBC_PATH:=dbapi/driver/odbc/unix_odbc} ;; |
| 4019 |
|
internal ) ODBC_PATH=dbapi/driver/odbc/unix_odbc ;; |
| 4020 |
|
* ) ODBC_PATH=$with_odbc ;; |
| 4021 |
esac |
esac |
| 4022 |
|
|
| 4023 |
|
case "$ODBC_PATH" in |
| 4024 |
|
dbapi/* ) ;; |
| 4025 |
|
*) |
| 4026 |
ODBC_INCLUDE="-I$ODBC_PATH/include" |
ODBC_INCLUDE="-I$ODBC_PATH/include" |
| 4027 |
ODBC_LIBPATH="${ODBC_PATH}/lib" |
ODBC_LIBPATH="${ODBC_PATH}/lib" |
| 4028 |
ODBC_LIBS="-L${ODBC_LIBPATH} ${CONF_f_runpath}${ODBC_LIBPATH} -lodbc -lodbcinst" |
NCBI_RPATHIFY(ODBC_LIBS, ${ODBC_LIBPATH}, [ -lodbc -lodbcinst]) |
| 4029 |
CPPFLAGS="$ODBC_INCLUDE $orig_CPPFLAGS" |
CPPFLAGS="$ODBC_INCLUDE $orig_CPPFLAGS" |
| 4030 |
LIBS="$ODBC_LIBS $orig_LIBS" |
LIBS="$ODBC_LIBS $orig_LIBS" |
| 4031 |
AC_CACHE_CHECK([for ODBC libraries in $ODBC_PATH], ncbi_cv_lib_odbc, |
AC_CACHE_CHECK([for ODBC libraries in $ODBC_PATH], ncbi_cv_lib_odbc, |
| 4035 |
SQLRETURN x = SQLConnect(hdbc, cp, 1, cp, 2, cp, 3);]])], |
SQLRETURN x = SQLConnect(hdbc, cp, 1, cp, 2, cp, 3);]])], |
| 4036 |
[ncbi_cv_lib_odbc=yes], [ncbi_cv_lib_odbc=no])]) |
[ncbi_cv_lib_odbc=yes], [ncbi_cv_lib_odbc=no])]) |
| 4037 |
if test "$ncbi_cv_lib_odbc" = "no"; then |
if test "$ncbi_cv_lib_odbc" = "no"; then |
| 4038 |
with_odbc="no" |
dnl ODBC_PATH=dbapi/driver/odbc/unix_odbc |
| 4039 |
|
dnl AC_MSG_WARN([Falling back to internal FreeTDS-specific ODBC implementation.]) |
| 4040 |
|
NCBI_MISSING_PACKAGE(odbc) |
| 4041 |
else |
else |
| 4042 |
# odbcss.h isn't self-contained :-/ |
# odbcss.h isn't self-contained :-/ |
| 4043 |
AC_CHECK_HEADERS(odbcss.h, [], [], [#include <sql.h>]) |
AC_CHECK_HEADERS(odbcss.h, [], [], [#include <sql.h>]) |
| 4044 |
|
|
| 4045 |
|
AC_CHECK_FUNCS(SQLGetPrivateProfileString) |
| 4046 |
|
AC_CHECK_TYPES(SQLLEN,,,[#include <sqltypes.h>]) |
| 4047 |
|
|
| 4048 |
|
AC_CACHE_CHECK([whether SQLColAttribute's last argument is an SQLLEN *], |
| 4049 |
|
ncbi_cv_func_sqlcolattribute_sqllen, |
| 4050 |
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 4051 |
|
[[#include <sql.h>> |
| 4052 |
|
SQLRETURN SQL_API SQLColAttribute |
| 4053 |
|
(SQLHSTMT sh, SQLUSMALLINT cn, SQLUSMALLINT fi, SQLPOINTER ca, |
| 4054 |
|
SQLSMALLINT bl, SQLSMALLINT *sl, SQLLEN *na);]], |
| 4055 |
|
[[]])], |
| 4056 |
|
ncbi_cv_func_sqlcolattribute_sqllen=yes, |
| 4057 |
|
ncbi_cv_func_sqlcolattribute_sqllen=no)]) |
| 4058 |
|
if test $ncbi_cv_func_sqlcolattribute_sqllen = yes; then |
| 4059 |
|
AC_DEFINE(NCBI_SQLCOLATTRIBUTE_SQLLEN, 1, |
| 4060 |
|
[Define to 1 if SQLColAttribute's last argument is an SQLLEN *]) |
| 4061 |
fi |
fi |
| 4062 |
fi |
fi |
| 4063 |
if test "$with_odbc" = "no" ; then |
;; |
| 4064 |
ODBC_PATH="No_ODBC" |
esac |
| 4065 |
ODBC_INCLUDE= |
|
| 4066 |
|
case "$ODBC_PATH" in |
| 4067 |
|
dbapi/*) |
| 4068 |
|
# ODBC_PATH="No_ODBC" |
| 4069 |
|
# Point to a local copy of unixODBC's headers, required by FreeTDS 0.64+. |
| 4070 |
|
ODBC_INCLUDE="-I\$(includedir)/$ODBC_PATH -I\$(includedir0)/$ODBC_PATH" |
| 4071 |
ODBC_LIBS= |
ODBC_LIBS= |
| 4072 |
WithoutPackages="$WithoutPackages ODBC" |
dnl AC_DEFINE(HAVE_SQLGETPRIVATEPROFILESTRING, 1) |
| 4073 |
else |
AC_DEFINE(HAVE_SQLLEN, 1) |
| 4074 |
WithPackages="$WithPackages ODBC" |
;; |
| 4075 |
|
*) |
| 4076 |
|
NCBI_PACKAGE(ODBC) |
| 4077 |
AC_DEFINE(HAVE_ODBC, 1, [Define to 1 if ODBC libraries are available.]) |
AC_DEFINE(HAVE_ODBC, 1, [Define to 1 if ODBC libraries are available.]) |
| 4078 |
|
;; |
| 4079 |
|
esac |
| 4080 |
|
|
| 4081 |
|
## Python |
| 4082 |
|
if test "$with_python" != "no" ; then |
| 4083 |
|
case "$with_python" in |
| 4084 |
|
yes | "" ) ;; |
| 4085 |
|
*/* ) PYTHON_PATH=$with_python ;; |
| 4086 |
|
esac |
| 4087 |
|
NCBI_CHECK_PYTHON() |
| 4088 |
|
NCBI_CHECK_PYTHON(2.3) |
| 4089 |
|
: ${PYTHON_PATH:="/usr/local/python-2.4.4"} |
| 4090 |
|
NCBI_CHECK_PYTHON(2.4) |
| 4091 |
|
NCBI_CHECK_PYTHON(2.5) |
| 4092 |
|
if test "$ncbi_cv_lib_python" = "no"; then |
| 4093 |
|
# Favor python 2.4 as the only version configure historically |
| 4094 |
|
# recognized, but otherwise prefer newer versions. |
| 4095 |
|
if test "$ncbi_cv_lib_python24" = "yes"; then |
| 4096 |
|
PYTHON_INCLUDE=$PYTHON24_INCLUDE |
| 4097 |
|
PYTHON_LIBS=$PYTHON24_LIBS |
| 4098 |
|
elif test "$ncbi_cv_lib_python25" = "yes"; then |
| 4099 |
|
PYTHON_INCLUDE=$PYTHON25_INCLUDE |
| 4100 |
|
PYTHON_LIBS=$PYTHON25_LIBS |
| 4101 |
|
elif test "$ncbi_cv_lib_python23" = "yes"; then |
| 4102 |
|
PYTHON_INCLUDE=$PYTHON23_INCLUDE |
| 4103 |
|
PYTHON_LIBS=$PYTHON23_LIBS |
| 4104 |
|
fi |
| 4105 |
|
if test -n "$PYTHON_LIBS"; then |
| 4106 |
|
NCBI_PACKAGE(PYTHON) |
| 4107 |
|
AC_DEFINE(HAVE_PYTHON, 1) |
| 4108 |
|
else |
| 4109 |
|
NCBI_MISSING_PACKAGE(python) |
| 4110 |
|
fi |
| 4111 |
|
fi |
| 4112 |
|
fi |
| 4113 |
|
|
| 4114 |
|
## CPPUNIT |
| 4115 |
|
if test "$with_cppunit" != "no" ; then |
| 4116 |
|
case "$with_cppunit" in |
| 4117 |
|
yes | "" ) : ${CPPUNIT_PATH=$NCBI/cppunit} ;; |
| 4118 |
|
* ) CPPUNIT_PATH=$with_cppunit ;; |
| 4119 |
|
esac |
| 4120 |
|
if test -d "$CPPUNIT_PATH/${compiler_vpfx}Debug${bit64_sfx}/lib" \ |
| 4121 |
|
-a -z "$CPPUNIT_ARCH_PATH"; then |
| 4122 |
|
CPPUNIT_ARCH_PATH="$CPPUNIT_PATH/${compiler_vpfx}Debug${bit64_sfx}" |
| 4123 |
|
elif test -d "$CPPUNIT_PATH/${compiler_pfx}Debug${bit64_sfx}/lib" \ |
| 4124 |
|
-a -z "$CPPUNIT_ARCH_PATH"; then |
| 4125 |
|
CPPUNIT_ARCH_PATH="$CPPUNIT_PATH/${compiler_pfx}Debug${bit64_sfx}" |
| 4126 |
|
else |
| 4127 |
|
CPPUNIT_ARCH_PATH="$CPPUNIT_PATH" |
| 4128 |
|
fi |
| 4129 |
|
CPPUNIT_BINPATH=${CPPUNIT_BINPATH:="$CPPUNIT_ARCH_PATH/bin"} |
| 4130 |
|
CPPUNIT_LIBPATH=${CPPUNIT_LIBPATH:="$CPPUNIT_ARCH_PATH/lib"} |
| 4131 |
|
CPPUNIT_INCLUDE= |
| 4132 |
|
AC_CACHE_CHECK([for CPPUNIT in $CPPUNIT_ARCH_PATH], ncbi_cv_lib_cppunit, |
| 4133 |
|
[if test -x "$CPPUNIT_BINPATH/cppunit-config" ; then |
| 4134 |
|
CPPUNIT_INCLUDE=`$CPPUNIT_BINPATH/cppunit-config --cflags` |
| 4135 |
|
NCBI_RPATHIFY_OUTPUT(CPPUNIT_LIBS, |
| 4136 |
|
$CPPUNIT_BINPATH/cppunit-config --libs) |
| 4137 |
|
|
| 4138 |
|
CPPFLAGS="$CPPUNIT_INCLUDE $orig_CPPFLAGS" |
| 4139 |
|
LIBS="$CPPUNIT_LIBS $orig_LIBS" |
| 4140 |
|
AC_LINK_IFELSE([AC_LANG_PROGRAM( |
| 4141 |
|
[[ |
| 4142 |
|
#include <cppunit/TestResult.h> |
| 4143 |
|
#include <cppunit/TestResultCollector.h> |
| 4144 |
|
]], |
| 4145 |
|
[[ |
| 4146 |
|
CPPUNIT_NS::TestResult controller; |
| 4147 |
|
CPPUNIT_NS::TestResultCollector result; |
| 4148 |
|
controller.addListener( &result ); |
| 4149 |
|
]])], |
| 4150 |
|
[ncbi_cv_lib_cppunit=yes], [ncbi_cv_lib_cppunit=no]) |
| 4151 |
|
else |
| 4152 |
|
ncbi_cv_lib_cppunit=no |
| 4153 |
|
fi]) |
| 4154 |
|
if test "$ncbi_cv_lib_cppunit" = "no"; then |
| 4155 |
|
NCBI_MISSING_PACKAGE(cppunit) |
| 4156 |
|
fi |
| 4157 |
|
fi |
| 4158 |
|
|
| 4159 |
|
if test "$with_cppunit" = "no" ; then |
| 4160 |
|
CPPUNIT_PATH="No_CPPUNIT" |
| 4161 |
|
CPPUNIT_INCLUDE= |
| 4162 |
|
CPPUNIT_LIBS= |
| 4163 |
|
else |
| 4164 |
|
NCBI_PACKAGE(CPPUNIT) |
| 4165 |
|
CPPUNIT_CONFIG="$CPPUNIT_BINPATH/cppunit-config" |
| 4166 |
|
# The "yes" may have been cached; get the actual settings again if needed |
| 4167 |
|
if test -z "$CPPUNIT_INCLUDE"; then |
| 4168 |
|
CPPUNIT_INCLUDE=`$CPPUNIT_CONFIG --cflags` |
| 4169 |
|
NCBI_RPATHIFY_OUTPUT(CPPUNIT_LIBS, $CPPUNIT_CONFIG --libs) |
| 4170 |
|
fi |
| 4171 |
|
AC_DEFINE(HAVE_CPPUNIT, 1, [Define to 1 if CPPUNIT libraries are available.]) |
| 4172 |
|
fi |
| 4173 |
|
|
| 4174 |
|
|
| 4175 |
|
## Boost |
| 4176 |
|
if test "$with_boost" != "no"; then |
| 4177 |
|
if test "${with_boost-yes}" = yes; then |
| 4178 |
|
: ${BOOST_PATH=$NCBI/boost} |
| 4179 |
|
else |
| 4180 |
|
BOOST_PATH=$with_boost |
| 4181 |
|
fi |
| 4182 |
|
if test -d "$BOOST_PATH"; then |
| 4183 |
|
NCBI_FIX_DIR(BOOST_PATH) |
| 4184 |
|
fi |
| 4185 |
|
: ${BOOST_INCLUDE=-I$BOOST_PATH/include} |
| 4186 |
|
BOOST_LIBPATH_=$BOOST_PATH/lib |
| 4187 |
|
NCBI_RPATHIFY_COND(BOOST_LIBPATH, $BOOST_LIBPATH_) |
| 4188 |
|
test -n "$BOOST_PATH" || BOOST_LIBPATH_=/usr/lib |
| 4189 |
|
boost_path_digits=`basename $BOOST_PATH | sed -e 's/.0$//' | tr -cd 0123456789` |
| 4190 |
|
if test -n "$boost_path_digits"; then |
| 4191 |
|
boost_version_digits=`echo $ncbi_cv_lib_boost_version | sed -e 's/.0$//' | tr -cd 0123456789` |
| 4192 |
|
if test $boost_path_digits != "$boost_version_digits"; then |
| 4193 |
|
# presumably stale, particularly if boost_version WASN'T cached; |
| 4194 |
|
# uncache all relevant settings |
| 4195 |
|
AS_UNSET(ncbi_cv_lib_boost_version) |
| 4196 |
|
AS_UNSET(ncbi_cv_lib_boost_regex) |
| 4197 |
|
AS_UNSET(ncbi_cv_lib_boost_spirit) |
| 4198 |
|
AS_UNSET(ncbi_cv_lib_boost_test) |
| 4199 |
|
AS_UNSET(ncbi_cv_lib_boost_thread) |
| 4200 |
|
fi |
| 4201 |
|
fi |
| 4202 |
|
AC_CACHE_CHECK([Boost version], |
| 4203 |
|
ncbi_cv_lib_boost_version, |
| 4204 |
|
[AC_LANG_CONFTEST([AC_LANG_SOURCE([[ |
| 4205 |
|
#include <boost/version.hpp> |
| 4206 |
|
ncbi_cv_lib_boost_version=BOOST_LIB_VERSION |
| 4207 |
|
]])]) |
| 4208 |
|
eval "$ac_cpp $BOOST_INCLUDE conftest.$ac_ext" \ |
| 4209 |
|
2>&AS_MESSAGE_LOG_FD | grep '^ncbi_cv_' | tr -d ' ' > conftest.sh |
| 4210 |
|
. ./conftest.sh |
| 4211 |
|
rm -f contest* |
| 4212 |
|
]) |
| 4213 |
|
if test -d `echo $BOOST_INCLUDE | sed -e 's/^-I//'`/boost-${ncbi_cv_lib_boost_version}/boost; then |
| 4214 |
|
BOOST_INCLUDE=$BOOST_INCLUDE/boost-${ncbi_cv_lib_boost_version} |
| 4215 |
|
fi |
| 4216 |
|
case "$ncbi_compiler" in |
| 4217 |
|
MIPSPRO) |
| 4218 |
|
BOOST_INCLUDE="$BOOST_INCLUDE $BOOST_INCLUDE/boost/compatibility/cpp_c_headers" |
| 4219 |
|
;; |
| 4220 |
|
WORKSHOP) |
| 4221 |
|
# Boost.Test's macros yield a *lot* of spurious "should not initialize |
| 4222 |
|
# a non-const reference with a temporary" warnings, to the point of |
| 4223 |
|
# overwhelming the compiler in some cases; turn them off altogether |
| 4224 |
|
# when using Boost at all. |
| 4225 |
|
BOOST_INCLUDE="$BOOST_INCLUDE -erroff=reftotemp" |
| 4226 |
|
;; |
| 4227 |
|
esac |
| 4228 |
|
case "$ncbi_cv_lib_boost_version" in |
| 4229 |
|
0_* | 1_[[0-9]] | 1_[[0-9]]_* | 1_[[0-2]][[0-9]] | 1_[[0-2]][[0-9]]_* ) ;; |
| 4230 |
|
1_3[[0-3]] | 1_3[[0-4]]_* ) |
| 4231 |
|
AC_MSG_WARN( |
| 4232 |
|
[Your Boost version is too old to use. (Needed >= 1.35.)]) |
| 4233 |
|
if test -n "$with_boost"; then |
| 4234 |
|
AC_MSG_ERROR([--with-boost: Boost library is too old]) |
| 4235 |
|
fi |
| 4236 |
|
with_boost=no |
| 4237 |
|
;; |
| 4238 |
|
1_35 | 1_35_* ) ;; |
| 4239 |
|
* ) |
| 4240 |
|
AC_MSG_WARN( |
| 4241 |
|
[Untested Boost version; may prove incompatible.]) |
| 4242 |
|
AC_MSG_WARN( |
| 4243 |
|
[If so, please re-run this script with the flag --without-boost.]) |
| 4244 |
|
;; |
| 4245 |
|
esac |
| 4246 |
|
AC_MSG_CHECKING([for Boost library name tag]) |
| 4247 |
|
boost_compiler_version=`echo $compiler_version | cut -c1-2` |
| 4248 |
|
case "$with_boost_tag" in |
| 4249 |
|
yes | "" ) |
| 4250 |
|
case "$host_os:$ncbi_compiler" in |
| 4251 |
|
darwin*:GCC) BOOST_TAG="" ;; |
| 4252 |
|
*:GCC) BOOST_TAG="-gcc$boost_compiler_version" ;; |
| 4253 |
|
*:KCC) BOOST_TAG="-kcc" ;; |
| 4254 |
|
linux*:ICC) BOOST_TAG="-il$boost_compiler_version" ;; |
| 4255 |
|
*:WORKSHOP) BOOST_TAG="-sw" ;; |
| 4256 |
|
*:MIPSPRO) BOOST_TAG="-mp" ;; |
| 4257 |
|
*:VISUALAGE) BOOST_TAG="-xlc" ;; |
| 4258 |
|
*:COMPAQ) BOOST_TAG="-tru" ;; |
| 4259 |
|
*:MSVC) BOOST_TAG="-vc" ;; |
| 4260 |
|
esac |
| 4261 |
|
test "$with_mt" = "yes" && BOOST_MT=-mt |
| 4262 |
|
test "$with_debug" = "yes" && BOOST_D=-d |
| 4263 |
|
test "$bit64_sfx" = "64" && BOOST_64=-64 |
| 4264 |
|
found=no |
| 4265 |
|
for bvers in "-$ncbi_cv_lib_boost_version" ''; do |
| 4266 |
|
for b64 in $BOOST_64 ''; do |
| 4267 |
|
for bmt in "$BOOST_MT" '-mt' ''; do |
| 4268 |
|
for bd in "$BOOST_D" '' '-d'; do |
| 4269 |
|
bsfx=$bmt$bd$bvers$b64 |
| 4270 |
|
if ls $BOOST_LIBPATH_/libboost*$BOOST_TAG$bsfx.* \ |
| 4271 |
|
>/dev/null 2>&1; |
| 4272 |
|
then |
| 4273 |
|
found=yes |
| 4274 |
|
break |
| 4275 |
|
fi |
| 4276 |
|
done |
| 4277 |
|
test "$found" = yes && break |
| 4278 |
|
done |
| 4279 |
|
test "$found" = yes && break |
| 4280 |
|
done |
| 4281 |
|
test "$found" = yes && break |
| 4282 |
|
done |
| 4283 |
|
|
| 4284 |
|
BOOST_TAG=$BOOST_TAG$bsfx |
| 4285 |
|
AC_MSG_RESULT([$BOOST_TAG (autodetected)]) |
| 4286 |
|
;; |
| 4287 |
|
no ) |
| 4288 |
|
BOOST_TAG="" |
| 4289 |
|
AC_MSG_RESULT([none (by explicit request)]) |
| 4290 |
|
;; |
| 4291 |
|
*) |
| 4292 |
|
BOOST_TAG=$with_boost_tag |
| 4293 |
|
AC_MSG_RESULT([$BOOST_TAG (by explicit request)]) |
| 4294 |
|
;; |
| 4295 |
|
esac |
| 4296 |
|
|
| 4297 |
|
case "$BOOST_TAG" in |
| 4298 |
|
*-mt*) ;; |
| 4299 |
|
*) BOOST_INCLUDE="$BOOST_INCLUDE -DBOOST_DISABLE_THREADS" ;; |
| 4300 |
|
esac |
| 4301 |
|
|
| 4302 |
|
BOOST_REGEX_LIBS=-lboost_regex${BOOST_TAG} |
| 4303 |
|
if test -f "$BOOST_LIBPATH_/libboost_regex${BOOST_TAG}-static.a"; then |
| 4304 |
|
BOOST_REGEX_STATIC_LIBS=-lboost_regex${BOOST_TAG}-static |
| 4305 |
|
else |
| 4306 |
|
BOOST_REGEX_STATIC_LIBS=$BOOST_REGEX_LIBS |
| 4307 |
|
fi |
| 4308 |
|
|
| 4309 |
|
AC_CACHE_CHECK([for Boost.Regex in $BOOST_PATH], ncbi_cv_lib_boost_regex, |
| 4310 |
|
CPPFLAGS="$BOOST_INCLUDE $orig_CPPFLAGS" |
| 4311 |
|
LIBS="$BOOST_LIBPATH $BOOST_REGEX_LIBS $RT_LIBS $orig_LIBS" |
| 4312 |
|
[AC_LINK_IFELSE( |
| 4313 |
|
[AC_LANG_PROGRAM([[#include <boost/regex.hpp>]], |
| 4314 |
|
[[throw boost::regex_error(boost::regex_constants::error_stack);]])], |
| 4315 |
|
[ncbi_cv_lib_boost_regex=yes], [ncbi_cv_lib_boost_regex=no])]) |
| 4316 |
|
|
| 4317 |
|
AC_CACHE_CHECK([for Boost.Spirit in $BOOST_PATH], ncbi_cv_lib_boost_spirit, |
| 4318 |
|
CPPFLAGS="$BOOST_INCLUDE $orig_CPPFLAGS" |
| 4319 |
|
LIBS="$RT_LIBS $orig_LIBS" |
| 4320 |
|
[AC_LINK_IFELSE( |
| 4321 |
|
[AC_LANG_PROGRAM([[#include <boost/spirit.hpp>]], |
| 4322 |
|
[[boost::spirit::parse("123", boost::spirit::int_p);]])], |
| 4323 |
|
[ncbi_cv_lib_boost_spirit=yes], [ncbi_cv_lib_boost_spirit=no])]) |
| 4324 |
|
|
| 4325 |
|
BOOST_TEST_PEM_LIBS=-lboost_prg_exec_monitor${BOOST_TAG} |
| 4326 |
|
if test -f "$BOOST_LIBPATH_/libboost_prg_exec_monitor${BOOST_TAG}-static.a"; then |
| 4327 |
|
BOOST_TEST_PEM_STATIC_LIBS=-lboost_prg_exec_monitor${BOOST_TAG}-static |
| 4328 |
|
else |
| 4329 |
|
BOOST_TEST_PEM_STATIC_LIBS=$BOOST_TEST_PEM_LIBS |
| 4330 |
|
fi |
| 4331 |
|
|
| 4332 |
|
BOOST_TEST_TEM_LIBS=-lboost_test_exec_monitor${BOOST_TAG} |
| 4333 |
|
if test -f "$BOOST_LIBPATH_/libboost_test_exec_monitor${BOOST_TAG}-static.a"; then |
| 4334 |
|
BOOST_TEST_TEM_STATIC_LIBS=-lboost_test_exec_monitor${BOOST_TAG}-static |
| 4335 |
|
else |
| 4336 |
|
BOOST_TEST_TEM_STATIC_LIBS=$BOOST_TEST_TEM_LIBS |
| 4337 |
|
fi |
| 4338 |
|
|
| 4339 |
|
BOOST_TEST_UTF_LIBS=-lboost_unit_test_framework${BOOST_TAG} |
| 4340 |
|
if test -f "$BOOST_LIBPATH_/libboost_unit_test_framework${BOOST_TAG}-static.a"; then |
| 4341 |
|
BOOST_TEST_UTF_STATIC_LIBS=-lboost_unit_test_framework${BOOST_TAG}-static |
| 4342 |
|
else |
| 4343 |
|
BOOST_TEST_UTF_STATIC_LIBS=$BOOST_TEST_UTF_LIBS |
| 4344 |
|
dnl AC_DEFINE([NCBI_BOOST_TEST_DLL], 1, |
| 4345 |
|
dnl [Define to 1 if unable to locate an appropriate |
| 4346 |
|
dnl libboost_unit_test_framework${BOOST_TAG}-static.a.]) |
| 4347 |
|
fi |
| 4348 |
|
|
| 4349 |
|
BOOST_TEST_PEM_LIBS=$BOOST_TEST_PEM_STATIC_LIBS |
| 4350 |
|
BOOST_TEST_TEM_LIBS=$BOOST_TEST_TEM_STATIC_LIBS |
| 4351 |
|
BOOST_TEST_UTF_LIBS=$BOOST_TEST_UTF_STATIC_LIBS |
| 4352 |
|
|
| 4353 |
|
AC_CACHE_CHECK([for Boost.Test in $BOOST_PATH], ncbi_cv_lib_boost_test, |
| 4354 |
|
CPPFLAGS="$BOOST_INCLUDE $orig_CPPFLAGS" |
| 4355 |
|
LIBS="$RT_LIBS $orig_LIBS" |
| 4356 |
|
found= |
| 4357 |
|
for mode in included external; do |
| 4358 |
|
if test "$mode" = external; then |
| 4359 |
|
CPPFLAGS="-DNCBI_BOOST_NOT_INCLUDED $CPPFLAGS" |
| 4360 |
|
LIBS="$BOOST_LIBPATH $BOOST_TEST_UTF_LIBS $LIBS" |
| 4361 |
fi |
fi |
| 4362 |
|
[AC_LINK_IFELSE( |
| 4363 |
|
[AC_LANG_SOURCE( |
| 4364 |
|
[[#ifdef NCBI_BOOST_NOT_INCLUDED |
| 4365 |
|
# include <boost/test/unit_test.hpp> |
| 4366 |
|
#else |
| 4367 |
|
# include <boost/test/included/unit_test.hpp> |
| 4368 |
|
#endif |
| 4369 |
|
using boost::unit_test::test_suite; |
| 4370 |
|
static void s_Test1(void) { BOOST_CHECK(1 == 1); } |
| 4371 |
|
test_suite* init_unit_test_suite(int, char*[]) |
| 4372 |
|
{ |
| 4373 |
|
test_suite* test = BOOST_TEST_SUITE("foo"); |
| 4374 |
|
test->add(BOOST_TEST_CASE(&s_Test1), 0); |
| 4375 |
|
return test; |
| 4376 |
|
}]])], |
| 4377 |
|
[found="$found:$mode"])] |
| 4378 |
|
done |
| 4379 |
|
[case "$found" in |
| 4380 |
|
:included:external ) ncbi_cv_lib_boost_test=yes ;; |
| 4381 |
|
:included ) ncbi_cv_lib_boost_test=included-only ;; |
| 4382 |
|
:external ) ncbi_cv_lib_boost_test=external-only ;; |
| 4383 |
|
'' ) ncbi_cv_lib_boost_test=no ;; |
| 4384 |
|
esac]) |
| 4385 |
|
|
| 4386 |
|
BOOST_THREAD_LIBS=-lboost_thread${BOOST_TAG} |
| 4387 |
|
if test -f "$BOOST_LIBPATH_/libboost_thread${BOOST_TAG}-static.a"; then |
| 4388 |
|
BOOST_THREAD_STATIC_LIBS=-lboost_thread${BOOST_TAG}-static |
| 4389 |
|
else |
| 4390 |
|
BOOST_THREAD_STATIC_LIBS=$BOOST_THREAD_LIBS |
| 4391 |
|
fi |
| 4392 |
|
|
| 4393 |
|
AC_CACHE_CHECK([for Boost.Threads in $BOOST_PATH], ncbi_cv_lib_boost_thread, |
| 4394 |
|
CPPFLAGS="$BOOST_INCLUDE $orig_CPPFLAGS" |
| 4395 |
|
LIBS="$BOOST_LIBPATH $BOOST_THREAD_LIBS $RT_LIBS $orig_LIBS" |
| 4396 |
|
[AC_LINK_IFELSE( |
| 4397 |
|
[AC_LANG_PROGRAM([[#include <boost/thread.hpp>]], |
| 4398 |
|
[[boost::mutex m; boost::mutex::scoped_lock l(m);]])], |
| 4399 |
|
[ncbi_cv_lib_boost_thread=yes], [ncbi_cv_lib_boost_thread=no])]) |
| 4400 |
|
else |
| 4401 |
|
BOOST_INCLUDE= |
| 4402 |
|
BOOST_LIBPATH= |
| 4403 |
|
BOOST_TAG= |
| 4404 |
|
ncbi_cv_lib_boost_regex=no |
| 4405 |
|
ncbi_cv_lib_boost_test=no |
| 4406 |
|
ncbi_cv_lib_boost_thread=no |
| 4407 |
|
fi |
| 4408 |
|
|
| 4409 |
|
if test "$ncbi_cv_lib_boost_regex" != "no"; then |
| 4410 |
|
AC_DEFINE(HAVE_BOOST_REGEX, 1, |
| 4411 |
|
[Define to 1 if the `Boost.Regex' library is available.]) |
| 4412 |
|
NCBI_PACKAGE(Boost.Regex) |
| 4413 |
|
else |
| 4414 |
|
BOOST_REGEX_LIBS= |
| 4415 |
|
BOOST_REGEX_STATIC_LIBS= |
| 4416 |
|
fi |
| 4417 |
|
|
| 4418 |
|
if test "$ncbi_cv_lib_boost_spirit" != "no"; then |
| 4419 |
|
AC_DEFINE(HAVE_BOOST_SPIRIT, 1, |
| 4420 |
|
[Define to 1 if the `Boost.Spirit' headers are available.]) |
| 4421 |
|
NCBI_PACKAGE(Boost.Spirit) |
| 4422 |
|
fi |
| 4423 |
|
|
| 4424 |
|
if test "$ncbi_cv_lib_boost_test" != "no"; then |
| 4425 |
|
AC_DEFINE(HAVE_BOOST_TEST, 1, |
| 4426 |
|
[Define to 1 if the `Boost.Test' libraries are available.]) |
| 4427 |
|
if test "$ncbi_cv_lib_boost_test" != "included-only"; then |
| 4428 |
|
NCBI_PACKAGE(Boost.Test) |
| 4429 |
|
fi |
| 4430 |
|
if test "$ncbi_cv_lib_boost_test" != "external-only"; then |
| 4431 |
|
NCBI_PACKAGE(Boost.Test.Included) |
| 4432 |
|
fi |
| 4433 |
|
else |
| 4434 |
|
BOOST_TEST_PEM_LIBS= |
| 4435 |
|
BOOST_TEST_PEM_STATIC_LIBS= |
| 4436 |
|
BOOST_TEST_TEM_LIBS= |
| 4437 |
|
BOOST_TEST_TEM_STATIC_LIBS= |
| 4438 |
|
BOOST_TEST_UTF_LIBS= |
| 4439 |
|
BOOST_TEST_UTF_STATIC_LIBS= |
| 4440 |
|
fi |
| 4441 |
|
|
| 4442 |
|
if test "$ncbi_cv_lib_boost_thread" != "no"; then |
| 4443 |
|
AC_DEFINE(HAVE_BOOST_THREAD, 1, |
| 4444 |
|
[Define to 1 if the `Boost.Threads' library is available.]) |
| 4445 |
|
NCBI_PACKAGE(Boost.Threads) |
| 4446 |
|
else |
| 4447 |
|
BOOST_THREAD_LIBS= |
| 4448 |
|
BOOST_THREAD_STATIC_LIBS= |
| 4449 |
|
fi |
| 4450 |
|
|
| 4451 |
|
case "$with_boost:$ncbi_cv_lib_boost_test" in |
| 4452 |
|
:* | no:* | *:yes | *:included-only ) ;; # no problem |
| 4453 |
|
* ) AC_MSG_ERROR([Boost explicitly requested, but Boost.Test.Included unavailable.]) ;; |
| 4454 |
|
esac |
| 4455 |
|
|
| 4456 |
|
|
| 4457 |
## NCBI C Toolkit |
## NCBI C Toolkit |
| 4458 |
if test "$with_ncbi_c" != "no" ; then |
if test "$with_ncbi_c" != "no" ; then |
| 4459 |
NCBI_C_PATH=${NCBI_C_PATH:="$NCBI"} |
NCBI_C_PATH=${NCBI_C_PATH:="$NCBI"} |
| 4460 |
|
if test "$ncbi_compiler" = ICC -a -d "$NCBI_C_PATH/ncbi_icc"; then |
| 4461 |
|
NCBI_C_PATH=$NCBI_C_PATH/ncbi_icc |
| 4462 |
|
fi |
| 4463 |
|
|
| 4464 |
NCBI_C_INCLUDE="-I$NCBI_C_PATH/include${bit64_sfx}" |
NCBI_C_INCLUDE="-I$NCBI_C_PATH/include${bit64_sfx}" |
| 4465 |
if test "$with_debug" = "no" ; then |
if test "$with_debug" = "no" ; then |
| 4466 |
NCBI_C_LIBPATH="$NCBI_C_PATH/lib${bit64_sfx}" |
NCBI_C_LIBPATH="$NCBI_C_PATH/lib${bit64_sfx}" |
| 4486 |
[[ Nlm_Boolean b = Nlm_GetArgs("fake", -1, 0); ]])], |
[[ Nlm_Boolean b = Nlm_GetArgs("fake", -1, 0); ]])], |
| 4487 |
[ncbi_cv_lib_ctools=yes], [ncbi_cv_lib_ctools=no])]) |
[ncbi_cv_lib_ctools=yes], [ncbi_cv_lib_ctools=no])]) |
| 4488 |
if test "$ncbi_cv_lib_ctools" = no; then |
if test "$ncbi_cv_lib_ctools" = no; then |
| 4489 |
with_ncbi_c=no |
NCBI_MISSING_PACKAGE(ncbi-c) |
| 4490 |
fi |
fi |
| 4491 |
fi |
fi |
| 4492 |
if test "$with_ncbi_c" = "no" ; then |
if test "$with_ncbi_c" = "no" ; then |
| 4493 |
|
if test "$with_ctools" = "yes"; then |
| 4494 |
|
AC_MSG_ERROR([--with-ctools: NCBI C Toolkit is missing]) |
| 4495 |
|
fi |
| 4496 |
NCBI_C_PATH="No_NCBI_CToolkit" |
NCBI_C_PATH="No_NCBI_CToolkit" |
| 4497 |
NCBI_C_INCLUDE= |
NCBI_C_INCLUDE= |
| 4498 |
NCBI_C_LIBPATH= |
NCBI_C_LIBPATH= |
| 4499 |
NCBI_C_ncbi= |
NCBI_C_ncbi= |
|
WithoutPackages="$WithoutPackages C-Toolkit" |
|
| 4500 |
else |
else |
| 4501 |
WithPackages="$WithPackages C-Toolkit" |
NCBI_PACKAGE(C-Toolkit) |
| 4502 |
AC_DEFINE(HAVE_NCBI_C, 1, [Define to 1 if the NCBI C toolkit is available.]) |
AC_DEFINE(HAVE_NCBI_C, 1, [Define to 1 if the NCBI C toolkit is available.]) |
| 4503 |
fi |
fi |
| 4504 |
|
|
| 4505 |
|
|
| 4506 |
## OpenGL |
## OpenGL |
| 4507 |
if test "$with_opengl" != "no"; then |
if test "$with_opengl" != "no"; then |
| 4508 |
|
if test "${with_opengl-yes}" = yes; then |
| 4509 |
|
if test -d $NCBI/MesaGL; then |
| 4510 |
|
: ${OPENGL_PATH=$NCBI/MesaGL} |
| 4511 |
|
fi |
| 4512 |
|
else |
| 4513 |
|
OPENGL_PATH=$with_opengl |
| 4514 |
|
fi |
| 4515 |
|
if test -d "$OPENGL_PATH"; then |
| 4516 |
|
NCBI_FIX_DIR(OPENGL_PATH) |
| 4517 |
|
fi |
| 4518 |
case "$OSTYPE" in |
case "$OSTYPE" in |
| 4519 |
darwin) # Use native interface |
darwin) # Use native interface |
| 4520 |
OPENGL_LIBS="-framework Carbon -framework AGL -framework OpenGL" |
OPENGL_LIBS="-framework Carbon -framework AGL -framework OpenGL" |
| 4523 |
*) # Default -- assume X-based |
*) # Default -- assume X-based |
| 4524 |
LIBS="$orig_LIBS" |
LIBS="$orig_LIBS" |
| 4525 |
CPPFLAGS="$orig_CPPFLAGS" |
CPPFLAGS="$orig_CPPFLAGS" |
| 4526 |
|
# Look in /usr/X11R6/lib64 if necessary |
| 4527 |
|
xlib=`ls -d /usr/X11R6/lib$bit64_sfx/libX11.* 2>/dev/null | sed -ne 1p` |
| 4528 |
|
if test -f "$xlib" -a "${x_libraries-NONE}" = NONE \ |
| 4529 |
|
-a "${x_includes-NONE}" = NONE; then |
| 4530 |
|
base=`basename $xlib` |
| 4531 |
|
cmp -s /usr/X11R6/lib/$base $xlib || \ |
| 4532 |
|
cmp -s /usr/lib/$base $xlib || \ |
| 4533 |
|
cmp -s /usr/lib$bit64_sfx/$base $xlib || \ |
| 4534 |
|
x_libraries=/usr/X11R6/lib$bit64_sfx x_includes=/usr/X11R6/include |
| 4535 |
|
fi |
| 4536 |
AC_PATH_XTRA |
AC_PATH_XTRA |
| 4537 |
LDFLAGS="$orig_LDFLAGS $X_LIBS" |
LDFLAGS="$orig_LDFLAGS $X_LIBS" |
| 4538 |
AC_CHECK_LIB(Xext, XextCreateExtension, Xext="-lXext", Xext=, |
AC_CHECK_LIB(Xext, XextCreateExtension, Xext="-lXext", Xext=, |
| 4541 |
[$Xext $X_PRE_LIBS -lX11 $X_EXTRA_LIBS]) |
[$Xext $X_PRE_LIBS -lX11 $X_EXTRA_LIBS]) |
| 4542 |
AC_CHECK_LIB(Xmu, XmuMakeAtom, Xmu="-lXmu", Xmu=, |
AC_CHECK_LIB(Xmu, XmuMakeAtom, Xmu="-lXmu", Xmu=, |
| 4543 |
[$Xt $Xext $X_PRE_LIBS -lX11 $X_EXTRA_LIBS]) |
[$Xt $Xext $X_PRE_LIBS -lX11 $X_EXTRA_LIBS]) |
| 4544 |
|
LDFLAGS=$orig_LDFLAGS |
| 4545 |
X_ALL_LIBS="$Xmu $Xt $Xext $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" |
X_ALL_LIBS="$Xmu $Xt $Xext $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" |
| 4546 |
ogl_lib_sfx= |
if test -d "$OPENGL_PATH/include/GL"; then |
| 4547 |
case "${with_opengl:=yes}" in |
OPENGL_INCLUDE="-I$OPENGL_PATH/include $X_CFLAGS" |
| 4548 |
yes) |
else |
| 4549 |
# Check for NCBI's oddly located in-house installations. |
OPENGL_INCLUDE=$X_CFLAGS |
|
case "$OSTYPE:$host_cpu:$bit64_sfx" in |
|
|
solaris:sparc:64) |
|
|
with_opengl=/usr/ncbi/lib/OpenGL64/openwin |
|
|
ogl_lib_sfx=/sparcv9 |
|
|
;; |
|
|
solaris:i386:) with_opengl=/usr/ncbi ;; |
|
|
esac |
|
|
;; |
|
|
esac |
|
|
if test -d "$with_opengl/include/GL"; then |
|
|
X_CFLAGS="-I$with_opengl/include $X_CFLAGS" |
|
| 4550 |
fi |
fi |
| 4551 |
if test -d "$with_opengl/lib$ogl_lib_sfx"; then |
if test -d "$OPENGL_PATH/lib${bit64_sfx}"; then |
| 4552 |
l=$with_opengl/lib$ogl_lib_sfx |
NCBI_RPATHIFY(OPENGL_LIBPATH, $OPENGL_PATH/lib${bit64_sfx}, |
| 4553 |
X_LIBS="-L$l ${CONF_f_runpath}$l $X_LIBS" |
[ ]$X_LIBS) |
| 4554 |
fi |
fi |
| 4555 |
LDFLAGS="$orig_LDFLAGS $X_LIBS" |
OPENGL_LIBS="$OPENGL_LIBPATH -lGLU -lGL $X_ALL_LIBS" |
|
OPENGL_INCLUDE="$X_CFLAGS" |
|
|
OPENGL_LIBS="$X_LIBS -lGLU -lGL $X_ALL_LIBS" |
|
| 4556 |
;; |
;; |
| 4557 |
esac |
esac |
| 4558 |
case "${with_opengl}" in |
case "${OPENGL_PATH}" in |
| 4559 |
*/*) where=" in $with_opengl" ;; |
*/*) where=" in $OPENGL_PATH" ;; |
| 4560 |
* ) where= ;; |
* ) where= ;; |
| 4561 |
esac |
esac |
| 4562 |
AC_CACHE_CHECK([for OpenGL$where], ncbi_cv_lib_opengl, |
AC_CACHE_CHECK([for OpenGL$where], ncbi_cv_lib_opengl, |
| 4577 |
if test "$with_opengl" = "no" -o "$ncbi_cv_lib_opengl" = "no"; then |
if test "$with_opengl" = "no" -o "$ncbi_cv_lib_opengl" = "no"; then |
| 4578 |
OPENGL_INCLUDE= |
OPENGL_INCLUDE= |
| 4579 |
OPENGL_LIBS= |
OPENGL_LIBS= |
| 4580 |
|
OPENGL_STATIC_LIBS= |
| 4581 |
OSMESA_INCLUDE= |
OSMESA_INCLUDE= |
| 4582 |
OSMESA_LIBS= |
OSMESA_LIBS= |
| 4583 |
|
OSMESA_STATIC_LIBS= |
| 4584 |
GLUT_INCLUDE= |
GLUT_INCLUDE= |
| 4585 |
GLUT_LIBS= |
GLUT_LIBS= |
| 4586 |
with_opengl="no" |
NCBI_MISSING_PACKAGE(opengl) |
|
WithoutPackages="$WithoutPackages OpenGL MESA" |
|
| 4587 |
else |
else |
| 4588 |
WithPackages="$WithPackages OpenGL" |
NCBI_PACKAGE(OpenGL) |
| 4589 |
AC_DEFINE(HAVE_OPENGL, 1, [Define to 1 if you have OpenGL (-lGL).]) |
AC_DEFINE(HAVE_OPENGL, 1, [Define to 1 if you have OpenGL (-lGL).]) |
| 4590 |
: ${OSMESA_PATH=$NCBI/MesaGL} |
if test -f "$OPENGL_PATH/lib${bit64_sfx}/libGLU-static.a"; then |
| 4591 |
orig_LDFLAGS_X=$LDFLAGS |
OPENGL_STATIC_LIBS="$OPENGL_LIBPATH -lGLU-static -lGL-static $X_ALL_LIBS" |
| 4592 |
|
else |
| 4593 |
|
OPENGL_STATIC_LIBS=$OPENGL_LIBS |
| 4594 |
|
fi |
| 4595 |
|
: ${OSMESA_PATH=$OPENGL_PATH} |
| 4596 |
if test "$with_mesa" != "no"; then |
if test "$with_mesa" != "no"; then |
| 4597 |
if test "${with_mesa-yes}" = "yes" -a -d "$OSMESA_PATH"; then |
if test "${with_mesa-yes}" != "yes"; then |
| 4598 |
with_mesa=$OSMESA_PATH |
OSMESA_PATH=$with_mesa |
| 4599 |
|
fi |
| 4600 |
|
if test -d "$OSMESA_PATH"; then |
| 4601 |
|
OSMESA_INCLUDE=-I$OSMESA_PATH/include |
| 4602 |
|
if test "$OSMESA_PATH" != "$OPENGL_PATH"; then |
| 4603 |
|
NCBI_RPATHIFY(OSMESA_LDFLAGS, $OSMESA_PATH/lib${bit64_sfx}) |
| 4604 |
fi |
fi |
|
if test -n "$with_mesa" -a "$with_mesa" != "yes"; then |
|
|
OSMESA_INCLUDE=-I$with_mesa/include |
|
|
OSMESA_LDFLAGS="-L$with_mesa/lib ${CONF_f_runpath}$with_mesa/lib" |
|
| 4605 |
fi |
fi |
| 4606 |
LDFLAGS="$orig_LDFLAGS_X $OSMESA_LDFLAGS" |
LDFLAGS="$orig_LDFLAGS $OSMESA_LDFLAGS $OPENGL_LIBPATH" |
| 4607 |
AC_CHECK_LIB(OSMesa, OSMesaCreateContext, |
AC_CHECK_LIB(OSMesa, OSMesaCreateContext, |
| 4608 |
[WithPackages="$WithPackages MESA"; |
[NCBI_PACKAGE(MESA); |
| 4609 |
OSMESA_LIBS="$OSMESA_LDFLAGS $X_LIBS -lOSMesa -lGLU -lGL $X_ALL_LIBS" |
OSMESA_LIBS="$OSMESA_LDFLAGS $OPENGL_LIBPATH -lOSMesa -lGLU -lGL $X_ALL_LIBS" |
| 4610 |
AC_DEFINE(HAVE_LIBOSMESA, 1, [Define to 1 if you have libOSMesa.])], |
AC_DEFINE(HAVE_LIBOSMESA, 1, [Define to 1 if you have libOSMesa.])], |
| 4611 |
[WithoutPackages="$WithoutPackages MESA"; OSMESA_LIBS=], |
[OSMESA_LIBS=], |
| 4612 |
$OPENGL_LIBS) |
$OPENGL_LIBS) |
| 4613 |
fi |
fi |
| 4614 |
|
if test -z "$OSMESA_LIBS"; then |
| 4615 |
|
NCBI_MISSING_PACKAGE(mesa) |
| 4616 |
|
elif test -f "$OSMESA_PATH/lib${bit64_sfx}/libOSMesa-static.a"; then |
| 4617 |
|
OSMESA_STATIC_LIBS="$OSMESA_LDFLAGS $OPENGL_LIBPATH -lOSMesa-static -lGLU-static -lGL-static $X_ALL_LIBS" |
| 4618 |
|
else |
| 4619 |
|
OSMESA_STATIC_LIBS=$OSMESA_LIBS |
| 4620 |
|
fi |
| 4621 |
: ${GLUT_PATH=$NCBI/glut} |
: ${GLUT_PATH=$NCBI/glut} |
| 4622 |
if test "$with_glut" != "no"; then |
if test "$with_glut" != "no"; then |
| 4623 |
if test "${with_glut-yes}" = "yes" -a -d "$GLUT_PATH"; then |
if test "${with_glut-yes}" != "yes"; then |
| 4624 |
with_glut=$GLUT_PATH |
GLUT_PATH=$with_glut |
| 4625 |
fi |
fi |
| 4626 |
if test -n "$with_glut" -a "$with_glut" != "yes"; then |
if test -d "GLUT_PATH"; then |
| 4627 |
GLUT_INCLUDE=-I$with_glut/include |
GLUT_INCLUDE=-I$GLUT_PATH/include |
| 4628 |
GLUT_LDFLAGS="-L$with_glut/lib ${CONF_f_runpath}$with_glut/lib" |
NCBI_RPATHIFY(GLUT_LDFLAGS, $GLUT_PATH/lib${bit64_sfx}) |
| 4629 |
fi |
fi |
| 4630 |
LDFLAGS="$orig_LDFLAGS_X $GLUT_LDFLAGS" |
LDFLAGS="$orig_LDFLAGS $GLUT_LDFLAGS $OPENGL_LIBPATH" |
| 4631 |
AC_CHECK_LIB(glut, glutInit, |
AC_CHECK_LIB(glut, glutInit, |
| 4632 |
[WithPackages="$WithPackages GLUT"; |
[NCBI_PACKAGE(GLUT); |
| 4633 |
GLUT_LIBS="$GLUT_LDFLAGS $X_LIBS -lglut -lGLU -lGL $X_ALL_LIBS" |
GLUT_LIBS="$GLUT_LDFLAGS $OPENGL_LIBPATH -lglut -lGLU -lGL $X_ALL_LIBS" |
| 4634 |
AC_DEFINE(HAVE_LIBGLUT, 1, [Define to 1 if you have libglut.])], |
AC_DEFINE(HAVE_LIBGLUT, 1, [Define to 1 if you have libglut.])], |
| 4635 |
[WithoutPackages="$WithoutPackages GLUT"; GLUT_LIBS=], |
[GLUT_LIBS=], |
| 4636 |
$OPENGL_LIBS) |
$OPENGL_LIBS) |
| 4637 |
|
if test -z "$GLUT_LIBS"; then |
| 4638 |
|
NCBI_MISSING_PACKAGE(glut) |
| 4639 |
|
fi |
| 4640 |
fi |
fi |
| 4641 |
fi |
fi |
| 4642 |
|
|
| 4645 |
|
|
| 4646 |
## FLTK |
## FLTK |
| 4647 |
if test "$with_fltk" != "no"; then |
if test "$with_fltk" != "no"; then |
| 4648 |
if test -z "$FLTK_PATH"; then |
case "$with_fltk" in |
| 4649 |
if test -d "$with_fltk"; then |
yes | "" ) : ${FLTK_PATH=$NCBI/fltk} ;; |
| 4650 |
FLTK_PATH=$with_fltk |
* ) FLTK_PATH=$with_fltk ;; |
| 4651 |
else |
esac |
| 4652 |
FLTK_PATH="$NCBI/fltk" |
if test -d "$FLTK_PATH/${compiler_vpfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}/lib" \ |
|
fi |
|
|
fi |
|
|
if test -d "$FLTK_PATH/${compiler_vpfx}${release_debug}${mt_sfx}${bit64_sfx}/lib" \ |
|
| 4653 |
-a -z "$FLTK_ARCH_PATH"; then |
-a -z "$FLTK_ARCH_PATH"; then |
| 4654 |
FLTK_ARCH_PATH="$FLTK_PATH/${compiler_vpfx}${release_debug}${mt_sfx}${bit64_sfx}" |
FLTK_ARCH_PATH="$FLTK_PATH/${compiler_vpfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}" |
| 4655 |
elif test -d "$FLTK_PATH/${compiler_pfx}${release_debug}${mt_sfx}${bit64_sfx}/lib" \ |
elif test -d "$FLTK_PATH/${compiler_pfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}/lib" \ |
| 4656 |
-a -z "$FLTK_ARCH_PATH"; then |
-a -z "$FLTK_ARCH_PATH"; then |
| 4657 |
FLTK_ARCH_PATH="$FLTK_PATH/${compiler_pfx}${release_debug}${mt_sfx}${bit64_sfx}" |
FLTK_ARCH_PATH="$FLTK_PATH/${compiler_pfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}" |
| 4658 |
else |
else |
| 4659 |
FLTK_ARCH_PATH="$FLTK_PATH" |
FLTK_ARCH_PATH="$FLTK_PATH" |
| 4660 |
fi |
fi |
| 4661 |
FLTK_BINPATH=${FLTK_BINPATH:="$FLTK_ARCH_PATH/bin"} |
FLTK_BINPATH=${FLTK_BINPATH:="$FLTK_ARCH_PATH/bin"} |
| 4662 |
FLTK_LIBPATH=${FLTK_LIBPATH:="$FLTK_ARCH_PATH/lib"} |
FLTK_LIBPATH=${FLTK_LIBPATH:="$FLTK_ARCH_PATH/lib"} |
| 4663 |
FLTK_INCLUDE= |
FLTK_INCLUDE= |
| 4664 |
|
case "$host_os:$compiler" in |
| 4665 |
|
solaris2.10:GCC ) extrased='s/-lpthread//g; ' ;; |
| 4666 |
|
* ) extrased= ;; |
| 4667 |
|
esac |
| 4668 |
AC_CACHE_CHECK([for FLTK in $FLTK_ARCH_PATH], ncbi_cv_lib_fltk, |
AC_CACHE_CHECK([for FLTK in $FLTK_ARCH_PATH], ncbi_cv_lib_fltk, |
| 4669 |
[if test -x "$FLTK_BINPATH/fltk-config" ; then |
[if test -x "$FLTK_BINPATH/fltk-config" ; then |
| 4670 |
FLTK_INCLUDE=`$FLTK_BINPATH/fltk-config --cxxflags --use-gl` |
FLTK_INCLUDE=`$FLTK_BINPATH/fltk-config --cxxflags --use-gl` |
| 4671 |
FLTK_LIBS=`$FLTK_BINPATH/fltk-config --ldflags` |
NCBI_RPATHIFY_OUTPUT(FLTK_LIBS, $FLTK_BINPATH/fltk-config --ldflags, |
| 4672 |
|
$extrased) |
| 4673 |
|
|
| 4674 |
CPPFLAGS="$FLTK_INCLUDE $orig_CPPFLAGS" |
CPPFLAGS="$FLTK_INCLUDE $orig_CPPFLAGS" |
| 4675 |
LIBS="$FLTK_LIBS $orig_LIBS" |
LIBS="$FLTK_LIBS $orig_LIBS" |
| 4681 |
ncbi_cv_lib_fltk=no |
ncbi_cv_lib_fltk=no |
| 4682 |
fi]) |
fi]) |
| 4683 |
if test "$ncbi_cv_lib_fltk" = "no"; then |
if test "$ncbi_cv_lib_fltk" = "no"; then |
| 4684 |
with_fltk="no" |
NCBI_MISSING_PACKAGE(fltk) |
| 4685 |
fi |
fi |
| 4686 |
fi |
fi |
| 4687 |
|
|
| 4690 |
FLTK_INCLUDE= |
FLTK_INCLUDE= |
| 4691 |
FLTK_LIBS= |
FLTK_LIBS= |
| 4692 |
FLTK_LIBS_GL= |
FLTK_LIBS_GL= |
|
WithoutPackages="$WithoutPackages FLTK" |
|
| 4693 |
else |
else |
| 4694 |
WithPackages="$WithPackages FLTK" |
NCBI_PACKAGE(FLTK) |
| 4695 |
|
FLTK_CONFIG="$FLTK_BINPATH/fltk-config" |
| 4696 |
# The "yes" may have been cached; get the actual settings again if needed |
# The "yes" may have been cached; get the actual settings again if needed |
| 4697 |
if test -z "$FLTK_INCLUDE"; then |
if test -z "$FLTK_INCLUDE"; then |
| 4698 |
FLTK_INCLUDE=`$FLTK_BINPATH/fltk-config --cxxflags --use-gl` |
FLTK_INCLUDE=`$FLTK_CONFIG --cxxflags --use-gl` |
| 4699 |
FLTK_LIBS=`$FLTK_BINPATH/fltk-config --ldflags` |
NCBI_RPATHIFY_OUTPUT(FLTK_LIBS, $FLTK_BINPATH/fltk-config --ldflags, |
| 4700 |
fi |
$extrased) |
| 4701 |
FLTK_LIBS_GL=`$FLTK_BINPATH/fltk-config --ldflags --use-gl` |
fi |
| 4702 |
FLTK_CONFIG="$FLTK_BINPATH/fltk-config" |
NCBI_RPATHIFY_OUTPUT(FLTK_LIBS_GL, |
| 4703 |
|
$FLTK_BINPATH/fltk-config --ldflags --use-gl, $extrased) |
| 4704 |
|
NCBI_RPATHIFY_OUTPUT(FLTK_LIBS_IMAGES, |
| 4705 |
|
$FLTK_BINPATH/fltk-config --ldflags --use-images, $extrased) |
| 4706 |
|
NCBI_RPATHIFY_OUTPUT(FLTK_LIBS_ALL, |
| 4707 |
|
$FLTK_BINPATH/fltk-config --ldflags --use-gl --use-images, $extrased) |
| 4708 |
|
# Also supply static versions for use in CGIs to be deployed to servers |
| 4709 |
|
# without access to the shared libraries. |
| 4710 |
|
NCBI_RPATHIFY_OUTPUT(FLTK_STATIC_LIBS, |
| 4711 |
|
$FLTK_BINPATH/fltk-config --ldstaticflags, $extrased) |
| 4712 |
|
NCBI_RPATHIFY_OUTPUT(FLTK_STATIC_LIBS_GL, |
| 4713 |
|
$FLTK_BINPATH/fltk-config --ldstaticflags --use-gl, $extrased) |
| 4714 |
|
NCBI_RPATHIFY_OUTPUT(FLTK_STATIC_LIBS_IMAGES, |
| 4715 |
|
$FLTK_BINPATH/fltk-config --ldstaticflags --use-images, $extrased) |
| 4716 |
|
NCBI_RPATHIFY_OUTPUT(FLTK_STATIC_LIBS_ALL, |
| 4717 |
|
$FLTK_BINPATH/fltk-config --ldstaticflags --use-gl --use-images, |
| 4718 |
|
$extrased) |
| 4719 |
AC_DEFINE(HAVE_FLTK, 1, [Define to 1 if FLTK is available.]) |
AC_DEFINE(HAVE_FLTK, 1, [Define to 1 if FLTK is available.]) |
| 4720 |
fi |
fi |
| 4721 |
|
|
| 4722 |
|
|
| 4723 |
## wxWindows |
## wxWindows |
| 4724 |
if test "$with_wxwin" != "no" ; then |
if test "$with_wxwin" != "no" ; then |
| 4725 |
if test -z "$WXWIN_PATH"; then |
case "$with_wxwin" in |
| 4726 |
if test -d "$with_wxwin"; then |
yes | "" ) : ${WXWIN_PATH=$NCBI/wxwin} ;; |
| 4727 |
WXWIN_PATH=$with_wxwin |
* ) WXWIN_PATH=$with_wxwin ;; |
| 4728 |
else |
esac |
| 4729 |
WXWIN_PATH="$NCBI/wxwin" |
if test -d "$WXWIN_PATH/${compiler_vpfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}/lib" \ |
|
fi |
|
|
fi |
|
|
if test -d "$WXWIN_PATH/${compiler_vpfx}${release_debug}${mt_sfx}${bit64_sfx}/lib" \ |
|
| 4730 |
-a -z "$WXWIN_ARCH_PATH"; then |
-a -z "$WXWIN_ARCH_PATH"; then |
| 4731 |
WXWIN_ARCH_PATH="$WXWIN_PATH/${compiler_vpfx}${release_debug}${mt_sfx}${bit64_sfx}" |
WXWIN_ARCH_PATH="$WXWIN_PATH/${compiler_vpfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}" |
| 4732 |
elif test -d "$WXWIN_PATH/${compiler_pfx}${release_debug}${mt_sfx}${bit64_sfx}/lib" \ |
elif test -d "$WXWIN_PATH/${compiler_pfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}/lib" \ |
| 4733 |
-a -z "$WXWIN_ARCH_PATH"; then |
-a -z "$WXWIN_ARCH_PATH"; then |
| 4734 |
WXWIN_ARCH_PATH="$WXWIN_PATH/${compiler_pfx}${release_debug}${mt_sfx}${bit64_sfx}" |
WXWIN_ARCH_PATH="$WXWIN_PATH/${compiler_pfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}" |
| 4735 |
else |
else |
| 4736 |
WXWIN_ARCH_PATH="$WXWIN_PATH" |
WXWIN_ARCH_PATH="$WXWIN_PATH" |
| 4737 |
fi |
fi |
| 4747 |
# May work without gtk-config (e.g., on Mac OS X) |
# May work without gtk-config (e.g., on Mac OS X) |
| 4748 |
gtkconf=: |
gtkconf=: |
| 4749 |
fi |
fi |
| 4750 |
|
case "$host_os" in |
| 4751 |
|
darwin* ) baseflags="" ;; |
| 4752 |
|
* ) baseflags=`$gtkconf --cflags` ;; |
| 4753 |
|
esac |
| 4754 |
AC_CACHE_CHECK([for wxWindows in $WXWIN_ARCH_PATH], ncbi_cv_lib_wxwindows, |
AC_CACHE_CHECK([for wxWindows in $WXWIN_ARCH_PATH], ncbi_cv_lib_wxwindows, |
| 4755 |
[if test -x "$wxconf" ; then |
[if test -x "$wxconf" ; then |
| 4756 |
WXWIN_INCLUDE="`$gtkconf --cflags` `$wxconf --cflags`" |
WXWIN_INCLUDE="$baseflags `$wxconf --cflags`" |
| 4757 |
WXWIN_LIBS=`$wxconf --libs` |
WXWIN_LIBS=`$wxconf --libs` |
| 4758 |
|
|
| 4759 |
CPPFLAGS="$WXWIN_INCLUDE $orig_CPPFLAGS" |
CPPFLAGS="$WXWIN_INCLUDE $orig_CPPFLAGS" |
| 4766 |
ncbi_cv_lib_wxwindows=no |
ncbi_cv_lib_wxwindows=no |
| 4767 |
fi]) |
fi]) |
| 4768 |
if test "$ncbi_cv_lib_wxwindows" = "no"; then |
if test "$ncbi_cv_lib_wxwindows" = "no"; then |
| 4769 |
with_wxwin="no" |
NCBI_MISSING_PACKAGE(wxwin) |
| 4770 |
fi |
fi |
| 4771 |
fi |
fi |
| 4772 |
|
|
| 4774 |
WXWIN_LIBPATH="No_wxWindows" |
WXWIN_LIBPATH="No_wxWindows" |
| 4775 |
WXWIN_INCLUDE= |
WXWIN_INCLUDE= |
| 4776 |
WXWIN_LIBS= |
WXWIN_LIBS= |
| 4777 |
|
WXWIN_STATIC_LIBS= |
| 4778 |
WXWIN_GL_LIBS= |
WXWIN_GL_LIBS= |
| 4779 |
WithoutPackages="$WithoutPackages wxWindows" |
WXWIN_GL_STATIC_LIBS= |
| 4780 |
|
WXWIN_POST_LINK=: |
| 4781 |
else |
else |
| 4782 |
WithPackages="$WithPackages wxWindows" |
NCBI_PACKAGE(wxWindows) |
| 4783 |
# The "yes" may have been cached; get the actual settings again if needed |
# The "yes" may have been cached; get the actual settings again if needed |
| 4784 |
if test -z "$WXWIN_INCLUDE"; then |
if test -z "$WXWIN_INCLUDE"; then |
| 4785 |
WXWIN_INCLUDE="`$gtkconf --cflags` `$wxconf --cflags`" |
WXWIN_INCLUDE="$baseflags `$wxconf --cflags`" |
| 4786 |
WXWIN_LIBS=`$wxconf --libs` |
WXWIN_LIBS=`$wxconf --libs` |
| 4787 |
fi |
fi |
| 4788 |
|
WXWIN_STATIC_LIBS=`$wxconf --libs --static` |
| 4789 |
WXWIN_GL_LIBS=`$wxconf --gl-libs` |
WXWIN_GL_LIBS=`$wxconf --gl-libs` |
| 4790 |
|
WXWIN_GL_STATIC_LIBS=`$wxconf --gl-libs --static` |
| 4791 |
|
WXWIN_POST_LINK=`$wxconf --rezflags` |
| 4792 |
|
test -n "$WXWIN_POST_LINK" || WXWIN_POST_LINK=: |
| 4793 |
AC_DEFINE(HAVE_WXWINDOWS, 1, [Define to 1 if wxWindows is available.]) |
AC_DEFINE(HAVE_WXWINDOWS, 1, [Define to 1 if wxWindows is available.]) |
| 4794 |
fi |
fi |
| 4795 |
|
|
| 4796 |
|
|
| 4797 |
|
## wxWidgets |
| 4798 |
|
# Insist on single-byte builds by default, per various projects' expectations. |
| 4799 |
|
: ${with_wxwidgets_ucs=no} |
| 4800 |
|
if test "$with_wxwidgets" != "no" ; then |
| 4801 |
|
case "$with_wxwidgets" in |
| 4802 |
|
yes | "" ) : ${WXWIDGETS_PATH=$NCBI/wxwidgets} ;; |
| 4803 |
|
* ) WXWIDGETS_PATH=$with_wxwidgets ;; |
| 4804 |
|
esac |
| 4805 |
|
if test -d "$WXWIDGETS_PATH/${compiler_vpfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}/lib" \ |
| 4806 |
|
-a -z "$WXWIDGETS_ARCH_PATH"; then |
| 4807 |
|
WXWIDGETS_ARCH_PATH="$WXWIDGETS_PATH/${compiler_vpfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}" |
| 4808 |
|
elif test -d "$WXWIDGETS_PATH/${compiler_pfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}/lib" \ |
| 4809 |
|
-a -z "$WXWIDGETS_ARCH_PATH"; then |
| 4810 |
|
WXWIDGETS_ARCH_PATH="$WXWIDGETS_PATH/${compiler_pfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}" |
| 4811 |
|
else |
| 4812 |
|
WXWIDGETS_ARCH_PATH="$WXWIDGETS_PATH" |
| 4813 |
|
fi |
| 4814 |
|
WXWIDGETS_BINPATH=${WXWIDGETS_BINPATH:="$WXWIDGETS_ARCH_PATH/bin"} |
| 4815 |
|
WXWIDGETS_LIBPATH=${WXWIDGETS_LIBPATH:="$WXWIDGETS_ARCH_PATH/lib"} |
| 4816 |
|
WXWIDGETS_INCLUDE= |
| 4817 |
|
AS_UNSET(wxconf) |
| 4818 |
|
AC_PATH_PROG(wxconf, wx-config, [], $WXWIDGETS_BINPATH:$PATH) |
| 4819 |
|
if test -x "$wxconf"; then |
| 4820 |
|
WXWIDGETS_ARCH_PATH=`$wxconf --exec-prefix` |
| 4821 |
|
if test -n "$with_wxwidgets_ucs"; then |
| 4822 |
|
wxcfflags=--unicode=$with_wxwidgets_ucs |
| 4823 |
|
else |
| 4824 |
|
wxcfflags= |
| 4825 |
|
fi |
| 4826 |
|
for x in `"$wxconf" $wxcfflags --libs --static 2>&AS_MESSAGE_LOG_FD`; do |
| 4827 |
|
case "$x" in |
| 4828 |
|
-L*) |
| 4829 |
|
d=`echo $x | sed -e 's/^-L//'` |
| 4830 |
|
pcd=$d/pkgconfig |
| 4831 |
|
if test -d "$pcd"; then |
| 4832 |
|
PKG_CONFIG_PATH="${PKG_CONFIG_PATH+$PKG_CONFIG_PATH:}$pcd" |
| 4833 |
|
fi |
| 4834 |
|
;; |
| 4835 |
|
esac |
| 4836 |
|
done |
| 4837 |
|
export PKG_CONFIG_PATH |
| 4838 |
|
else |
| 4839 |
|
AS_UNSET(wxconf) |
| 4840 |
|
fi |
| 4841 |
|
if test -x "$wxconf" \ |
| 4842 |
|
&& "$wxconf" $wxcfflags --list 2>/dev/null \ |
| 4843 |
|
| grep 'Default config is gtk2' >/dev/null; then |
| 4844 |
|
gtkconf="pkg-config gtk+-2.0" |
| 4845 |
|
elif test -x "$WXWIDGETS_BINPATH/gtk-config"; then |
| 4846 |
|
gtkconf=$WXWIDGETS_BINPATH/gtk-config |
| 4847 |
|
elif gtk-config --version >/dev/null 2>&1; then |
| 4848 |
|
gtkconf=gtk-config |
| 4849 |
|
else |
| 4850 |
|
# May work without gtk-config (e.g., on Mac OS X) |
| 4851 |
|
gtkconf=: |
| 4852 |
|
fi |
| 4853 |
|
case "$host_os" in |
| 4854 |
|
darwin* ) |
| 4855 |
|
baseflags="" |
| 4856 |
|
basesed='s/-isysroot [[^ ]]*//g; s/-arch [[^ ]]*//g' |
| 4857 |
|
if test -n "$SYSROOT"; then |
| 4858 |
|
deps=`"$wxconf" $wxcfflags --libs --static 2>/dev/null \ |
| 4859 |
|
| sed -e 's/.*\.a//'` |
| 4860 |
|
libsed="$basesed; s/\$/ $deps/" |
| 4861 |
|
else |
| 4862 |
|
libsed=$basesed |
| 4863 |
|
fi |
| 4864 |
|
;; |
| 4865 |
|
* ) |
| 4866 |
|
baseflags=`$gtkconf --cflags 2>/dev/null` |
| 4867 |
|
basesed=$no_usr_lib |
| 4868 |
|
libsed=$basesed |
| 4869 |
|
;; |
| 4870 |
|
esac |
| 4871 |
|
AC_CACHE_CHECK([for wxWidgets in $WXWIDGETS_ARCH_PATH], |
| 4872 |
|
ncbi_cv_lib_wxwidgets, |
| 4873 |
|
[if test -x "$wxconf" ; then |
| 4874 |
|
WXWIDGETS_INCLUDE="$baseflags `"$wxconf" $wxcfflags --cflags`" |
| 4875 |
|
NCBI_RPATHIFY_OUTPUT(WXWIDGETS_LIBS, ["$wxconf" $wxcfflags --libs], |
| 4876 |
|
[$libsed; ]) |
| 4877 |
|
|
| 4878 |
|
CPPFLAGS="$WXWIDGETS_INCLUDE $orig_CPPFLAGS" |
| 4879 |
|
LIBS="$WXWIDGETS_LIBS $orig_LIBS" |
| 4880 |
|
AC_LINK_IFELSE([AC_LANG_PROGRAM( |
| 4881 |
|
[[#include <wx/wx.h>]], |
| 4882 |
|
[[ wxExit(); ]])], |
| 4883 |
|
[ncbi_cv_lib_wxwidgets=yes], [ncbi_cv_lib_wxwidgets=no]) |
| 4884 |
|
else |
| 4885 |
|
ncbi_cv_lib_wxwidgets=no |
| 4886 |
|
fi]) |
| 4887 |
|
if test "$ncbi_cv_lib_wxwidgets" = "no"; then |
| 4888 |
|
NCBI_MISSING_PACKAGE(wxwidgets) |
| 4889 |
|
fi |
| 4890 |
|
fi |
| 4891 |
|
|
| 4892 |
|
if test "$with_wxwidgets" = "no" ; then |
| 4893 |
|
WXWIDGETS_LIBPATH="No_wxWidgets" |
| 4894 |
|
WXWIDGETS_INCLUDE= |
| 4895 |
|
WXWIDGETS_LIBS= |
| 4896 |
|
WXWIDGETS_STATIC_LIBS= |
| 4897 |
|
WXWIDGETS_GL_LIBS= |
| 4898 |
|
WXWIDGETS_GL_STATIC_LIBS= |
| 4899 |
|
WXWIDGETS_POST_LINK=: |
| 4900 |
|
else |
| 4901 |
|
NCBI_PACKAGE(wxWidgets) |
| 4902 |
|
case "`"$wxconf" $wxcfflags --version`" in |
| 4903 |
|
2.[[89]].* | 2.[[0-9]][[0-9]]* ) |
| 4904 |
|
NCBI_PACKAGE(wx2.8) |
| 4905 |
|
wxlibs=std,richtext |
| 4906 |
|
;; |
| 4907 |
|
*) |
| 4908 |
|
wxlibs=std |
| 4909 |
|
;; |
| 4910 |
|
esac |
| 4911 |
|
# The "yes" may have been cached; get the actual settings again if needed |
| 4912 |
|
if test -z "$WXWIDGETS_INCLUDE"; then |
| 4913 |
|
WXWIDGETS_INCLUDE="$baseflags `"$wxconf" $wxcfflags --cflags`" |
| 4914 |
|
fi |
| 4915 |
|
NCBI_RPATHIFY_OUTPUT(WXWIDGETS_LIBS, [$wxconf $wxcfflags --libs $wxlibs], |
| 4916 |
|
[$libsed; ]) |
| 4917 |
|
WXWIDGETS_STATIC_LIBS=`"$wxconf" $wxcfflags --libs --static $wxlibs \ |
| 4918 |
|
2>/dev/null | sed -e "$basesed"` |
| 4919 |
|
: ${WXWIDGETS_STATIC_LIBS:=$WXWIDGETS_LIBS} |
| 4920 |
|
WXWIDGETS_GL_LIBS=`"$wxconf" $wxcfflags --libs gl | sed -e "$basesed"` |
| 4921 |
|
WXWIDGETS_GL_STATIC_LIBS=`"$wxconf" $wxcfflags --libs gl --static \ |
| 4922 |
|
2>/dev/null | sed -e "$basesed; s|-lGLU* -lGLU*|$OPENGL_STATIC_LIBS|"` |
| 4923 |
|
: ${WXWIDGETS_GL_STATIC_LIBS:=$WXWIDGETS_GL_LIBS} |
| 4924 |
|
WXWIDGETS_POST_LINK=`"$wxconf" $wxcfflags --rezflags 2>/dev/null` |
| 4925 |
|
test -n "$WXWIDGETS_POST_LINK" || WXWIDGETS_POST_LINK=: |
| 4926 |
|
AC_DEFINE(HAVE_WXWIDGETS, 1, [Define to 1 if wxWidgets is available.]) |
| 4927 |
|
fi |
| 4928 |
|
|
| 4929 |
|
|
| 4930 |
## In-house Fast-CGI library |
## In-house Fast-CGI library |
| 4931 |
if test "$with_fastcgi" != "no" ; then |
if test "$with_fastcgi" != "no" ; then |
| 4932 |
case "$with_fastcgi" in |
case "$with_fastcgi" in |
| 4934 |
*/* ) FASTCGI_PATH=$with_fastcgi ;; |
*/* ) FASTCGI_PATH=$with_fastcgi ;; |
| 4935 |
* ) FASTCGI_PATH=$NCBI/fcgi-${with_fastcgi} ;; |
* ) FASTCGI_PATH=$NCBI/fcgi-${with_fastcgi} ;; |
| 4936 |
esac |
esac |
| 4937 |
|
if test -d "$FASTCGI_PATH"; then |
| 4938 |
|
NCBI_FIX_DIR(FASTCGI_PATH) |
| 4939 |
|
fi |
| 4940 |
FASTCGI_INCLUDE="-I$FASTCGI_PATH/include${bit64_sfx}" |
FASTCGI_INCLUDE="-I$FASTCGI_PATH/include${bit64_sfx}" |
| 4941 |
if test "$with_debug" = "no" ; then |
if test "$with_debug" = "no" ; then |
| 4942 |
FASTCGI_LIBS="-L$FASTCGI_PATH/lib${bit64_sfx} -lfcgi $NETWORK_LIBS" |
FASTCGI_LIBDIR="$FASTCGI_PATH/lib${bit64_sfx}" |
| 4943 |
else |
else |
| 4944 |
FASTCGI_LIBS="-L$FASTCGI_PATH/altlib${bit64_sfx} -lfcgi $NETWORK_LIBS" |
FASTCGI_LIBDIR="$FASTCGI_PATH/altlib${bit64_sfx}" |
| 4945 |
fi |
fi |
| 4946 |
|
NCBI_RPATHIFY(FASTCGI_LIBS, $FASTCGI_LIBDIR, [ -lfcgi $NETWORK_LIBS]) |
| 4947 |
FASTCGI_OBJS="fcgibuf" |
FASTCGI_OBJS="fcgibuf" |
| 4948 |
LIBS="$FASTCGI_LIBS $orig_LIBS" |
LIBS="$FASTCGI_LIBS $orig_LIBS" |
| 4949 |
AC_CACHE_CHECK([for FastCGI libraries in $FASTCGI_PATH], ncbi_cv_lib_fcgi, |
AC_CACHE_CHECK([for FastCGI libraries in $FASTCGI_PATH], ncbi_cv_lib_fcgi, |
| 4953 |
[[ (void) FCGX_IsCGI(); ]])], |
[[ (void) FCGX_IsCGI(); ]])], |
| 4954 |
[ncbi_cv_lib_fcgi=yes], [ncbi_cv_lib_fcgi=no])]) |
[ncbi_cv_lib_fcgi=yes], [ncbi_cv_lib_fcgi=no])]) |
| 4955 |
if test "$ncbi_cv_lib_fcgi" = "no"; then |
if test "$ncbi_cv_lib_fcgi" = "no"; then |
| 4956 |
with_fastcgi="no" |
NCBI_MISSING_PACKAGE(fastcgi) |
| 4957 |
fi |
fi |
| 4958 |
AC_CHECK_FUNCS(FCGX_Accept_r) |
AC_CHECK_FUNCS(FCGX_Accept_r) |
| 4959 |
fi |
fi |
| 4962 |
FASTCGI_INCLUDE= |
FASTCGI_INCLUDE= |
| 4963 |
FASTCGI_LIBS= |
FASTCGI_LIBS= |
| 4964 |
FASTCGI_OBJS= |
FASTCGI_OBJS= |
|
WithoutPackages="$WithoutPackages Fast-CGI" |
|
| 4965 |
else |
else |
| 4966 |
WithPackages="$WithPackages Fast-CGI" |
NCBI_PACKAGE(Fast-CGI) |
| 4967 |
AC_DEFINE(HAVE_LIBFASTCGI, 1, |
AC_DEFINE(HAVE_LIBFASTCGI, 1, |
| 4968 |
[Define to 1 if FastCGI libraries are available.]) |
[Define to 1 if FastCGI libraries are available.]) |
| 4969 |
fi |
fi |
| 4970 |
|
|
| 4971 |
|
|
| 4972 |
## NCBI SSS libraries |
## NCBI SSS libraries |
|
with_sss=${with_sss:="yes"} |
|
|
with_sssutils=${with_sssutils:="yes"} |
|
|
with_sssdb=${with_sssdb:="yes"} |
|
|
|
|
| 4973 |
if test "$with_sybase" = "no" ; then |
if test "$with_sybase" = "no" ; then |
| 4974 |
with_sssdb="no" |
NCBI_MISSING_PACKAGE(sssdb) |
| 4975 |
fi |
fi |
| 4976 |
|
|
| 4977 |
|
case "$host_os:$compiler:$compiler_version" in |
| 4978 |
|
linux*:GCC:*) |
| 4979 |
|
: ${with_included_sss=yes} |
| 4980 |
|
;; |
| 4981 |
|
esac |
| 4982 |
|
|
| 4983 |
if test "$with_sss" != "no" ; then |
if test "$with_sss" != "no" ; then |
| 4984 |
|
local_sss=${real_srcdir}/src/internal/sss |
| 4985 |
|
if test "${with_included_sss-no}" = "yes" \ |
| 4986 |
|
-a -f "$local_sss/utils/sssdebug.hpp" \ |
| 4987 |
|
-a -f "${local_sss}srv/cli/sssconnection.cpp"; then |
| 4988 |
|
with_included_sss=yes |
| 4989 |
|
NCBI_SSS_PATH=$local_sss |
| 4990 |
|
NCBI_SSS_INCLUDE="\$(incdir)/sss" |
| 4991 |
|
NCBI_SSS_LIBPATH="\$(libdir)" |
| 4992 |
|
NCBI_PACKAGE(LocalSSS) |
| 4993 |
|
if test -f "$local_sss/../ncbi_ls/asn/login.asn"; then |
| 4994 |
|
NCBI_PACKAGE(LocalNCBILS) |
| 4995 |
|
fi |
| 4996 |
|
if test -f "$local_sss/../msgmail2/asn/msgmail.asn"; then |
| 4997 |
|
NCBI_PACKAGE(LocalMSGMAIL2) |
| 4998 |
|
fi |
| 4999 |
|
else |
| 5000 |
|
with_included_sss=no |
| 5001 |
|
fi |
| 5002 |
NCBI_SSS_PATH=${NCBI_SSS_PATH:="$NCBI/sss/BUILD"} |
NCBI_SSS_PATH=${NCBI_SSS_PATH:="$NCBI/sss/BUILD"} |
| 5003 |
NCBI_SSS_INCLUDE=${NCBI_SSS_INCLUDE:="$NCBI_SSS_PATH/include"} |
NCBI_SSS_INCLUDE=${NCBI_SSS_INCLUDE:="$NCBI_SSS_PATH/include"} |
| 5004 |
if test -z "$NCBI_SSS_LIBPATH" ; then |
if test -z "$NCBI_SSS_LIBPATH" ; then |
| 5005 |
NCBI_SSS_LIBPATH="${NCBI_SSS_PATH}/lib/${release_debug}" |
NCBI_SSS_LIBPATH="${NCBI_SSS_PATH}/lib/${compiler_vpfx}${DEBUG_SFX}${bit64_sfx}" |
|
if test "$compiler" = "GCC" ; then |
|
|
NCBI_SSS_LIBPATH="${NCBI_SSS_LIBPATH}GNU" |
|
|
if test -d "$NCBI_SSS_LIBPATH$ncbi_compiler_ver"; then |
|
|
NCBI_SSS_LIBPATH=$NCBI_SSS_LIBPATH$ncbi_compiler_ver |
|
|
fi |
|
|
elif test "$compiler" = "KCC" ; then |
|
|
NCBI_SSS_LIBPATH="${NCBI_SSS_LIBPATH}KAI" |
|
|
elif test "$compiler" = "ICC" ; then |
|
|
NCBI_SSS_LIBPATH="${NCBI_SSS_LIBPATH}ICC" |
|
|
fi |
|
|
NCBI_SSS_LIBPATH="${NCBI_SSS_LIBPATH}${bit64_sfx}" |
|
| 5006 |
if test "$with_mt" = "yes" ; then |
if test "$with_mt" = "yes" ; then |
| 5007 |
NCBI_SSS_LIBPATH="${NCBI_SSS_LIBPATH}mt" |
NCBI_SSS_LIBPATH="${NCBI_SSS_LIBPATH}mt" |
| 5008 |
fi |
fi |
| 5009 |
fi |
fi |
| 5010 |
AC_MSG_CHECKING([for NCBI SSS directories in $NCBI_SSS_PATH]) |
AC_MSG_CHECKING([for NCBI SSS directories in $NCBI_SSS_PATH]) |
| 5011 |
if test ! -d "${NCBI_SSS_LIBPATH}" -o ! -d "${NCBI_SSS_INCLUDE}" ; then |
if test "$with_included_sss" = "yes"; then |
| 5012 |
|
AC_MSG_RESULT([yes]) # duh |
| 5013 |
|
elif test ! -d "${NCBI_SSS_LIBPATH}" -o ! -d "${NCBI_SSS_INCLUDE}" ; then |
| 5014 |
AC_MSG_RESULT([no]) |
AC_MSG_RESULT([no]) |
| 5015 |
with_sss="no" |
NCBI_MISSING_PACKAGE(sss) |
| 5016 |
else |
else |
| 5017 |
AC_MSG_RESULT([yes]) |
AC_MSG_RESULT([yes]) |
| 5018 |
fi |
fi |
| 5019 |
fi |
fi |
| 5020 |
|
|
| 5021 |
if test "$with_sss" = "no" ; then |
if test "$with_sss" = "no" ; then |
| 5022 |
with_sssutils="no" |
NCBI_MISSING_PACKAGE(sssutils) |
| 5023 |
with_sssdb="no" |
NCBI_MISSING_PACKAGE(sssdb) |
| 5024 |
NCBI_SSS_INCLUDE= |
NCBI_SSS_INCLUDE= |
| 5025 |
NCBI_SSS_LIBPATH= |
NCBI_SSS_LIBPATH= |
| 5026 |
LIBSSSUTILS= |
LIBSSSUTILS= |
| 5027 |
LIBSSSDB= |
LIBSSSDB= |
| 5028 |
WithoutPackages="$WithoutPackages SSS" |
else |
| 5029 |
|
if test "$with_included_sss" = "yes"; then |
| 5030 |
|
NCBI_SSS_LIBPATH= # Not needed |
| 5031 |
|
ncbi_cv_lib_sssutils=yes |
| 5032 |
|
ncbi_cv_lib_sssdb=yes |
| 5033 |
else |
else |
| 5034 |
NCBI_SSS_LIBPATH="-L${NCBI_SSS_LIBPATH}" |
NCBI_SSS_LIBPATH="-L${NCBI_SSS_LIBPATH}" |
| 5035 |
|
fi |
| 5036 |
NCBI_SSS_INCLUDE="-I${NCBI_SSS_INCLUDE}" |
NCBI_SSS_INCLUDE="-I${NCBI_SSS_INCLUDE}" |
| 5037 |
|
|
| 5038 |
# SSS UTILS |
# SSS UTILS |
| 5048 |
if test "$ncbi_cv_lib_sssutils" = yes; then |
if test "$ncbi_cv_lib_sssutils" = yes; then |
| 5049 |
AC_DEFINE(HAVE_LIBSSSUTILS, 1, |
AC_DEFINE(HAVE_LIBSSSUTILS, 1, |
| 5050 |
[Define to 1 if the NCBI SSS UTILS library is available.]) |
[Define to 1 if the NCBI SSS UTILS library is available.]) |
| 5051 |
WithPackages="$WithPackages SSSUTILS" |
NCBI_PACKAGE(SSSUTILS) |
| 5052 |
else |
else |
| 5053 |
with_sssutils="no" |
NCBI_MISSING_PACKAGE(sssutils) |
| 5054 |
with_sss="no" |
NCBI_MISSING_PACKAGE(sss) |
| 5055 |
LIBSSSUTILS="" |
LIBSSSUTILS="" |
|
WithoutPackages="$WithoutPackages SSSUTILS" |
|
| 5056 |
fi |
fi |
| 5057 |
fi |
fi |
| 5058 |
|
|
| 5073 |
if test "$ncbi_cv_lib_sssdb" = "yes"; then |
if test "$ncbi_cv_lib_sssdb" = "yes"; then |
| 5074 |
AC_DEFINE(HAVE_LIBSSSDB, 1, |
AC_DEFINE(HAVE_LIBSSSDB, 1, |
| 5075 |
[Define to 1 if the NCBI SSS DB library is available.]) |
[Define to 1 if the NCBI SSS DB library is available.]) |
| 5076 |
WithPackages="$WithPackages SSSDB" |
NCBI_PACKAGE(SSSDB) |
| 5077 |
else |
else |
| 5078 |
with_sssdb="no" |
NCBI_MISSING_PACKAGE(sssdb) |
| 5079 |
with_sss="no" |
NCBI_MISSING_PACKAGE(sss) |
| 5080 |
LIBSSSDB="" |
LIBSSSDB="" |
|
WithoutPackages="$WithoutPackages SSSDB" |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
# GEO |
|
|
with_geo=${with_geo:="yes"} |
|
|
|
|
|
if test "$with_sssdb" = "no" -o "$with_sssutils" = "no" ; then |
|
|
with_geo="no" |
|
|
fi |
|
|
|
|
|
if test "$with_geo" != "no" ; then |
|
|
NCBI_GEO_PATH=${NCBI_GEO_PATH:="$NCBI/geo/BUILD"} |
|
|
NCBI_GEO_INCLUDE=${NCBI_GEO_INCLUDE:="$NCBI_GEO_PATH/include"} |
|
|
if test -z "$NCBI_GEO_LIBPATH" ; then |
|
|
NCBI_GEO_LIBPATH="${NCBI_GEO_PATH}/lib/${release_debug}${bit64_sfx}" |
|
|
fi |
|
|
AC_MSG_CHECKING([for NCBI GEO directories in $NCBI_GEO_PATH]) |
|
|
if test ! -d "${NCBI_GEO_LIBPATH}" -o ! -d "${NCBI_GEO_INCLUDE}" ; then |
|
|
AC_MSG_RESULT([no]) |
|
|
with_geo="no" |
|
|
else |
|
|
AC_MSG_RESULT([yes]) |
|
| 5081 |
fi |
fi |
| 5082 |
fi |
fi |
|
|
|
|
if test "$with_geo" = "no" ; then |
|
|
NCBI_GEO_INCLUDE= |
|
|
NCBI_GEO_LIBPATH= |
|
|
LIBGEODB= |
|
|
else |
|
|
NCBI_GEO_LIBPATH="-L${NCBI_GEO_LIBPATH}" |
|
|
NCBI_GEO_INCLUDE="-I${NCBI_GEO_INCLUDE}" |
|
|
LIBGEODB="-lgeodb" |
|
|
|
|
|
# We have to be careful here, since GEO uses our libxncbi... |
|
|
# We can't reasonably test *at all* on WorkShop, so just assume success. |
|
|
case "$compiler" in |
|
|
WorkShop*) ncbi_cv_lib_geodb=yes ;; |
|
|
esac |
|
|
AC_CACHE_CHECK([for the NCBI GEO DB library], ncbi_cv_lib_geodb, |
|
|
[CPPFLAGS="$NCBI_GEO_INCLUDE $NCBI_SSS_INCLUDE $SYBASE_INCLUDE -I$srcdir/include $orig_CPPFLAGS" |
|
|
LIBS="$NCBI_GEO_LIBPATH $LIBGEODB $NCBI_SSS_LIBPATH $LIBSSSDB $LIBSSSUTILS $SYBASE_LIBS $NETWORK_LIBS $DL_LIBS $orig_LIBS" |
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM( |
|
|
[[#define FORWARDING_NCBICONF_H |
|
|
#include <geo_api.hpp>]], |
|
|
[[GEO_API::Pattern* p; if (p->isValid()) p->bind(1, "x", true, "y"); ]])], |
|
|
[ncbi_cv_lib_geodb=yes], [ncbi_cv_lib_geodb=no])]) |
|
|
|
|
|
if test "$ncbi_cv_lib_geodb" = yes; then |
|
|
AC_DEFINE(HAVE_LIBGEODB, 1, |
|
|
[Define to 1 if NCBI GEO DB library is available.]) |
|
|
else |
|
|
with_geo=no |
|
|
fi |
|
|
fi |
|
|
|
|
|
if test "$with_geo" != "no" ; then |
|
|
WithPackages="$WithPackages GEO" |
|
|
else |
|
|
WithoutPackages="$WithoutPackages GEO" |
|
| 5083 |
fi |
fi |
| 5084 |
|
|
| 5085 |
|
|
| 5086 |
# SP |
# SP |
|
with_sp=${with_sp:="yes"} |
|
|
|
|
| 5087 |
if test "$with_sp" != "no" ; then |
if test "$with_sp" != "no" ; then |
| 5088 |
SP_PATH=${SP_PATH:="$NCBI/SP"} |
SP_PATH=${SP_PATH:="$NCBI/SP"} |
| 5089 |
if test -n "$SP_INCLUDE"; then |
if test -n "$SP_INCLUDE"; then |
| 5093 |
SP_GENERIC="$SP_PATH/generic" |
SP_GENERIC="$SP_PATH/generic" |
| 5094 |
fi |
fi |
| 5095 |
if test -z "$SP_LIBPATH" ; then |
if test -z "$SP_LIBPATH" ; then |
| 5096 |
SP_LIBPATH="${SP_PATH}/${compiler_pfx}${release_debug}${mt_sfx}${bit64_sfx}" |
SP_LIBPATH="${SP_PATH}/${compiler_vpfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}" |
| 5097 |
fi |
fi |
| 5098 |
AC_MSG_CHECKING([for SP directories in $SP_PATH]) |
AC_MSG_CHECKING([for SP directories in $SP_PATH]) |
| 5099 |
if test ! -d "${SP_LIBPATH}" -o ! -d "${SP_INCLUDE}" ; then |
if test ! -d "${SP_LIBPATH}" -o ! -d "${SP_INCLUDE}" ; then |
| 5100 |
AC_MSG_RESULT([no]) |
AC_MSG_RESULT([no]) |
| 5101 |
with_sp="no" |
NCBI_MISSING_PACKAGE(sp) |
| 5102 |
else |
else |
| 5103 |
AC_MSG_RESULT([yes]) |
AC_MSG_RESULT([yes]) |
| 5104 |
fi |
fi |
| 5119 |
[[ SP_API::SGMLApplication app; ]])], |
[[ SP_API::SGMLApplication app; ]])], |
| 5120 |
[ncbi_cv_lib_sp=yes], [ncbi_cv_lib_sp=no])]) |
[ncbi_cv_lib_sp=yes], [ncbi_cv_lib_sp=no])]) |
| 5121 |
if test "$ncbi_cv_lib_sp" = "no"; then |
if test "$ncbi_cv_lib_sp" = "no"; then |
| 5122 |
with_sp="no" |
NCBI_MISSING_PACKAGE(sp) |
| 5123 |
fi |
fi |
| 5124 |
fi |
fi |
| 5125 |
|
|
| 5126 |
if test "$with_sp" = "no" ; then |
if test "$with_sp" = "no" ; then |
| 5127 |
SP_INCLUDE= |
SP_INCLUDE= |
| 5128 |
SP_LIBS= |
SP_LIBS= |
|
WithoutPackages="$WithoutPackages SP" |
|
| 5129 |
else |
else |
| 5130 |
WithPackages="$WithPackages SP" |
NCBI_PACKAGE(SP) |
| 5131 |
AC_DEFINE(HAVE_LIBSP, 1, [Define to 1 if the SP SGML library is available.]) |
AC_DEFINE(HAVE_LIBSP, 1, [Define to 1 if the SP SGML library is available.]) |
| 5132 |
fi |
fi |
| 5133 |
|
|
| 5134 |
|
|
|
## NCBI PubMed |
|
|
if test "$with_ncbi_c" = "no" ; then |
|
|
with_pubmed="no" |
|
|
fi |
|
|
|
|
|
if test "$with_pubmed" != "no" ; then |
|
|
case "$NCBI_PM_PATH" in |
|
|
"" ) NCBI_PM_PATH=$NCBI/pubmed${bit64_sfx} ;; |
|
|
*$bit64_sfx ) ;; |
|
|
* ) NCBI_PM_PATH=${NCBI_PM_PATH}${bit64_sfx} ;; |
|
|
esac |
|
|
pmtag=${release_debug}${bit64_sfx:-32} |
|
|
|
|
|
AC_CACHE_CHECK([for NCBI PubMed libraries in $NCBI_PM_PATH], ncbi_cv_lib_pm, |
|
|
[if test ! -d "${NCBI_PM_PATH}" ; then |
|
|
ncbi_cv_lib_pm="no" |
|
|
else |
|
|
CPPFLAGS="-I$NCBI_PM_PATH/pmentrez/include/Ncbi -I$NCBI_PM_PATH/xmldb/ur/include $NCBI_C_INCLUDE $orig_CPPFLAGS" |
|
|
LIBS="-L$NCBI_PM_PATH/xmldb$mt_sfx/out.$pmtag/lib -lpmurapi-static -L$NCBI_PM_PATH/pmentrez.$pmtag$mt_sfx/pmentrez/libs -lpmncbi $NCBI_C_LIBPATH -lncbi $orig_LIBS" |
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM( |
|
|
[[#include <ncbistr.hpp> |
|
|
#include <hastring.h>]], |
|
|
[[ CNcbiString("abc"); CAString("def"); ]])], |
|
|
[ncbi_cv_lib_pm=yes], [ncbi_cv_lib_pm=no]) |
|
|
fi]) |
|
|
if test "$ncbi_cv_lib_pm" = "no"; then |
|
|
with_pubmed="no" |
|
|
fi |
|
|
fi |
|
|
|
|
|
if test "$with_pubmed" = "no" ; then |
|
|
NCBI_PM_PATH="No_NCBI_PubMed" |
|
|
WithoutPackages="$WithoutPackages PubMed" |
|
|
else |
|
|
WithPackages="$WithPackages PubMed" |
|
|
AC_DEFINE(HAVE_LIBPUBMED, 1, |
|
|
[Define to 1 if NCBI PubMed libraries are available.]) |
|
|
fi |
|
|
|
|
|
|
|
| 5135 |
## ORBacus CORBA |
## ORBacus CORBA |
| 5136 |
if test "${with_orbacus:-yes}" = yes; then |
if test "${with_orbacus:-yes}" = yes; then |
| 5137 |
|
if test -d $NCBI/corba/${compiler_vpfx}Release${bit64_sfx}MT; then |
| 5138 |
|
: ${ORBACUS_PATH=$NCBI/corba/${compiler_vpfx}Release${bit64_sfx}MT} |
| 5139 |
|
else |
| 5140 |
: ${ORBACUS_PATH=$NCBI/corba/OB-4.0.1} |
: ${ORBACUS_PATH=$NCBI/corba/OB-4.0.1} |
| 5141 |
|
fi |
| 5142 |
elif test "$with_orbacus" != no; then |
elif test "$with_orbacus" != no; then |
| 5143 |
ORBACUS_PATH=$with_orbacus |
ORBACUS_PATH=$with_orbacus |
| 5144 |
fi |
fi |
| 5145 |
if test "$with_orbacus" != no; then |
if test -d "$ORBACUS_PATH"; then |
| 5146 |
fullpath=${ORBACUS_PATH}/${release_debug}${mt_sfx}${bit64_sfx} |
NCBI_FIX_DIR(ORBACUS_PATH) |
|
LIBOB="-lOB" |
|
|
if test "$with_mt" = "yes" ; then |
|
|
LIBOB="$LIBOB -lJTC" |
|
|
LIBIMR="-lIMR" |
|
|
else |
|
|
LIBIMR= |
|
| 5147 |
fi |
fi |
| 5148 |
|
if test "$with_orbacus" != no; then |
| 5149 |
|
fullpath=${ORBACUS_PATH}/${DEBUG_SFX}${mt_sfx}${bit64_sfx} |
| 5150 |
if test -f ${fullpath}/inc/OB/Config.h ; then |
if test -f ${fullpath}/inc/OB/Config.h ; then |
| 5151 |
: ${ORBACUS_INCLUDE="-I$ORBACUS_PATH/include -I$fullpath/inc"} |
: ${ORBACUS_INCLUDE="-I$ORBACUS_PATH/include -I$fullpath/inc"} |
| 5152 |
: ${ORBACUS_LIBPATH="-L$fullpath/lib ${CONF_f_runpath}${fullpath}/lib"} |
NCBI_RPATHIFY_COND(ORBACUS_LIBPATH, $fullpath/lib) |
| 5153 |
elif test -f ${ORBACUS_PATH}/include/OB/Config.h ; then |
elif test -f ${ORBACUS_PATH}/include/OB/Config.h ; then |
| 5154 |
: ${ORBACUS_INCLUDE="-I$ORBACUS_PATH/include"} |
: ${ORBACUS_INCLUDE="-I$ORBACUS_PATH/include"} |
| 5155 |
: ${ORBACUS_LIBPATH="-L$ORBACUS_PATH/lib ${CONF_f_runpath}${ORBACUS_PATH}/lib"} |
NCBI_RPATHIFY_COND(ORBACUS_LIBPATH, $ORBACUS_PATH/lib) |
| 5156 |
fi |
fi |
| 5157 |
|
case "$host_os:$with_mt" in |
| 5158 |
|
linux*:no) LIBJTC="-lJTC -pthread" ;; |
| 5159 |
|
*) LIBJTC="-lJTC" ;; |
| 5160 |
|
esac |
| 5161 |
|
|
| 5162 |
|
case "$with_mt:$ORBACUS_LIBPATH" in |
| 5163 |
|
yes:* | *:-L*MT/lib* ) |
| 5164 |
|
LIBOB="-lOB $LIBJTC" |
| 5165 |
|
LIBIMR="-lIMR" |
| 5166 |
|
;; |
| 5167 |
|
* ) |
| 5168 |
|
LIBOB="-lOB" |
| 5169 |
|
LIBIMR= |
| 5170 |
|
;; |
| 5171 |
|
esac |
| 5172 |
AC_CACHE_CHECK([for ORBacus in $ORBACUS_PATH], ncbi_cv_lib_orbacus, |
AC_CACHE_CHECK([for ORBacus in $ORBACUS_PATH], ncbi_cv_lib_orbacus, |
| 5173 |
[CPPFLAGS="$ORBACUS_INCLUDE $orig_CPPFLAGS" |
[CPPFLAGS="$ORBACUS_INCLUDE $orig_CPPFLAGS" |
| 5174 |
LIBS="$ORBACUS_LIBPATH $LIBOB $NETWORK_LIBS $orig_LIBS" |
LIBS="$ORBACUS_LIBPATH $LIBOB $NETWORK_LIBS $DL_LIBS $orig_LIBS" |
| 5175 |
AC_LINK_IFELSE([AC_LANG_PROGRAM( |
AC_LINK_IFELSE([AC_LANG_PROGRAM( |
| 5176 |
[[#include <OB/CORBA.h>]], |
[[#include <OB/CORBA.h>]], |
| 5177 |
[[ |
[[ |
| 5182 |
]])], |
]])], |
| 5183 |
[ncbi_cv_lib_orbacus=yes], [ncbi_cv_lib_orbacus=no])]) |
[ncbi_cv_lib_orbacus=yes], [ncbi_cv_lib_orbacus=no])]) |
| 5184 |
if test "$ncbi_cv_lib_orbacus" = "no"; then |
if test "$ncbi_cv_lib_orbacus" = "no"; then |
| 5185 |
with_orbacus="no" |
NCBI_MISSING_PACKAGE(orbacus) |
| 5186 |
fi |
fi |
| 5187 |
fi |
fi |
| 5188 |
if test "$with_orbacus" = no; then |
if test "$with_orbacus" = no; then |
|
WithoutPackages="$WithoutPackages ORBacus" |
|
| 5189 |
ORBACUS_PATH=No_ORBacus |
ORBACUS_PATH=No_ORBacus |
| 5190 |
ORBACUS_INCLUDE= |
ORBACUS_INCLUDE= |
| 5191 |
ORBACUS_LIBPATH= |
ORBACUS_LIBPATH= |
| 5192 |
LIBOB= |
LIBOB= |
| 5193 |
LIBIMR= |
LIBIMR= |
| 5194 |
else |
else |
| 5195 |
WithPackages="$WithPackages ORBacus" |
NCBI_PACKAGE(ORBacus) |
| 5196 |
AC_DEFINE(HAVE_ORBACUS, 1, |
AC_DEFINE(HAVE_ORBACUS, 1, |
| 5197 |
[Define to 1 if the ORBacus CORBA package is available.]) |
[Define to 1 if the ORBacus CORBA package is available.]) |
| 5198 |
fi |
fi |
| 5201 |
test -d SunWS_cache && rm -r SunWS_cache |
test -d SunWS_cache && rm -r SunWS_cache |
| 5202 |
|
|
| 5203 |
|
|
| 5204 |
|
## International Components for Unicode (ICU) |
| 5205 |
|
if test -z "$ICU_PATH" && icu-config --version >/dev/null 2>&1; then |
| 5206 |
|
ICU_PATH=`icu-config --prefix` |
| 5207 |
|
fi |
| 5208 |
|
|
| 5209 |
|
if test "$with_icu" != "no" ; then |
| 5210 |
|
case "$with_icu" in |
| 5211 |
|
yes | "" ) : ${ICU_PATH=$NCBI/icu} ;; |
| 5212 |
|
* ) ICU_PATH=$with_icu ;; |
| 5213 |
|
esac |
| 5214 |
|
if test -d "$ICU_PATH/${compiler_vpfx}${DEBUG_SFX}${bit64_sfx}${mt_sfx}/lib" \ |
| 5215 |
|
-a -z "$ICU_ARCH_PATH"; then |
| 5216 |
|
ICU_ARCH_PATH="$ICU_PATH/${compiler_vpfx}${DEBUG_SFX}${bit64_sfx}${mt_sfx}" |
| 5217 |
|
elif test -d "$ICU_PATH/${compiler_pfx}${DEBUG_SFX}${bit64_sfx}${mt_sfx}/lib" \ |
| 5218 |
|
-a -z "$ICU_ARCH_PATH"; then |
| 5219 |
|
ICU_ARCH_PATH="$ICU_PATH/${compiler_pfx}${DEBUG_SFX}${bit64_sfx}${mt_sfx}" |
| 5220 |
|
else |
| 5221 |
|
ICU_ARCH_PATH="$ICU_PATH" |
| 5222 |
|
fi |
| 5223 |
|
ICU_BINPATH=${ICU_BINPATH:="$ICU_ARCH_PATH/bin"} |
| 5224 |
|
ICU_LIBPATH=${ICU_LIBPATH:="$ICU_ARCH_PATH/lib"} |
| 5225 |
|
ICU_INCLUDE= |
| 5226 |
|
AC_CACHE_CHECK([for ICU in $ICU_ARCH_PATH], ncbi_cv_lib_icu, |
| 5227 |
|
[ICU_CONFIG=`$ICU_BINPATH/icu-config --bindir 2>/dev/null`/icu-config |
| 5228 |
|
if test -x "$ICU_CONFIG" ; then |
| 5229 |
|
ICU_INCLUDE=`$ICU_CONFIG --cppflags-searchpath` |
| 5230 |
|
NCBI_RPATHIFY_OUTPUT(ICU_LIBS, $ICU_CONFIG --ldflags) |
| 5231 |
|
|
| 5232 |
|
CPPFLAGS="$ICU_INCLUDE $orig_CPPFLAGS" |
| 5233 |
|
LIBS="$ICU_LIBS $orig_LIBS" |
| 5234 |
|
AC_LINK_IFELSE([AC_LANG_PROGRAM( |
| 5235 |
|
[[#include <unicode/unistr.h>]], |
| 5236 |
|
[[int32_t i = UNICODE_STRING_SIMPLE("foo").indexOf('f');]])], |
| 5237 |
|
[ncbi_cv_lib_icu=yes], [ncbi_cv_lib_icu=no]) |
| 5238 |
|
else |
| 5239 |
|
ncbi_cv_lib_icu=no |
| 5240 |
|
fi]) |
| 5241 |
|
if test "$ncbi_cv_lib_icu" = "no"; then |
| 5242 |
|
NCBI_MISSING_PACKAGE(icu) |
| 5243 |
|
fi |
| 5244 |
|
fi |
| 5245 |
|
|
| 5246 |
|
if test "$with_icu" = "no" ; then |
| 5247 |
|
ICU_PATH="No_ICU" |
| 5248 |
|
ICU_INCLUDE= |
| 5249 |
|
ICU_LIBS= |
| 5250 |
|
ICU_STATIC_LIBS= |
| 5251 |
|
else |
| 5252 |
|
NCBI_PACKAGE(ICU) |
| 5253 |
|
ICU_CONFIG="`$ICU_BINPATH/icu-config --bindir`/icu-config" |
| 5254 |
|
# The "yes" may have been cached; get the actual settings again if needed |
| 5255 |
|
if test -z "$ICU_INCLUDE"; then |
| 5256 |
|
ICU_INCLUDE=`$ICU_CONFIG --cppflags-searchpath` |
| 5257 |
|
NCBI_RPATHIFY_OUTPUT(ICU_LIBS, $ICU_CONFIG --ldflags) |
| 5258 |
|
fi |
| 5259 |
|
ICU_STATIC_LIBS=`$ICU_CONFIG --ldflags | sed -e 's/-licu/-lsicu/g'` |
| 5260 |
|
AC_DEFINE(HAVE_ICU, 1, [Define to 1 if ICU libraries are available.]) |
| 5261 |
|
fi |
| 5262 |
|
|
| 5263 |
|
|
| 5264 |
### XML/XSL libraries |
### XML/XSL libraries |
| 5265 |
|
if test -d "$NCBI/expat/include"; then |
| 5266 |
: ${EXPAT_PATH=$NCBI/expat} |
: ${EXPAT_PATH=$NCBI/expat} |
| 5267 |
|
fi |
| 5268 |
NCBI_CHECK_THIRD_PARTY_LIB(expat, |
NCBI_CHECK_THIRD_PARTY_LIB(expat, |
| 5269 |
AC_LANG_PROGRAM([#include <expat.h>], |
AC_LANG_PROGRAM([#include <expat.h>], |
| 5270 |
[XML_Parser parser = XML_ParserCreate("utf-8");])) |
[XML_Parser parser = XML_ParserCreate("utf-8");])) |
| 5271 |
|
if test -f "${EXPAT_PATH}/lib${bit64_sfx}/libexpat-static.a"; then |
| 5272 |
|
EXPAT_STATIC_LIBS="-L${EXPAT_PATH}/lib${bit64_sfx} -lexpat-static" |
| 5273 |
|
else |
| 5274 |
|
EXPAT_STATIC_LIBS=${EXPAT_LIBS} |
| 5275 |
|
fi |
| 5276 |
: ${SABLOT_PATH=$NCBI/Sablot} |
: ${SABLOT_PATH=$NCBI/Sablot} |
| 5277 |
|
vpath="$SABLOT_PATH/${compiler_vpfx}build" |
| 5278 |
|
test -d "$vpath" && SABLOT_PATH=$vpath |
| 5279 |
|
if test -d "$SABLOT_PATH"; then |
| 5280 |
|
NCBI_FIX_DIR(SABLOT_PATH) |
| 5281 |
|
fi |
| 5282 |
NCBI_CHECK_THIRD_PARTY_LIB(sablot, |
NCBI_CHECK_THIRD_PARTY_LIB(sablot, |
| 5283 |
AC_LANG_PROGRAM([#include <sablot.h>], |
AC_LANG_PROGRAM([#include <sablot.h>], |
| 5284 |
[SDOM_Document* D; int x = SablotParse(NULL, "file:/dev/null", D);]), |
[SDOM_Document* D; int x = SablotParse(NULL, "file:/dev/null", D);]), |
| 5285 |
$EXPAT_LIBS) |
$EXPAT_LIBS) |
| 5286 |
test -d SunWS_cache && rm -r SunWS_cache |
test -d SunWS_cache && rm -r SunWS_cache |
| 5287 |
|
if test -f "${SABLOT_PATH}/lib${bit64_sfx}/libsablot-static.a"; then |
| 5288 |
|
SABLOT_STATIC_LIBS="-L${SABLOT_PATH}/lib${bit64_sfx} -lsablot-static $EXPAT_STATIC_LIBS" |
| 5289 |
|
else |
| 5290 |
|
SABLOT_STATIC_LIBS=${SABLOT_LIBS} |
| 5291 |
|
fi |
| 5292 |
|
|
| 5293 |
|
: ${LIBXML_PATH=$NCBI/libxml} |
| 5294 |
|
# test -d "$LIBXML_PATH" || LIBXML_PATH=`xml2-config --prefix 2>/dev/null` |
| 5295 |
|
if test "$with_libxml" != "no"; then |
| 5296 |
|
case "$with_libxml" in |
| 5297 |
|
yes | "" ) ;; |
| 5298 |
|
* ) LIBXML_PATH=$with_libxml ;; |
| 5299 |
|
esac |
| 5300 |
|
for pfx in "$compiler_vpfx" "$compiler_pfx" "" ; do |
| 5301 |
|
vpath=$LIBXML_PATH/$pfx${DEBUG_SFX}${mt_sfx}${bit64_sfx} |
| 5302 |
|
if test -d "$vpath" ; then |
| 5303 |
|
LIBXML_PATH=$vpath |
| 5304 |
|
break |
| 5305 |
|
fi |
| 5306 |
|
done |
| 5307 |
|
if test -d "$LIBXML_PATH"; then |
| 5308 |
|
NCBI_FIX_DIR(LIBXML_PATH) |
| 5309 |
|
in_path=" in $LIBXML_PATH" |
| 5310 |
|
if test -n "$LIBXML_INCLUDE"; then |
| 5311 |
|
: |
| 5312 |
|
elif test -d "$LIBXML_PATH/include/libxml2/libxml"; then |
| 5313 |
|
LIBXML_INCLUDE="-I$LIBXML_PATH/include/libxml2 -I$LIBXML_PATH/include" |
| 5314 |
|
elif test -d "$LIBXML_PATH/include/libxml"; then |
| 5315 |
|
LIBXML_INCLUDE="-I$LIBXML_PATH/include"; |
| 5316 |
|
fi |
| 5317 |
|
if test -d "$LIBXML_PATH/lib${bit64_sfx}"; then |
| 5318 |
|
LIBXML_LIBPATH_="$LIBXML_PATH/lib${bit64_sfx}" |
| 5319 |
|
elif test -d "$LIBXML_PATH/lib"; then |
| 5320 |
|
LIBXML_LIBPATH_="$LIBXML_PATH/lib" |
| 5321 |
|
fi |
| 5322 |
|
NCBI_RPATHIFY_COND(LIBXML_LIBPATH, $LIBXML_LIBPATH_) |
| 5323 |
|
LIBXML_LIBS="$LIBXML_LIBPATH -lxml2" |
| 5324 |
|
else |
| 5325 |
|
LIBXML_INCLUDE="-I/usr/include/libxml2" |
| 5326 |
|
LIBXML_LIBS="-lxml2" |
| 5327 |
|
in_path= |
| 5328 |
|
fi |
| 5329 |
|
LIBXML_LIBS="$LIBXML_LIBS $ICONV_LIBS" |
| 5330 |
|
AC_CACHE_CHECK([for libxml2$in_path], ncbi_cv_lib_libxml, |
| 5331 |
|
CPPFLAGS="$LIBXML_INCLUDE $orig_CPPFLAGS" |
| 5332 |
|
LIBS="$LIBXML_LIBS $orig_LIBS" |
| 5333 |
|
[AC_LINK_IFELSE( |
| 5334 |
|
[AC_LANG_PROGRAM( |
| 5335 |
|
[#include <libxml/parser.h>], |
| 5336 |
|
[xmlDocPtr doc = xmlParseFile("foo.xml");])], |
| 5337 |
|
[ncbi_cv_lib_libxml=yes], [ncbi_cv_lib_libxml=no])]) |
| 5338 |
|
if test "$ncbi_cv_lib_libxml" = "no"; then |
| 5339 |
|
NCBI_MISSING_PACKAGE(libxml) |
| 5340 |
|
fi |
| 5341 |
|
fi |
| 5342 |
|
if test "$with_libxml" = "no"; then |
| 5343 |
|
LIBXML_PATH="No_LIBXML" |
| 5344 |
|
LIBXML_INCLUDE= |
| 5345 |
|
LIBXML_LIBPATH_= |
| 5346 |
|
LIBXML_LIBS= |
| 5347 |
|
else |
| 5348 |
|
NCBI_PACKAGE(LIBXML) |
| 5349 |
|
LIBXML_INCLUDE="$LIBXML_INCLUDE" |
| 5350 |
|
AC_DEFINE(HAVE_LIBXML, 1, [Define to 1 if libxml2 is available.]) |
| 5351 |
|
fi |
| 5352 |
|
AC_SUBST(LIBXML_INCLUDE) |
| 5353 |
|
AC_SUBST(LIBXML_LIBS) |
| 5354 |
|
|
| 5355 |
|
if test -f "${LIBXML_LIBPATH_}/libxml2-static.a"; then |
| 5356 |
|
LIBXML_STATIC_LIBS="-L${LIBXML_LIBPATH_} -lxml2-static" |
| 5357 |
|
else |
| 5358 |
|
LIBXML_STATIC_LIBS=${LIBXML_LIBS} |
| 5359 |
|
fi |
| 5360 |
|
|
| 5361 |
|
: ${LIBXSLT_PATH=$LIBXML_PATH} |
| 5362 |
|
NCBI_CHECK_THIRD_PARTY_LIB_EX(libxslt, LIBXSLT, xslt, |
| 5363 |
|
[AC_LANG_PROGRAM([#include <libxslt/xslt.h>], [xsltInit()])], |
| 5364 |
|
[], [$LIBXML_LIBS $Z_LIBS], [$LIBXML_INCLUDE]) |
| 5365 |
|
|
| 5366 |
|
# XXX - they might be in different directories in some setups |
| 5367 |
|
if test -f "${LIBXML_LIBPATH_}/libxslt-static.a"; then |
| 5368 |
|
LIBXSLT_STATIC_LIBS="-L${LIBXML_LIBPATH_} -lxslt-static" |
| 5369 |
|
else |
| 5370 |
|
LIBXSLT_STATIC_LIBS=${LIBXSLT_LIBS} |
| 5371 |
|
fi |
| 5372 |
|
|
| 5373 |
|
: ${XERCES_PATH=$NCBI/xerces} |
| 5374 |
|
if test "$with_xerces" != no; then |
| 5375 |
|
if test "${with_xerces-yes}" != yes; then |
| 5376 |
|
XERCES_PATH=$with_xerces |
| 5377 |
|
fi |
| 5378 |
|
if test -d "$XERCES_PATH"; then |
| 5379 |
|
NCBI_FIX_DIR(XERCES_PATH) |
| 5380 |
|
fi |
| 5381 |
|
vpath="$XERCES_PATH/${compiler_vpfx}${DEBUG_SFX}${bit64_sfx}${mt_sfx}" |
| 5382 |
|
if test -d "$vpath/lib"; then |
| 5383 |
|
XERCES_PATH=$vpath |
| 5384 |
|
NCBI_FIX_DIR(XERCES_PATH) |
| 5385 |
|
elif test -d "$vpath"; then |
| 5386 |
|
: ${XERCES_LIBPATH=$vpath} |
| 5387 |
|
NCBI_FIX_DIR(XERCES_LIBPATH) |
| 5388 |
|
else |
| 5389 |
|
vpath="$XERCES_PATH/${compiler_pfx}${DEBUG_SFX}${bit64_sfx}${mt_sfx}" |
| 5390 |
|
if test -d "$vpath/lib"; then |
| 5391 |
|
XERCES_PATH=$vpath |
| 5392 |
|
NCBI_FIX_DIR(XERCES_PATH) |
| 5393 |
|
elif test -d "$vpath"; then |
| 5394 |
|
XERCES_LIBPATH=$vpath |
| 5395 |
|
NCBI_FIX_DIR(XERCES_LIBPATH) |
| 5396 |
|
fi |
| 5397 |
|
fi |
| 5398 |
|
if test -d $XERCES_PATH; then |
| 5399 |
|
in_path=" in $XERCES_PATH" |
| 5400 |
|
: ${XERCES_INCLUDE=-I$XERCES_PATH/include} |
| 5401 |
|
: ${XERCES_LIBPATH=$XERCES_PATH/lib} |
| 5402 |
|
else |
| 5403 |
|
in_path='' |
| 5404 |
|
fi |
| 5405 |
|
NCBI_RPATHIFY(XERCES_LIBPATH_, $XERCES_LIBPATH) |
| 5406 |
|
XERCES_LIBS="$XERCES_LIBPATH_ -lxerces-c" |
| 5407 |
|
AC_CACHE_CHECK([for Xerces-C++$in_path], ncbi_cv_lib_xerces_c, |
| 5408 |
|
[CPPFLAGS="$XERCES_INCLUDE $orig_CPPFLAGS" |
| 5409 |
|
LIBS="$XERCES_LIBS $ICU_LIBS $orig_LIBS" |
| 5410 |
|
AC_LINK_IFELSE( |
| 5411 |
|
[AC_LANG_PROGRAM([[#include <xercesc/dom/DOM.hpp>]], |
| 5412 |
|
[[xercesc::DOMImplementation* impl |
| 5413 |
|
= xercesc::DOMImplementationRegistry::getDOMImplementation |
| 5414 |
|
(xercesc::XMLString::transcode("XML 1.0"));]])], |
| 5415 |
|
ncbi_cv_lib_xerces_c=yes, ncbi_cv_lib_xerces_c=no)]) |
| 5416 |
|
if test $ncbi_cv_lib_xerces_c = yes; then |
| 5417 |
|
if test -f "$XERCES_LIBPATH/libxerces-c-static.a"; then |
| 5418 |
|
XERCES_STATIC_LIBS="-L$XERCES_LIBPATH -lxerces-c-static" |
| 5419 |
|
else |
| 5420 |
|
XERCES_STATIC_LIBS=$XERCES_LIBS |
| 5421 |
|
fi |
| 5422 |
|
else |
| 5423 |
|
NCBI_MISSING_PACKAGE(xerces) |
| 5424 |
|
fi |
| 5425 |
|
fi |
| 5426 |
|
if test "$with_xerces" != no; then |
| 5427 |
|
NCBI_PACKAGE(Xerces) |
| 5428 |
|
AC_DEFINE(HAVE_XERCES, 1, [Define to 1 if Xerces-C++ is available.]) |
| 5429 |
|
else |
| 5430 |
|
XERCES_INCLUDE= |
| 5431 |
|
XERCES_LIBS= |
| 5432 |
|
XERCES_STATIC_LIBS= |
| 5433 |
|
fi |
| 5434 |
|
|
| 5435 |
|
: ${XALAN_PATH=$NCBI/xalan} |
| 5436 |
|
if test "$with_xalan" != no; then |
| 5437 |
|
if test "${with_xalan-yes}" != yes; then |
| 5438 |
|
XALAN_PATH=$with_xalan |
| 5439 |
|
fi |
| 5440 |
|
if test -d "$XALAN_PATH"; then |
| 5441 |
|
NCBI_FIX_DIR(XALAN_PATH) |
| 5442 |
|
fi |
| 5443 |
|
vpath="$XALAN_PATH/${compiler_vpfx}${DEBUG_SFX}${bit64_sfx}${mt_sfx}" |
| 5444 |
|
if test -d "$vpath/lib"; then |
| 5445 |
|
XALAN_PATH=$vpath |
| 5446 |
|
NCBI_FIX_DIR(XALAN_PATH) |
| 5447 |
|
elif test -d "$vpath"; then |
| 5448 |
|
: ${XALAN_LIBPATH=$vpath} |
| 5449 |
|
NCBI_FIX_DIR(XALAN_LIBPATH) |
| 5450 |
|
else |
| 5451 |
|
vpath="$XALAN_PATH/${compiler_pfx}${DEBUG_SFX}${bit64_sfx}${mt_sfx}" |
| 5452 |
|
if test -d "$vpath/lib"; then |
| 5453 |
|
XALAN_PATH=$vpath |
| 5454 |
|
NCBI_FIX_DIR(XALAN_PATH) |
| 5455 |
|
elif test -d "$vpath"; then |
| 5456 |
|
XALAN_LIBPATH=$vpath |
| 5457 |
|
NCBI_FIX_DIR(XALAN_LIBPATH) |
| 5458 |
|
fi |
| 5459 |
|
fi |
| 5460 |
|
if test -d $XALAN_PATH; then |
| 5461 |
|
in_path=" in $XALAN_PATH" |
| 5462 |
|
: ${XALAN_INCLUDE=-I$XALAN_PATH/include} |
| 5463 |
|
: ${XALAN_LIBPATH=$XALAN_PATH/lib} |
| 5464 |
|
else |
| 5465 |
|
in_path='' |
| 5466 |
|
fi |
| 5467 |
|
NCBI_RPATHIFY(XALAN_LIBPATH_, $XALAN_LIBPATH) |
| 5468 |
|
XALAN_LIBS="$XALAN_LIBPATH_ -lxalan-c -lxalanMsg" |
| 5469 |
|
AC_CACHE_CHECK([for Xalan-C++$in_path], ncbi_cv_lib_xalan_c, |
| 5470 |
|
[CPPFLAGS="$XALAN_INCLUDE $XERCES_INCLUDE $orig_CPPFLAGS" |
| 5471 |
|
LIBS="$XALAN_LIBS $XERCES_LIBS $ICU_LIBS $orig_LIBS" |
| 5472 |
|
AC_LINK_IFELSE( |
| 5473 |
|
[AC_LANG_PROGRAM([[#include <xalanc/XalanEXSLT/XalanEXSLTMath.hpp>]], |
| 5474 |
|
[[xalanc::XalanEXSLTMathFunctionsInstaller::installGlobal();]])], |
| 5475 |
|
ncbi_cv_lib_xalan_c=yes, ncbi_cv_lib_xalan_c=no)]) |
| 5476 |
|
if test $ncbi_cv_lib_xalan_c = yes; then |
| 5477 |
|
if test -f "$XALAN_LIBPATH/libxalan-c-static.a"; then |
| 5478 |
|
XALAN_STATIC_LIBS="-L$XALAN_LIBPATH -lxalan-c-static -lxalanMsg-static" |
| 5479 |
|
else |
| 5480 |
|
XALAN_STATIC_LIBS=$XALAN_LIBS |
| 5481 |
|
fi |
| 5482 |
|
else |
| 5483 |
|
NCBI_MISSING_PACKAGE(xalan) |
| 5484 |
|
fi |
| 5485 |
|
fi |
| 5486 |
|
if test "$with_xalan" != no; then |
| 5487 |
|
NCBI_PACKAGE(Xalan) |
| 5488 |
|
AC_DEFINE(HAVE_XALAN, 1, [Define to 1 if Xalan-C++ is available.]) |
| 5489 |
|
else |
| 5490 |
|
XALAN_INCLUDE= |
| 5491 |
|
XALAN_LIBS= |
| 5492 |
|
XALAN_STATIC_LIBS= |
| 5493 |
|
fi |
| 5494 |
|
|
| 5495 |
|
test -d SunWS_cache && rm -r SunWS_cache |
| 5496 |
|
|
| 5497 |
### SQLite |
### SQLite |
| 5498 |
: ${SQLITE_PATH=$NCBI/sqlite} |
: ${SQLITE_PATH=$NCBI/sqlite2} |
| 5499 |
|
if test -d "$SQLITE_PATH"; then |
| 5500 |
|
NCBI_FIX_DIR(SQLITE_PATH) |
| 5501 |
|
fi |
| 5502 |
NCBI_CHECK_THIRD_PARTY_LIB(sqlite, |
NCBI_CHECK_THIRD_PARTY_LIB(sqlite, |
| 5503 |
AC_LANG_PROGRAM([#include <sqlite.h>], |
AC_LANG_PROGRAM([#include <sqlite.h>], |
| 5504 |
[sqlite* db = sqlite_open("foo.db", 0, NULL);])) |
[char *errs; sqlite* db = sqlite_open("foo.db", 0, &errs);])) |
| 5505 |
|
|
| 5506 |
|
case "$with_sqlite3" in |
| 5507 |
|
yes | '' ) : ${SQLITE3_PATH=$NCBI/sqlite3} ;; |
| 5508 |
|
* ) SQLITE3_PATH=$with_sqlite3 ;; |
| 5509 |
|
esac |
| 5510 |
|
|
| 5511 |
|
if test -d "$SQLITE3_PATH"; then |
| 5512 |
|
NCBI_FIX_DIR(SQLITE3_PATH) |
| 5513 |
|
fi |
| 5514 |
|
if test -d "$SQLITE3_PATH/${compiler_pfx}${DEBUG_SFX}${MT_SFX}${bit64_sfx}/lib"; then |
| 5515 |
|
SQLITE3_LIBDIR=$SQLITE3_PATH/${compiler_pfx}${DEBUG_SFX}${MT_SFX}${bit64_sfx}/lib |
| 5516 |
|
elif test -d $SQLITE3_PATH/lib${bit64_sfx}; then |
| 5517 |
|
SQLITE3_LIBDIR=$SQLITE3_PATH/lib${bit64_sfx} |
| 5518 |
|
else |
| 5519 |
|
SQLITE3_LIBDIR=$SQLITE3_PATH/lib |
| 5520 |
|
fi |
| 5521 |
|
NCBI_RPATHIFY(SQLITE3_LIBPATH, $SQLITE3_LIBDIR) |
| 5522 |
|
NCBI_CHECK_THIRD_PARTY_LIB(sqlite3, |
| 5523 |
|
AC_LANG_PROGRAM([#include <sqlite3.h>], |
| 5524 |
|
[sqlite3_pcache_methods m; |
| 5525 |
|
int status = sqlite3_config(SQLITE_CONFIG_GETPCACHE, &m);])) |
| 5526 |
|
if test -n "$SQLITE3_LIBS"; then |
| 5527 |
|
CPPFLAGS="$SQLITE3_INCLUDE $orig_CPPFLAGS" |
| 5528 |
|
AC_CHECK_HEADER(sqlite3async.h, |
| 5529 |
|
[AC_DEFINE(HAVE_SQLITE3ASYNC_H, 1, |
| 5530 |
|
[Define to 1 if you have the <sqlite3async.h> header file.]) |
| 5531 |
|
NCBI_PACKAGE(SQLITE3ASYNC)]) |
| 5532 |
|
LIBS="$SQLITE3_LIBS $orig_LIBS" |
| 5533 |
|
AC_CHECK_FUNCS(sqlite3_unlock_notify) |
| 5534 |
|
fi |
| 5535 |
|
if test -n "$SQLITE3_LIBS" -a -f "$SQLITE3_LIBDIR/libsqlite3-static.a"; then |
| 5536 |
|
SQLITE3_STATIC_LIBS="-L$SQLITE3_LIBDIR -lsqlite3-static" |
| 5537 |
|
else |
| 5538 |
|
SQLITE3_STATIC_LIBS=$SQLITE3_LIBS |
| 5539 |
|
fi |
| 5540 |
|
|
| 5541 |
|
|
| 5542 |
|
### OEChem |
| 5543 |
|
# somewhat kludgish, as we now wanto to add in oeiupac and oedepict, |
| 5544 |
|
# which depend on oechem.... |
| 5545 |
|
: ${OECHEM_PATH=$NCBI/oechem} |
| 5546 |
|
NCBI_CHECK_THIRD_PARTY_LIB(oechem, |
| 5547 |
|
AC_LANG_PROGRAM([#include <oechem.h>], |
| 5548 |
|
[OEChem::OEMol mol; OEChem::OEConfBase* c = mol.GetActive();]), |
| 5549 |
|
-loeiupac -loedepict -loechem -loesystem -loeplatform -lz, $NETWORK_LIBS) |
| 5550 |
|
if test -n "$OECHEM_LIBS"; then |
| 5551 |
|
OECHEM_LIBS=`echo $OECHEM_LIBS | sed -e 's/-loechem \(.*-loechem .*\)/\1/'` |
| 5552 |
|
fi |
| 5553 |
|
test -d SunWS_cache && rm -r SunWS_cache |
| 5554 |
|
|
| 5555 |
|
|
| 5556 |
|
### Sun Grid Engine |
| 5557 |
|
case "$with_sge" in |
| 5558 |
|
yes | "" ) : ${SGE_PATH=/netopt/sge} ;; |
| 5559 |
|
* ) SGE_PATH=$with_sge ;; |
| 5560 |
|
esac |
| 5561 |
|
if test -d "$SGE_PATH" -a -z "$SGE_LIBPATH"; then |
| 5562 |
|
case "$host:$NCBI_PLATFORM_BITS" in |
| 5563 |
|
i?86-*-darwin* ) SGE_LIBPATH=$SGE_PATH/lib/darwin-x86 ;; |
| 5564 |
|
i?86-*-linux* ) SGE_LIBPATH=$SGE_PATH/lib/lx24-x86 ;; |
| 5565 |
|
i?86-*-solaris*:32 ) SGE_LIBPATH=$SGE_PATH/lib/sol-x86 ;; |
| 5566 |
|
i?86-*-solaris*:64 ) SGE_LIBPATH=$SGE_PATH/lib/sol-amd64 ;; |
| 5567 |
|
powerpc-*-darwin* ) SGE_LIBPATH=$SGE_PATH/lib/darwin-ppc ;; |
| 5568 |
|
sparc-*-solaris*:32 ) SGE_LIBPATH=$SGE_PATH/lib/sol-sparc ;; |
| 5569 |
|
sparc-*-solaris*:64 ) SGE_LIBPATH=$SGE_PATH/lib/sol-sparc64 ;; |
| 5570 |
|
x86_64-*-linux* ) SGE_LIBPATH=$SGE_PATH/lib/lx24-amd64 ;; |
| 5571 |
|
esac |
| 5572 |
|
NCBI_RPATHIFY(SGE_LIBPATH, $SGE_LIBPATH) |
| 5573 |
|
fi |
| 5574 |
|
NCBI_CHECK_THIRD_PARTY_LIB_EX(sge, SGE, drmaa, |
| 5575 |
|
[[AC_LANG_PROGRAM([[#include <sys/types.h> |
| 5576 |
|
#include <drmaa.h>]], |
| 5577 |
|
[[char buf[1024]; drmaa_init("SGE", buf, sizeof(buf));]])]]) |
| 5578 |
|
|
| 5579 |
|
|
| 5580 |
|
### muParser |
| 5581 |
|
case "$with_muparser" in |
| 5582 |
|
yes | '' ) : ${MUPARSER_PATH=$NCBI/muParser} ;; |
| 5583 |
|
* ) MUPARSER_PATH=$with_muparser ;; |
| 5584 |
|
esac |
| 5585 |
|
|
| 5586 |
|
if test -d "$MUPARSER_PATH"; then |
| 5587 |
|
NCBI_FIX_DIR(MUPARSER_PATH) |
| 5588 |
|
fi |
| 5589 |
|
if test -d "$MUPARSER_PATH/${compiler_vpfx}${DEBUG_SFX}${bit64_sfx}/lib"; then |
| 5590 |
|
MUPARSER_LIBPATH=-L$MUPARSER_PATH/${compiler_vpfx}${DEBUG_SFX}${bit64_sfx}/lib |
| 5591 |
|
elif test -d "$MUPARSER_PATH/${compiler_pfx}${DEBUG_SFX}${bit64_sfx}/lib"; then |
| 5592 |
|
MUPARSER_LIBPATH=-L$MUPARSER_PATH/${compiler_pfx}${DEBUG_SFX}${bit64_sfx}/lib |
| 5593 |
|
fi |
| 5594 |
|
|
| 5595 |
|
NCBI_CHECK_THIRD_PARTY_LIB(muparser, |
| 5596 |
|
[[AC_LANG_PROGRAM([[#include <muParser.h>]], |
| 5597 |
|
[[mu::Parser parser;]])]]) |
| 5598 |
|
|
| 5599 |
|
|
| 5600 |
|
### hdf5 |
| 5601 |
|
case "$with_hdf5" in |
| 5602 |
|
yes | '' ) : ${HDF5_PATH=$NCBI/hdf5} ;; |
| 5603 |
|
* ) HDF5_PATH=$with_hdf5 ;; |
| 5604 |
|
esac |
| 5605 |
|
|
| 5606 |
|
if test -d "$HDF5_PATH/${compiler_vpfx}${DEBUG_SFX}${bit64_sfx}"; then |
| 5607 |
|
HDF5_PATH=$HDF5_PATH/${compiler_vpfx}${DEBUG_SFX}${bit64_sfx} |
| 5608 |
|
elif test -d "$HDF5_PATH/${compiler_pfx}${DEBUG_SFX}${bit64_sfx}"; then |
| 5609 |
|
HDF5_PATH=$HDF5_PATH/${compiler_pfx}${DEBUG_SFX}${bit64_sfx} |
| 5610 |
|
fi |
| 5611 |
|
if test -d "$HDF5_PATH"; then |
| 5612 |
|
NCBI_FIX_DIR(HDF5_PATH) |
| 5613 |
|
fi |
| 5614 |
|
|
| 5615 |
|
NCBI_CHECK_THIRD_PARTY_LIB_EX(hdf5, HDF5, hdf5_cpp, |
| 5616 |
|
[[AC_LANG_PROGRAM([[#include <H5Cpp.h>]], |
| 5617 |
|
[[H5::H5Library::open();]])]], |
| 5618 |
|
[-lhdf5]) |
| 5619 |
|
|
| 5620 |
|
|
| 5621 |
### Image libraries |
### Image libraries |
| 5622 |
: ${JPEG_PATH=$NCBI/gd} |
# : ${JPEG_PATH=/usr/sfw} |
| 5623 |
# Grr... jpeglib.h isn't especially well-behaved. |
# Grr... jpeglib.h isn't especially well-behaved. |
| 5624 |
NCBI_CHECK_THIRD_PARTY_LIB(jpeg, |
NCBI_CHECK_THIRD_PARTY_LIB(jpeg, |
| 5625 |
AC_LANG_PROGRAM([#include <sys/types.h> |
AC_LANG_PROGRAM([#include <sys/types.h> |
| 5632 |
cinfo.err = jpeg_std_error(&jerr); |
cinfo.err = jpeg_std_error(&jerr); |
| 5633 |
])) |
])) |
| 5634 |
|
|
| 5635 |
: ${PNG_PATH=$NCBI/gd} |
# : ${PNG_PATH=/usr/sfw} |
| 5636 |
NCBI_CHECK_THIRD_PARTY_LIB(png, |
NCBI_CHECK_THIRD_PARTY_LIB(png, |
| 5637 |
AC_LANG_PROGRAM([#include <png.h>], |
AC_LANG_PROGRAM([#include <png.h>], |
| 5638 |
[png_structp png_ptr |
[png_structp png_ptr |
| 5639 |
= png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); |
= png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); |
| 5640 |
]), -lz) |
]), $Z_LIBS, [], $Z_INCLUDE) |
| 5641 |
|
|
| 5642 |
: ${TIFF_PATH=/usr/sfw} |
# : ${TIFF_PATH=/usr/sfw} |
| 5643 |
NCBI_CHECK_THIRD_PARTY_LIB(tiff, |
NCBI_CHECK_THIRD_PARTY_LIB(tiff, |
| 5644 |
AC_LANG_PROGRAM([#include <tiffio.h>], |
AC_LANG_PROGRAM([#include <tiffio.h>], |
| 5645 |
[TIFF* tiff = TIFFOpen("foo", "r");]), -lz) |
[TIFF* tiff = TIFFOpen("foo", "r");]), $Z_LIBS, $JPEG_LIBS) |
| 5646 |
## etc. |
## etc. |
| 5647 |
|
|
| 5648 |
# Paths? |
# Paths? |
| 5664 |
GIF_LIBS=$UNGIF_LIBS |
GIF_LIBS=$UNGIF_LIBS |
| 5665 |
fi |
fi |
| 5666 |
|
|
| 5667 |
test -n "$x_includes" && : ${XPM_PATH=`dirname "$x_includes"`} |
test -n "$x_libraries" && : ${XPM_PATH=`dirname "$x_libraries"`} |
| 5668 |
NCBI_CHECK_THIRD_PARTY_LIB(Xpm, |
NCBI_CHECK_THIRD_PARTY_LIB(Xpm, |
| 5669 |
AC_LANG_PROGRAM([#include <X11/xpm.h>], |
AC_LANG_PROGRAM([#include <X11/xpm.h>], |
| 5670 |
[XpmImage image; XpmInfo info; |
[XpmImage image; XpmInfo info; |
| 5671 |
XpmReadFileToXpmImage("foo", &image, &info);]), $X_LIBS -lX11) |
XpmReadFileToXpmImage("foo", &image, &info);]), $X_LIBS -lX11, [], |
| 5672 |
|
$X_CFLAGS) |
| 5673 |
|
# The use of X_CFLAGS is probably redundant, but shouldn't hurt. |
| 5674 |
|
|
| 5675 |
|
## FreeType |
| 5676 |
|
if test "$with_freetype" != "no" ; then |
| 5677 |
|
: ${FREETYPE_BINPATH=$FREETYPE_PATH/bin} |
| 5678 |
|
AC_PATH_PROG(freetype_config, freetype-config, [], |
| 5679 |
|
[$FREETYPE_BINPATH:$PATH]) |
| 5680 |
|
if test -n "$freetype_config" ; then |
| 5681 |
|
: ${FREETYPE_BINPATH=`dirname $freetype_config`} |
| 5682 |
|
: ${FREETYPE_INCLUDE=`$freetype_config --cflags`} |
| 5683 |
|
NCBI_RPATHIFY_OUTPUT_COND(FREETYPE_LIBS, $freetype_config --libs, |
| 5684 |
|
[$no_usr_lib]) |
| 5685 |
|
AC_CACHE_CHECK([whether FREETYPE_INCLUDE needs doctoring], |
| 5686 |
|
ncbi_cv_lib_freetype_fix_include, |
| 5687 |
|
[CPPFLAGS="$FREETYPE_INCLUDE $orig_CPPFLAGS" |
| 5688 |
|
AC_COMPILE_IFELSE( |
| 5689 |
|
[AC_LANG_PROGRAM( |
| 5690 |
|
[[#include <ft2build.h>]], [])], |
| 5691 |
|
[ncbi_cv_lib_freetype_fix_include=no], |
| 5692 |
|
[ncbi_cv_lib_freetype_fix_include=yes])]) |
| 5693 |
|
if test "$ncbi_cv_lib_freetype_fix_include" = yes; then |
| 5694 |
|
FREETYPE_INCLUDE=`echo "$FREETYPE_INCLUDE" |\ |
| 5695 |
|
sed -e 's:\(-I[[^ ]]*\)\(/freetype2\):\1 \1\2:g'` |
| 5696 |
|
fi |
| 5697 |
|
AC_CACHE_CHECK([whether FreeType works], ncbi_cv_lib_freetype, |
| 5698 |
|
[CPPFLAGS="$FREETYPE_INCLUDE $orig_CPPFLAGS" |
| 5699 |
|
LIBS="$FREETYPE_LIBS $orig_LIBS" |
| 5700 |
|
AC_LINK_IFELSE( |
| 5701 |
|
[AC_LANG_PROGRAM( |
| 5702 |
|
[[#include <ft2build.h> |
| 5703 |
|
#include FT_FREETYPE_H]], |
| 5704 |
|
[[FT_Select_Charmap(NULL, ft_encoding_unicode);]])], |
| 5705 |
|
[ncbi_cv_lib_freetype=yes], [ncbi_cv_lib_freetype=no])]) |
| 5706 |
|
if test "$ncbi_cv_lib_freetype" = no; then |
| 5707 |
|
NCBI_MISSING_PACKAGE(freetype) |
| 5708 |
|
fi |
| 5709 |
|
else |
| 5710 |
|
NCBI_MISSING_PACKAGE(freetype) |
| 5711 |
|
fi |
| 5712 |
|
fi |
| 5713 |
|
if test "$with_freetype" = "no" ; then |
| 5714 |
|
FREETYPE_PATH="No_FREETYPE" |
| 5715 |
|
FREETYPE_INCLUDE= |
| 5716 |
|
FREETYPE_LIBS= |
| 5717 |
|
else |
| 5718 |
|
NCBI_PACKAGE(FreeType) |
| 5719 |
|
AC_DEFINE(HAVE_FREETYPE, 1, [Define to 1 if FreeType is available.]) |
| 5720 |
|
fi |
| 5721 |
|
|
| 5722 |
|
|
| 5723 |
### Restore original compiler/linker flags |
### Restore original compiler/linker flags |
| 5724 |
LIBS="$orig_LIBS" |
LIBS="$orig_LIBS" |
| 5734 |
|
|
| 5735 |
local_lbsm="ncbi_lbsm ncbi_lbsm_ipc ncbi_lbsmd" |
local_lbsm="ncbi_lbsm ncbi_lbsm_ipc ncbi_lbsmd" |
| 5736 |
|
|
| 5737 |
# The IPC stuff doesn't build on Cygwin or Darwin. |
## requires semaphores (lacking on older versions of Cygwin and Darwin) |
| 5738 |
case "$host_os" in |
if test $ncbi_cv_sys_semaphores = no; then |
| 5739 |
cygwin* | darwin* ) with_local_lbsm="no" ;; |
NCBI_MISSING_PACKAGE(local-lbsm) |
| 5740 |
esac |
fi |
| 5741 |
|
## disable by default even on newer Cygwin, as its semaphores don't |
| 5742 |
|
## actually work very well |
| 5743 |
|
test $OSTYPE = cygwin && : ${with_local_lbsm=no} |
| 5744 |
|
|
| 5745 |
for fff in $local_lbsm ; do |
for fff in $local_lbsm ; do |
| 5746 |
if test ! -f ${srcdir}/src/connect/${fff}.c ; then |
if test ! -f ${real_srcdir}/src/connect/${fff}.c ; then |
| 5747 |
if test "$with_local_lbsm" = "yes" ; then |
if test "$with_local_lbsm" = "yes" ; then |
| 5748 |
AC_MSG_ERROR(["--with-local-lbsm: src/connect/${fff}.c is missing"]) |
AC_MSG_ERROR([--with-local-lbsm: src/connect/${fff}.c is missing]) |
| 5749 |
fi |
fi |
| 5750 |
with_local_lbsm="no" |
with_local_lbsm="no" |
| 5751 |
break |
break |
| 5753 |
done |
done |
| 5754 |
|
|
| 5755 |
if test "$with_local_lbsm" = "no" ; then |
if test "$with_local_lbsm" = "no" ; then |
|
WithoutProjects="$WithoutProjects local_lbsm" |
|
| 5756 |
local_lbsm="ncbi_lbsmd_stub" |
local_lbsm="ncbi_lbsmd_stub" |
| 5757 |
else |
else |
| 5758 |
WithProjects="$WithProjects local_lbsm" |
NCBI_PROJECT(local_lbsm) |
| 5759 |
|
AC_DEFINE(HAVE_LOCAL_LBSM, 1, |
| 5760 |
|
[Define to 1 if local LBSM support is available.]) |
| 5761 |
fi |
fi |
| 5762 |
|
|
| 5763 |
|
|
| 5764 |
## daemons under 'connect' don't build on Darwin (MacOS X) |
## `connext' support |
|
case "$host_os" in |
|
|
darwin* ) daemons= ;; |
|
|
*) daemons="daemons" ;; |
|
|
esac |
|
|
|
|
| 5765 |
|
|
| 5766 |
## `serial' projects |
connext="ncbi_dblb ncbi_ifconf ncbi_localnet" |
| 5767 |
|
|
| 5768 |
if test "$with_serial" = "no" ; then |
for fff in $connext ; do |
| 5769 |
NoConfProjects="$NoConfProjects serial" |
if test ! -f ${real_srcdir}/src/connect/ext/${fff}.c ; then |
| 5770 |
|
if test "$with_connext" = "yes" ; then |
| 5771 |
|
AC_MSG_ERROR([--with-connext: src/connect/ext/${fff}.c is missing]) |
| 5772 |
|
fi |
| 5773 |
|
with_connext="no" |
| 5774 |
|
break |
| 5775 |
fi |
fi |
| 5776 |
|
done |
| 5777 |
|
|
| 5778 |
if test ! -f ${srcdir}/src/serial/Makefile.in -o \ |
if test "$with_connext" = "no"; then |
| 5779 |
! -d ${srcdir}/include/serial ; then |
if test "$with_ncbi_crypt" = "yes" ; then |
| 5780 |
if test "$with_serial" = "yes" ; then |
AC_MSG_ERROR([--with-ncbi-crypt specified, but CONNECT extensions are unavailable]) |
|
AC_MSG_ERROR(["--with-serial: SERIAL sources are missing"]) |
|
| 5781 |
fi |
fi |
| 5782 |
with_serial="no" |
with_ncbi_crypt=no |
| 5783 |
fi |
fi |
| 5784 |
|
|
| 5785 |
if test "$with_serial" = "no" ; then |
if test "$with_connext" = "no" ; then |
| 5786 |
WithoutProjects="$WithoutProjects serial" |
CONNEXT= |
| 5787 |
serial= |
XCONNEXT= |
| 5788 |
else |
else |
| 5789 |
WithProjects="$WithProjects serial" |
NCBI_PROJECT(connext) |
| 5790 |
serial="serial" |
CONNEXT=connext |
| 5791 |
|
XCONNEXT=xconnext |
| 5792 |
|
AC_DEFINE(HAVE_LIBCONNEXT, 1, |
| 5793 |
|
[Define to 1 if non-public CONNECT extensions are available.]) |
| 5794 |
fi |
fi |
| 5795 |
|
|
| 5796 |
|
|
| 5797 |
## `objects' projects |
## `ncbi_crypt' support |
| 5798 |
|
|
| 5799 |
if test "$with_objects" = "no" ; then |
ncbi_crypt="ncbi_crypt" |
| 5800 |
NoConfProjects="$NoConfProjects objects" |
|
| 5801 |
|
for fff in $ncbi_crypt ; do |
| 5802 |
|
if test ! -f ${real_srcdir}/src/connect/ext/${fff}.c ; then |
| 5803 |
|
if test "$with_ncbi_crypt" = "yes" ; then |
| 5804 |
|
AC_MSG_ERROR([--with-ncbi-crypt: src/connect/ext/${fff}.c is missing]) |
| 5805 |
fi |
fi |
| 5806 |
|
with_ncbi_crypt="no" |
| 5807 |
|
break |
| 5808 |
|
fi |
| 5809 |
|
done |
| 5810 |
|
|
| 5811 |
if test ! -f ${srcdir}/src/objects/Makefile.in -o \ |
if test "$with_ncbi_crypt" = "no" ; then |
| 5812 |
! -d ${srcdir}/include/objects ; then |
ncbi_crypt="ncbi_crypt_stub" |
| 5813 |
if test "$with_objects" = "yes" ; then |
else |
| 5814 |
AC_MSG_ERROR(["--with-objects: OBJECTS sources are missing"]) |
NCBI_PROJECT(ncbi_crypt) |
| 5815 |
|
AC_DEFINE(HAVE_NCBI_CRYPT, 1, |
| 5816 |
|
[Define to 1 if the real version of ncbi_crypt support is available.]) |
| 5817 |
fi |
fi |
| 5818 |
with_objects="no" |
|
| 5819 |
|
|
| 5820 |
|
## `serial' projects |
| 5821 |
|
|
| 5822 |
|
if test "$with_serial" = "no" ; then |
| 5823 |
|
serial= |
| 5824 |
|
else |
| 5825 |
|
NCBI_PROJECT(serial) |
| 5826 |
|
serial="serial" |
| 5827 |
fi |
fi |
| 5828 |
|
|
| 5829 |
|
|
| 5830 |
|
## `objects' projects |
| 5831 |
|
|
| 5832 |
if test "$with_objects" = "no" -o -z "$serial" ; then |
if test "$with_objects" = "no" -o -z "$serial" ; then |
|
WithoutProjects="$WithoutProjects objects" |
|
| 5833 |
objects= |
objects= |
| 5834 |
else |
else |
| 5835 |
WithProjects="$WithProjects objects" |
NCBI_PROJECT(objects) |
| 5836 |
objects="objects" |
objects="objects" |
| 5837 |
fi |
fi |
| 5838 |
|
|
| 5839 |
|
|
| 5840 |
## `bdb' projects |
## `bdb' projects |
| 5841 |
|
|
| 5842 |
|
dnl NCBI_CHECK_SUBTREE(bdb) |
| 5843 |
if test "$with_bdb" = "no" ; then |
if test "$with_bdb" = "no" ; then |
| 5844 |
NoConfProjects="$NoConfProjects bdb" |
NoConfProjects="$NoConfProjects bdb" |
| 5845 |
fi |
fi |
| 5846 |
|
|
| 5847 |
if test ! -f ${srcdir}/src/bdb/Makefile.in -o ! -d ${srcdir}/include/bdb |
if test ! -f ${real_srcdir}/src/db/bdb/Makefile.in -o \ |
| 5848 |
then |
! -d ${real_srcdir}/include/db/bdb ; then |
| 5849 |
if test "$with_bdb" = "yes" ; then |
if test "${with_bdb-no}" != "no" ; then |
| 5850 |
AC_MSG_ERROR(["--with-bdb: BDB sources are missing"]) |
AC_MSG_ERROR([--with-]bdb[: ]BDB[ sources are missing]) |
| 5851 |
fi |
fi |
| 5852 |
with_bdb="no" |
with_bdb="no" |
| 5853 |
fi |
fi |
| 5854 |
|
|
| 5855 |
|
|
| 5856 |
if test "$with_bdb" = "no" ; then |
if test "$with_bdb" = "no" ; then |
|
WithoutProjects="$WithoutProjects bdb" |
|
| 5857 |
bdb= |
bdb= |
| 5858 |
|
BDB_LIB= |
| 5859 |
|
BDB_CACHE_LIB= |
| 5860 |
else |
else |
| 5861 |
WithProjects="$WithProjects bdb" |
NCBI_PROJECT(bdb) |
| 5862 |
bdb="bdb" |
bdb="bdb" |
| 5863 |
|
BDB_LIB="bdb" |
| 5864 |
|
AC_DEFINE(HAVE_BDB, 1, |
| 5865 |
|
[Define to 1 if NCBI C++ API for BerkeleyDB is available.]) |
| 5866 |
|
bdb_cache="ncbi_xcache_bdb" |
| 5867 |
|
BDB_CACHE_LIB="ncbi_xcache_bdb" |
| 5868 |
|
AC_DEFINE(HAVE_BDB_CACHE, 1, |
| 5869 |
|
[Define to 1 if NCBI C++ API for BerkeleyDB based data cache is available.]) |
| 5870 |
fi |
fi |
| 5871 |
|
|
| 5872 |
|
|
| 5873 |
## `dbapi' projects |
## `dbapi' projects |
| 5874 |
|
|
| 5875 |
|
DBAPI_CTLIB= |
| 5876 |
|
DBAPI_DBLIB= |
| 5877 |
|
DBAPI_MYSQL= |
| 5878 |
|
DBAPI_ODBC= |
| 5879 |
if test "$with_dbapi" = "no" ; then |
if test "$with_dbapi" = "no" ; then |
|
NoConfProjects="$NoConfProjects dbapi" |
|
|
fi |
|
|
|
|
|
if test ! -f ${srcdir}/src/dbapi/Makefile.in -o \ |
|
|
! -d ${srcdir}/include/dbapi ; then |
|
|
if test "$with_dbapi" = "yes" ; then |
|
|
AC_MSG_ERROR(["--with-dbapi: DBAPI sources are missing"]) |
|
|
fi |
|
|
with_dbapi="no" |
|
|
fi |
|
|
|
|
|
if test "$with_dbapi" = "no" ; then |
|
|
WithoutProjects="$WithoutProjects dbapi" |
|
| 5880 |
dbapi= |
dbapi= |
| 5881 |
else |
else |
| 5882 |
WithProjects="$WithProjects dbapi" |
NCBI_PROJECT(dbapi) |
| 5883 |
dbapi="dbapi" |
dbapi="dbapi" |
| 5884 |
|
test -n "$SYBASE_LIBS" && DBAPI_CTLIB=ncbi_xdbapi_ctlib |
| 5885 |
|
test -n "$SYBASE_DBLIBS" && DBAPI_DBLIB=ncbi_xdbapi_dblib |
| 5886 |
|
test -n "$MYSQL_LIBS" && DBAPI_MYSQL=ncbi_xdbapi_mysql |
| 5887 |
|
test -n "$ODBC_LIBS" && DBAPI_ODBC=ncbi_xdbapi_odbc |
| 5888 |
fi |
fi |
| 5889 |
|
|
| 5890 |
|
|
| 5891 |
## `app' projects |
## `app' projects |
| 5892 |
|
|
| 5893 |
if test "$with_app" = "no" ; then |
if test "$with_app" = "no" ; then |
|
NoConfProjects="$NoConfProjects app" |
|
|
fi |
|
|
|
|
|
if test ! -f ${srcdir}/src/app/Makefile.in -o \ |
|
|
! -d ${srcdir}/include/app ; then |
|
|
if test "$with_app" = "yes" ; then |
|
|
AC_MSG_ERROR(["--with-app: APP sources are missing"]) |
|
|
fi |
|
|
with_app="no" |
|
|
fi |
|
|
|
|
|
if test "$with_app" = "no" ; then |
|
|
WithoutProjects="$WithoutProjects app" |
|
| 5894 |
app= |
app= |
| 5895 |
else |
else |
| 5896 |
WithProjects="$WithProjects app" |
NCBI_PROJECT(app) |
| 5897 |
app="app" |
app="app" |
| 5898 |
fi |
fi |
| 5899 |
|
|
| 5900 |
|
|
| 5901 |
## `ctools' project cluster |
## `ctools' project cluster |
| 5902 |
|
|
| 5903 |
if test "$with_ctools" = "no" ; then |
if test "$with_ctools" != "no" ; then |
| 5904 |
NoConfProjects="$NoConfProjects ctools" |
NCBI_PROJECT(ctools) |
|
fi |
|
|
|
|
|
if test ! -f ${srcdir}/src/ctools/Makefile.in -o \ |
|
|
! -d ${srcdir}/include/ctools -o "$with_ncbi_c" = "no" |
|
|
then |
|
|
if test "$with_ctools" = "yes" ; then |
|
|
if test "$with_ncbi_c" = "no" ; then |
|
|
AC_MSG_ERROR(["--with-ctools: NCBI C Toolkit is missing"]) |
|
|
else |
|
|
AC_MSG_ERROR(["--with-ctools: CTOOLS sources are missing"]) |
|
|
fi |
|
|
fi |
|
|
with_ctools="no" |
|
|
fi |
|
|
|
|
|
if test "$with_ctools" = "no" ; then |
|
|
WithoutProjects="$WithoutProjects ctools" |
|
|
else |
|
|
ctools="ctools" |
|
|
OPT_GROUPS="$OPT_GROUPS ctools" |
|
| 5905 |
fi |
fi |
| 5906 |
|
|
| 5907 |
|
|
| 5908 |
## `gui' projects |
## `gui' projects |
| 5909 |
|
|
| 5910 |
if test "$with_gui" = "no" ; then |
if test "$with_gui" = "no" ; then |
|
NoConfProjects="$NoConfProjects gui" |
|
|
fi |
|
|
|
|
|
if test ! -f ${srcdir}/src/gui/Makefile.in -o ! -d ${srcdir}/include/gui \ |
|
|
-o "$with_fltk" = "no" |
|
|
then |
|
|
if test "$with_gui" = "yes" ; then |
|
|
if test "$with_fltk" = "no" ; then |
|
|
AC_MSG_ERROR(["--with-gui: FLTK package is missing"]) |
|
|
else |
|
|
AC_MSG_ERROR(["--with-gui: GUI sources are missing"]) |
|
|
fi |
|
|
fi |
|
|
with_gui="no" |
|
|
fi |
|
|
|
|
|
if test "$with_gui" = "no" ; then |
|
|
WithoutProjects="$WithoutProjects gui" |
|
| 5911 |
gui= |
gui= |
| 5912 |
else |
else |
| 5913 |
WithProjects="$WithProjects gui" |
NCBI_PROJECT(gui) |
| 5914 |
gui="gui" |
gui="gui" |
| 5915 |
fi |
fi |
| 5916 |
|
|
| 5918 |
## `algo' projects |
## `algo' projects |
| 5919 |
|
|
| 5920 |
if test "$with_algo" = "no" ; then |
if test "$with_algo" = "no" ; then |
|
NoConfProjects="$NoConfProjects algo" |
|
|
fi |
|
|
|
|
|
if test ! -f ${srcdir}/src/algo/Makefile.in -o ! -d ${srcdir}/include/algo |
|
|
then |
|
|
if test "$with_algo" = "yes" ; then |
|
|
AC_MSG_ERROR(["--with-algo: ALGO sources are missing"]) |
|
|
fi |
|
|
with_algo="no" |
|
|
fi |
|
|
|
|
|
if test "$with_algo" = "no" ; then |
|
|
WithoutProjects="$WithoutProjects algo" |
|
| 5921 |
algo= |
algo= |
| 5922 |
else |
else |
| 5923 |
WithProjects="$WithProjects algo" |
NCBI_PROJECT(algo) |
| 5924 |
algo="algo" |
algo="algo" |
| 5925 |
fi |
fi |
| 5926 |
|
|
| 5927 |
|
|
| 5928 |
## `internal' project cluster |
## `internal' project cluster |
| 5929 |
|
|
| 5930 |
if test "$with_internal" = "no" -o ! -f ${srcdir}/src/internal/Makefile.in \ |
if test "$with_internal" = "no" \ |
| 5931 |
-o ! -d ${srcdir}/include/internal; then |
-o ! -f "${real_srcdir}/src/internal/Makefile.in"; then |
| 5932 |
NoConfProjects="$NoConfProjects internal" |
NoConfProjects="$NoConfProjects internal" |
| 5933 |
internal= |
internal= |
| 5934 |
else |
else |
| 5935 |
reason="" |
reason="" |
| 5936 |
sep= |
sep= |
| 5937 |
|
if test ! -d "${real_srcdir}/include/internal"; then |
| 5938 |
|
reason="$reason${sep}headers" |
| 5939 |
|
sep=", " |
| 5940 |
|
fi |
| 5941 |
if test "$with_sybase" = "no"; then |
if test "$with_sybase" = "no"; then |
| 5942 |
reason="$reason${sep}Sybase" |
reason="$reason${sep}Sybase" |
| 5943 |
sep=", " |
sep=", " |
| 5950 |
reason="$reason${sep}SSS" |
reason="$reason${sep}SSS" |
| 5951 |
sep=", " |
sep=", " |
| 5952 |
fi |
fi |
|
if test "$with_pubmed" = "no"; then |
|
|
reason="$reason${sep}PubMed" |
|
|
sep=", " |
|
|
fi |
|
| 5953 |
if test -n "$reason" -a "$with_internal" = "yes"; then |
if test -n "$reason" -a "$with_internal" = "yes"; then |
| 5954 |
if test -z "$with_projects" -o "$with_projects" = "no"; then |
if test -z "$with_projects" -o "$with_projects" = "no"; then |
| 5955 |
AC_MSG_ERROR(["--with-internal: Cannot build INTERNAL projects: missing $reason"]) |
AC_MSG_ERROR([--with-internal: Cannot build INTERNAL projects: missing $reason]) |
| 5956 |
else |
else |
| 5957 |
AC_MSG_WARN(["--with-internal: Cannot build all INTERNAL projects: missing $reason"]) |
AC_MSG_WARN([--with-internal: Cannot build all INTERNAL projects: missing $reason]) |
| 5958 |
OPT_GROUPS="$OPT_GROUPS internal" |
OPT_GROUPS="$OPT_GROUPS internal" |
| 5959 |
internal="internal" |
internal="internal" |
| 5960 |
fi |
fi |
| 5967 |
fi |
fi |
| 5968 |
fi |
fi |
| 5969 |
|
|
| 5970 |
|
## Genome Workbench |
| 5971 |
|
|
| 5972 |
|
if test "$with_gbench" != "no" -a -d "$real_srcdir/src/gui/app/gbench"; then |
| 5973 |
|
reason="" |
| 5974 |
|
sep= |
| 5975 |
|
if test -d "$real_srcdir/src/gui/packages"; then |
| 5976 |
|
if test "$with_wxwidgets" = "no"; then |
| 5977 |
|
reason="$reason${sep}wxWidgets" |
| 5978 |
|
sep=", " |
| 5979 |
|
fi |
| 5980 |
|
elif test -d "$real_srcdir/src/gui/plugins"; then |
| 5981 |
|
if test "$with_fltk" = "no"; then |
| 5982 |
|
reason="$reason${sep}FLTK" |
| 5983 |
|
sep=", " |
| 5984 |
|
fi |
| 5985 |
|
else |
| 5986 |
|
reason="$reason${sep}plugins or packages" |
| 5987 |
|
sep=", " |
| 5988 |
|
fi |
| 5989 |
|
if test "$with_opengl" = "no"; then |
| 5990 |
|
reason="$reason${sep}OpenGL" |
| 5991 |
|
sep=", " |
| 5992 |
|
fi |
| 5993 |
|
if test "$with_bdb" = "no"; then |
| 5994 |
|
reason="$reason${sep}Berkeley DB 4.3" |
| 5995 |
|
sep=", " |
| 5996 |
|
fi |
| 5997 |
|
if test "$with_mt" = "no"; then |
| 5998 |
|
reason="$reason${sep}multithreading" |
| 5999 |
|
sep=", " |
| 6000 |
|
fi |
| 6001 |
|
if test "$with_dll" != "yes"; then |
| 6002 |
|
reason="$reason${sep}full-DLL setup" |
| 6003 |
|
sep=", " |
| 6004 |
|
fi |
| 6005 |
|
# Anything else? |
| 6006 |
|
if test -n "$reason" -a "$with_gbench" = "yes"; then |
| 6007 |
|
AC_MSG_ERROR([--with-gbench: Cannot build Genome Workbench: missing $reason]) |
| 6008 |
|
elif test -z "$reason"; then |
| 6009 |
|
NCBI_PROJECT(gbench) |
| 6010 |
|
fi |
| 6011 |
|
fi |
| 6012 |
|
|
| 6013 |
|
|
| 6014 |
|
|
| 6015 |
### Miscellanea |
### Miscellanea |
| 6034 |
ask) IF_REBUILDING_CONDITIONALLY="" ;; |
ask) IF_REBUILDING_CONDITIONALLY="" ;; |
| 6035 |
esac |
esac |
| 6036 |
|
|
| 6037 |
case "$with_projects" in |
case "$with_deactivation" in |
| 6038 |
"") if test -r projects; then |
no) IF_DEACTIVATING="#" ;; |
| 6039 |
AC_MSG_NOTICE([using default projects file "projects".]) |
* ) IF_DEACTIVATING="" ;; |
|
with_projects=projects |
|
|
AC_SUBST(PROJECTS, "\$(top_srcdir)/projects") |
|
|
else |
|
|
AC_SUBST(PROJECTS, "") |
|
|
if test -f projects; then |
|
|
AC_MSG_WARN([default projects file "projects" is unreadable.]) |
|
|
elif test -h projects; then |
|
|
AC_MSG_WARN([default projects file "projects" is a dangling link.]) |
|
|
fi |
|
|
fi |
|
|
;; |
|
|
no) with_projects="" ; AC_SUBST(PROJECTS, "") ;; |
|
|
/*) AC_SUBST(PROJECTS, $with_projects) ;; |
|
|
* ) AC_SUBST(PROJECTS, "\$(top_srcdir)/$with_projects") ;; |
|
| 6040 |
esac |
esac |
| 6041 |
|
|
| 6042 |
|
case "$with_makefile_auto_update" in |
| 6043 |
|
no) configurables_mfname=configurables.null ;; |
| 6044 |
|
* ) configurables_mfname=configurables ;; |
| 6045 |
|
esac |
| 6046 |
|
|
| 6047 |
# Run the test suite after the build? |
# Run the test suite after the build? |
| 6048 |
|
|
| 6051 |
if test "$with_check" != "yes" ; then |
if test "$with_check" != "yes" ; then |
| 6052 |
CHECK_ARG=`echo "$with_check" | sed 's/%/ /g'` |
CHECK_ARG=`echo "$with_check" | sed 's/%/ /g'` |
| 6053 |
fi |
fi |
| 6054 |
WithFeatures="$WithFeatures check" |
NCBI_FEATURE(check) |
| 6055 |
fi |
fi |
| 6056 |
|
CHECK_TOOLS=$with_check_tools |
| 6057 |
|
|
| 6058 |
|
### Compute Without{Features,Packages,Projects}. Takes quadratic time, |
| 6059 |
|
### but that's life. |
| 6060 |
|
m4_foreach(CATEGORY, [Features,Packages,Projects], |
| 6061 |
|
[for x in m4_indir([NCBI_ALL_]CATEGORY); do |
| 6062 |
|
case " [$With]CATEGORY " in |
| 6063 |
|
*" $x "*) ;; |
| 6064 |
|
*) [Without]CATEGORY="[$Without]CATEGORY[$Without]CATEGORY[Sep$x]" |
| 6065 |
|
[Without]CATEGORY[Sep]=" " |
| 6066 |
|
;; |
| 6067 |
|
esac |
| 6068 |
|
done |
| 6069 |
|
]) |
| 6070 |
|
|
| 6071 |
### Cleanup |
### Cleanup |
| 6072 |
### --------------------------------- |
### --------------------------------- |
| 6104 |
case "$CXXCPP" in compilers/*) CXXCPP="\$(top_srcdir)/$CXXCPP" ;; esac |
case "$CXXCPP" in compilers/*) CXXCPP="\$(top_srcdir)/$CXXCPP" ;; esac |
| 6105 |
case "$AR" in compilers/*) AR="\$(top_srcdir)/$AR" ;; esac |
case "$AR" in compilers/*) AR="\$(top_srcdir)/$AR" ;; esac |
| 6106 |
|
|
| 6107 |
### Get Insure++ to honor the top-level .psrc file |
### Get Insure++ to honor the Toolkit's psrc file |
| 6108 |
case "$CC" in |
case "$CC" in |
| 6109 |
*/insure*) |
*/insure*) |
| 6110 |
CC="$CC -Zop \$(top_srcdir)/.psrc -D__INSURE__" |
CC="$CC -Zop \$(top_srcdir)/compilers/unix/psrc -D__INSURE__" |
| 6111 |
CXX="$CXX -Zop \$(top_srcdir)/.psrc -D__INSURE__" |
CXX="$CXX -Zop \$(top_srcdir)/compilers/unix/psrc -D__INSURE__" |
| 6112 |
CXXCPP="$CXXCPP -Zop \$(top_srcdir)/.psrc -D__INSURE__" |
CXXCPP="$CXXCPP -Zop \$(top_srcdir)/compilers/unix/psrc -D__INSURE__" |
| 6113 |
LINK_DLL=`echo "$LINK_DLL" | sed -e 's:insure:& -Zop \$(top_srcdir)/.psrc:'` |
LINK_DLL=`echo "$LINK_DLL" | sed -e 's:insure:& -Zop \$(top_srcdir)/compilers/unix/psrc:'` |
| 6114 |
;; |
;; |
| 6115 |
esac |
esac |
| 6116 |
|
|
| 6121 |
### Compose their target counterparts |
### Compose their target counterparts |
| 6122 |
### Configure |
### Configure |
| 6123 |
|
|
| 6124 |
AC_MSG_NOTICE([looking for configurables below $srcdir...]) |
AC_MSG_NOTICE([looking for configurables below $real_srcdir...]) |
| 6125 |
excl_file="`pwd`/config.tmp.$$" |
tmp_sed="`pwd`/config.tmp.$$" |
| 6126 |
changequote(<<, >>)dnl |
for x in $NoConfProjects dll; do |
| 6127 |
echo "NoConfProjects $NoConfProjects" | sed 's% \([^ ][^ ]*\)%\ |
echo "/^\\.\\/$x/d" |
| 6128 |
^\\./\1/%g' > $excl_file |
done > $tmp_sed |
| 6129 |
changequote([, ])dnl |
cat >>$tmp_sed <<EOF |
| 6130 |
configurables=`cd "${srcdir}/src" && find . -name '*.in' -print | $EGREP -v -f $excl_file | sed "s%\.\(.*\)\.in%$builddir\1:\./src\1\.in%g"` |
s%^.\\(/build-system.*/Makefile*\\)\\.in\$%$builddir\\1:./src\\1\\.in% |
| 6131 |
rm $excl_file |
s%^.\\(/build-system\\)\\(/.*\\)\\.in\$%$builddir\\2:./src\\1\\2\\.in% |
| 6132 |
|
s%^.\\(/[[^:]]*\\)\\.in\$%$builddir\\1:./src\\1\\.in% |
| 6133 |
|
EOF |
| 6134 |
|
cat $tmp_sed >&AS_MESSAGE_LOG_FD |
| 6135 |
|
configurables=`cd "${real_srcdir}/src" && find . -name '.svn' -prune -o -name '*.in' -print | sed -f $tmp_sed` |
| 6136 |
|
rm $tmp_sed |
| 6137 |
|
|
| 6138 |
if test -z "$configurables" ; then |
if test -z "$configurables" ; then |
| 6139 |
AC_MSG_ERROR([cannot find any configurables below "${srcdir}"!]) |
AC_MSG_ERROR([cannot find any configurables below "${real_srcdir}"!]) |
| 6140 |
else |
else |
| 6141 |
AC_MSG_NOTICE([...done]) |
AC_MSG_NOTICE([...done]) |
| 6142 |
fi |
fi |
| 6151 |
|
|
| 6152 |
AC_SUBST(top_srcdir) |
AC_SUBST(top_srcdir) |
| 6153 |
AC_SUBST(srcdir) |
AC_SUBST(srcdir) |
| 6154 |
|
#AC_SUBST(real_srcdir) |
| 6155 |
AC_SUBST(includedir) |
AC_SUBST(includedir) |
| 6156 |
AC_SUBST(status_dir) |
AC_SUBST(status_dir) |
| 6157 |
AC_SUBST(builddir) |
AC_SUBST(builddir) |
| 6166 |
AC_SUBST(STRIP) |
AC_SUBST(STRIP) |
| 6167 |
AC_SUBST(LINK) |
AC_SUBST(LINK) |
| 6168 |
AC_SUBST(C_LINK) |
AC_SUBST(C_LINK) |
| 6169 |
|
AC_SUBST(TAIL_N) |
| 6170 |
|
AC_SUBST(EGREP_Q) |
| 6171 |
|
|
| 6172 |
AC_SUBST(CFLAGS) |
AC_SUBST(CFLAGS) |
| 6173 |
AC_SUBST(FAST_CFLAGS) |
AC_SUBST(FAST_CFLAGS) |
| 6178 |
AC_SUBST(DEPFLAGS_POST) |
AC_SUBST(DEPFLAGS_POST) |
| 6179 |
AC_SUBST(LDFLAGS) |
AC_SUBST(LDFLAGS) |
| 6180 |
AC_SUBST(FAST_LDFLAGS) |
AC_SUBST(FAST_LDFLAGS) |
| 6181 |
|
AC_SUBST(APP_LDFLAGS) |
| 6182 |
|
AC_SUBST(DLL_LDFLAGS) |
| 6183 |
AC_SUBST(LIBS) |
AC_SUBST(LIBS) |
| 6184 |
AC_SUBST(C_LIBS) |
AC_SUBST(C_LIBS) |
| 6185 |
|
AC_SUBST(GCCPCH) |
| 6186 |
|
AC_SUBST(RUNPATH_ORIGIN) |
| 6187 |
|
|
| 6188 |
AC_SUBST(D_SFX) |
AC_SUBST(D_SFX) |
| 6189 |
AC_SUBST(DEBUG_SFX) |
AC_SUBST(DEBUG_SFX) |
| 6190 |
|
|
| 6191 |
AC_SUBST(LIB_OR_DLL) |
AC_SUBST(LIB_OR_DLL) |
| 6192 |
AC_SUBST(FORCE_STATIC_LIB) |
AC_SUBST(FORCE_STATIC_LIB) |
| 6193 |
|
AC_SUBST(APP_LIB_SETTING) |
| 6194 |
|
AC_SUBST(APP_LIBS_SETTING) |
| 6195 |
AC_SUBST(LINK_DLL) |
AC_SUBST(LINK_DLL) |
| 6196 |
AC_SUBST(has_dll_loadable) |
AC_SUBST(has_dll_loadable) |
| 6197 |
AC_SUBST(LINK_LOADABLE) |
AC_SUBST(LINK_LOADABLE) |
| 6198 |
AC_SUBST(CFLAGS_DLL) |
AC_SUBST(CFLAGS_DLL) |
| 6199 |
AC_SUBST(CXXFLAGS_DLL) |
AC_SUBST(CXXFLAGS_DLL) |
| 6200 |
|
AC_SUBST(ALLOW_UNDEF) |
| 6201 |
|
AC_SUBST(FORBID_UNDEF) |
| 6202 |
|
|
| 6203 |
AC_SUBST(OPT_GROUPS) |
AC_SUBST(OPT_GROUPS) |
| 6204 |
AC_SUBST(local_lbsm) |
AC_SUBST(local_lbsm) |
| 6205 |
AC_SUBST(daemons) |
AC_SUBST(ncbi_crypt) |
| 6206 |
|
AC_SUBST(CONNEXT) |
| 6207 |
|
AC_SUBST(XCONNEXT) |
| 6208 |
AC_SUBST(serial) |
AC_SUBST(serial) |
| 6209 |
AC_SUBST(bdb) |
AC_SUBST(bdb) |
| 6210 |
AC_SUBST(dbapi) |
AC_SUBST(dbapi) |
| 6211 |
AC_SUBST(objects) |
AC_SUBST(objects) |
|
AC_SUBST(ctools) |
|
| 6212 |
AC_SUBST(gui) |
AC_SUBST(gui) |
| 6213 |
AC_SUBST(algo) |
AC_SUBST(algo) |
| 6214 |
AC_SUBST(app) |
AC_SUBST(app) |
| 6216 |
|
|
| 6217 |
AC_SUBST(check) |
AC_SUBST(check) |
| 6218 |
AC_SUBST(CHECK_ARG) |
AC_SUBST(CHECK_ARG) |
| 6219 |
|
AC_SUBST(CHECK_TOOLS) |
| 6220 |
|
|
| 6221 |
AC_SUBST(script_shell) |
AC_SUBST(script_shell) |
| 6222 |
AC_SUBST(make_shell) |
AC_SUBST(make_shell) |
| 6235 |
AC_SUBST(f_runpath) |
AC_SUBST(f_runpath) |
| 6236 |
AC_SUBST(f_outexe) |
AC_SUBST(f_outexe) |
| 6237 |
|
|
| 6238 |
|
AC_SUBST(BDB_LIB) |
| 6239 |
|
AC_SUBST(BDB_CACHE_LIB) |
| 6240 |
|
AC_SUBST(DBAPI_CTLIB) |
| 6241 |
|
AC_SUBST(DBAPI_DBLIB) |
| 6242 |
|
AC_SUBST(DBAPI_MYSQL) |
| 6243 |
|
AC_SUBST(DBAPI_ODBC) |
| 6244 |
|
|
| 6245 |
AC_SUBST(THREAD_LIBS) |
AC_SUBST(THREAD_LIBS) |
| 6246 |
|
AC_SUBST(NCBIATOMIC_LIB) |
| 6247 |
AC_SUBST(NETWORK_LIBS) |
AC_SUBST(NETWORK_LIBS) |
| 6248 |
AC_SUBST(NETWORK_PURE_LIBS) |
AC_SUBST(NETWORK_PURE_LIBS) |
| 6249 |
AC_SUBST(RESOLVER_LIBS) |
AC_SUBST(RESOLVER_LIBS) |
| 6253 |
AC_SUBST(CRYPT_LIBS) |
AC_SUBST(CRYPT_LIBS) |
| 6254 |
AC_SUBST(DL_LIBS) |
AC_SUBST(DL_LIBS) |
| 6255 |
AC_SUBST(RT_LIBS) |
AC_SUBST(RT_LIBS) |
| 6256 |
|
AC_SUBST(UUID_LIBS) |
| 6257 |
|
AC_SUBST(DEMANGLE_LIBS) |
| 6258 |
AC_SUBST(ICONV_LIBS) |
AC_SUBST(ICONV_LIBS) |
| 6259 |
|
AC_SUBST(Z_LIB) |
| 6260 |
|
AC_SUBST(BZ2_LIB) |
| 6261 |
|
AC_SUBST(PCREPOSIX_LIBS) |
| 6262 |
|
AC_SUBST(PCRE_LIB) |
| 6263 |
|
AC_SUBST(OPENSSL_STATIC_LIBS) |
| 6264 |
|
AC_SUBST(TLS_INCLUDE) |
| 6265 |
|
AC_SUBST(TLS_LIBS) |
| 6266 |
AC_SUBST(SYBASE_PATH) |
AC_SUBST(SYBASE_PATH) |
| 6267 |
|
AC_SUBST(SYBASE_LCL_PATH) |
| 6268 |
AC_SUBST(SYBASE_INCLUDE) |
AC_SUBST(SYBASE_INCLUDE) |
| 6269 |
AC_SUBST(SYBASE_LIBS) |
AC_SUBST(SYBASE_LIBS) |
| 6270 |
AC_SUBST(SYBASE_DLLS) |
AC_SUBST(SYBASE_DLLS) |
| 6272 |
AC_SUBST(MYSQL_INCLUDE) |
AC_SUBST(MYSQL_INCLUDE) |
| 6273 |
AC_SUBST(MYSQL_LIBS) |
AC_SUBST(MYSQL_LIBS) |
| 6274 |
AC_SUBST(BERKELEYDB_INCLUDE) |
AC_SUBST(BERKELEYDB_INCLUDE) |
|
AC_SUBST(BERKELEYDB_STATIC_LIBS) |
|
| 6275 |
AC_SUBST(BERKELEYDB_LIBS) |
AC_SUBST(BERKELEYDB_LIBS) |
| 6276 |
|
AC_SUBST(BERKELEYDB_STATIC_LIBS) |
| 6277 |
|
AC_SUBST(BERKELEYDB_CXX_LIBS) |
| 6278 |
|
AC_SUBST(BERKELEYDB_CXX_STATIC_LIBS) |
| 6279 |
AC_SUBST(ODBC_INCLUDE) |
AC_SUBST(ODBC_INCLUDE) |
| 6280 |
AC_SUBST(ODBC_LIBS) |
AC_SUBST(ODBC_LIBS) |
| 6281 |
|
AC_SUBST(CPPUNIT_INCLUDE) |
| 6282 |
|
AC_SUBST(CPPUNIT_LIBS) |
| 6283 |
|
AC_SUBST(BOOST_INCLUDE) |
| 6284 |
|
AC_SUBST(BOOST_LIBPATH) |
| 6285 |
|
AC_SUBST(BOOST_TAG) |
| 6286 |
|
AC_SUBST(BOOST_REGEX_LIBS) |
| 6287 |
|
AC_SUBST(BOOST_REGEX_STATIC_LIBS) |
| 6288 |
|
AC_SUBST(BOOST_TEST_PEM_LIBS) |
| 6289 |
|
AC_SUBST(BOOST_TEST_PEM_STATIC_LIBS) |
| 6290 |
|
AC_SUBST(BOOST_TEST_TEM_LIBS) |
| 6291 |
|
AC_SUBST(BOOST_TEST_TEM_STATIC_LIBS) |
| 6292 |
|
AC_SUBST(BOOST_TEST_UTF_LIBS) |
| 6293 |
|
AC_SUBST(BOOST_TEST_UTF_STATIC_LIBS) |
| 6294 |
|
AC_SUBST(BOOST_THREAD_LIBS) |
| 6295 |
|
AC_SUBST(BOOST_THREAD_STATIC_LIBS) |
| 6296 |
AC_SUBST(NCBI_C_INCLUDE) |
AC_SUBST(NCBI_C_INCLUDE) |
| 6297 |
AC_SUBST(NCBI_C_LIBPATH) |
AC_SUBST(NCBI_C_LIBPATH) |
| 6298 |
AC_SUBST(OPENGL_INCLUDE) |
AC_SUBST(OPENGL_INCLUDE) |
| 6299 |
AC_SUBST(OPENGL_LIBS) |
AC_SUBST(OPENGL_LIBS) |
| 6300 |
|
AC_SUBST(OPENGL_STATIC_LIBS) |
| 6301 |
AC_SUBST(OSMESA_INCLUDE) |
AC_SUBST(OSMESA_INCLUDE) |
| 6302 |
AC_SUBST(OSMESA_LIBS) |
AC_SUBST(OSMESA_LIBS) |
| 6303 |
|
AC_SUBST(OSMESA_STATIC_LIBS) |
| 6304 |
AC_SUBST(GLUT_INCLUDE) |
AC_SUBST(GLUT_INCLUDE) |
| 6305 |
AC_SUBST(GLUT_LIBS) |
AC_SUBST(GLUT_LIBS) |
| 6306 |
AC_SUBST(FLTK_INCLUDE) |
AC_SUBST(FLTK_INCLUDE) |
| 6307 |
AC_SUBST(FLTK_LIBS) |
AC_SUBST(FLTK_LIBS) |
| 6308 |
AC_SUBST(FLTK_LIBS_GL) |
AC_SUBST(FLTK_LIBS_GL) |
| 6309 |
|
AC_SUBST(FLTK_LIBS_IMAGES) |
| 6310 |
|
AC_SUBST(FLTK_LIBS_ALL) |
| 6311 |
|
AC_SUBST(FLTK_STATIC_LIBS) |
| 6312 |
|
AC_SUBST(FLTK_STATIC_LIBS_GL) |
| 6313 |
|
AC_SUBST(FLTK_STATIC_LIBS_IMAGES) |
| 6314 |
|
AC_SUBST(FLTK_STATIC_LIBS_ALL) |
| 6315 |
AC_SUBST(FLTK_CONFIG) |
AC_SUBST(FLTK_CONFIG) |
| 6316 |
AC_SUBST(WXWIN_INCLUDE) |
AC_SUBST(WXWIN_INCLUDE) |
| 6317 |
AC_SUBST(WXWIN_LIBS) |
AC_SUBST(WXWIN_LIBS) |
| 6318 |
|
AC_SUBST(WXWIN_STATIC_LIBS) |
| 6319 |
AC_SUBST(WXWIN_GL_LIBS) |
AC_SUBST(WXWIN_GL_LIBS) |
| 6320 |
|
AC_SUBST(WXWIN_GL_STATIC_LIBS) |
| 6321 |
|
AC_SUBST(WXWIN_POST_LINK) |
| 6322 |
|
AC_SUBST(WXWIDGETS_INCLUDE) |
| 6323 |
|
AC_SUBST(WXWIDGETS_LIBS) |
| 6324 |
|
AC_SUBST(WXWIDGETS_STATIC_LIBS) |
| 6325 |
|
AC_SUBST(WXWIDGETS_GL_LIBS) |
| 6326 |
|
AC_SUBST(WXWIDGETS_GL_STATIC_LIBS) |
| 6327 |
|
AC_SUBST(WXWIDGETS_POST_LINK) |
| 6328 |
AC_SUBST(FASTCGI_INCLUDE) |
AC_SUBST(FASTCGI_INCLUDE) |
| 6329 |
AC_SUBST(FASTCGI_LIBS) |
AC_SUBST(FASTCGI_LIBS) |
| 6330 |
AC_SUBST(FASTCGI_OBJS) |
AC_SUBST(FASTCGI_OBJS) |
| 6332 |
AC_SUBST(NCBI_SSS_LIBPATH) |
AC_SUBST(NCBI_SSS_LIBPATH) |
| 6333 |
AC_SUBST(LIBSSSUTILS) |
AC_SUBST(LIBSSSUTILS) |
| 6334 |
AC_SUBST(LIBSSSDB) |
AC_SUBST(LIBSSSDB) |
|
AC_SUBST(NCBI_GEO_INCLUDE) |
|
|
AC_SUBST(NCBI_GEO_LIBPATH) |
|
|
AC_SUBST(LIBGEODB) |
|
| 6335 |
AC_SUBST(SP_INCLUDE) |
AC_SUBST(SP_INCLUDE) |
| 6336 |
AC_SUBST(SP_LIBS) |
AC_SUBST(SP_LIBS) |
|
AC_SUBST(NCBI_PM_PATH) |
|
| 6337 |
AC_SUBST(ORBACUS_INCLUDE) |
AC_SUBST(ORBACUS_INCLUDE) |
| 6338 |
AC_SUBST(ORBACUS_LIBPATH) |
AC_SUBST(ORBACUS_LIBPATH) |
| 6339 |
AC_SUBST(LIBOB) |
AC_SUBST(LIBOB) |
| 6340 |
AC_SUBST(LIBIMR) |
AC_SUBST(LIBIMR) |
| 6341 |
|
AC_SUBST(ICU_CONFIG) |
| 6342 |
|
AC_SUBST(ICU_INCLUDE) |
| 6343 |
|
AC_SUBST(ICU_LIBS) |
| 6344 |
|
AC_SUBST(ICU_STATIC_LIBS) |
| 6345 |
|
AC_SUBST(EXPAT_STATIC_LIBS) |
| 6346 |
|
AC_SUBST(SABLOT_STATIC_LIBS) |
| 6347 |
|
AC_SUBST(LIBXML_STATIC_LIBS) |
| 6348 |
|
AC_SUBST(LIBXSLT_STATIC_LIBS) |
| 6349 |
|
AC_SUBST(XERCES_INCLUDE) |
| 6350 |
|
AC_SUBST(XERCES_LIBS) |
| 6351 |
|
AC_SUBST(XERCES_STATIC_LIBS) |
| 6352 |
|
AC_SUBST(XALAN_INCLUDE) |
| 6353 |
|
AC_SUBST(XALAN_LIBS) |
| 6354 |
|
AC_SUBST(XALAN_STATIC_LIBS) |
| 6355 |
|
AC_SUBST(SQLITE3_STATIC_LIBS) |
| 6356 |
|
AC_SUBST(FREETYPE_INCLUDE) |
| 6357 |
|
AC_SUBST(FREETYPE_LIBS) |
| 6358 |
|
AC_SUBST(ncbi_xreader_pubseqos) |
| 6359 |
|
AC_SUBST(ncbi_xreader_pubseqos2) |
| 6360 |
|
AC_SUBST(UNLESS_PUBSEQOS) |
| 6361 |
|
|
| 6362 |
AC_SUBST(NCBI_C_ncbi) |
AC_SUBST(NCBI_C_ncbi) |
| 6363 |
|
|
| 6366 |
AC_SUBST(APP_OR_NULL) |
AC_SUBST(APP_OR_NULL) |
| 6367 |
AC_SUBST(IF_REBUILDING_LIBS) |
AC_SUBST(IF_REBUILDING_LIBS) |
| 6368 |
AC_SUBST(IF_REBUILDING_CONDITIONALLY) |
AC_SUBST(IF_REBUILDING_CONDITIONALLY) |
| 6369 |
|
AC_SUBST(IF_DEACTIVATING) |
| 6370 |
|
AC_SUBST(configurables_mfname) |
| 6371 |
AC_SUBST(CC_FILTER) |
AC_SUBST(CC_FILTER) |
| 6372 |
AC_SUBST(CXX_FILTER) |
AC_SUBST(CXX_FILTER) |
| 6373 |
AC_SUBST(AR_FILTER) |
AC_SUBST(AR_FILTER) |
| 6412 |
ncbicfg="$builddir/corelib/ncbicfg.c" |
ncbicfg="$builddir/corelib/ncbicfg.c" |
| 6413 |
test -f "$ncbicfg" -a ! -f "$ncbicfg.last" && cp -p "$ncbicfg" "$ncbicfg.last" |
test -f "$ncbicfg" -a ! -f "$ncbicfg.last" && cp -p "$ncbicfg" "$ncbicfg.last" |
| 6414 |
|
|
| 6415 |
|
test -d "$status_dir" || mkdir -p "$status_dir" |
| 6416 |
|
CONFIG_STATUS=$status_dir/config.status |
| 6417 |
|
|
| 6418 |
## Configure the compiler/flag-dependent header |
## Configure the compiler/flag-dependent header |
| 6419 |
AC_CONFIG_HEADER(${ncbiconf}:config.h.in) |
AC_CONFIG_HEADER(${ncbiconf}:src/build-system/config.h.in) |
| 6420 |
|
|
| 6421 |
## |
## |
| 6422 |
## Configure makefiles, shell scripts, etc. |
## Configure makefiles, shell scripts, etc. |
| 6423 |
## |
## |
| 6424 |
AC_CONFIG_FILES($configurables $srcdir/./Makefile:Makefile.in) |
AC_CONFIG_FILES($configurables $srcdir/./Makefile:src/build-system/Makefile.in.top) |
| 6425 |
|
|
| 6426 |
AC_CONFIG_COMMANDS([default], [ |
AC_CONFIG_COMMANDS([default], [ |
|
status_dir="$SAVE_status_dir" |
|
|
builddir="$SAVE_builddir" |
|
|
build_root="$SAVE_build_root" |
|
|
x_configurables="$SAVE_x_configurables" |
|
|
ncbiconf="$SAVE_ncbiconf" |
|
|
CFLAGS="$SAVE_CFLAGS" |
|
|
CXXFLAGS="$SAVE_CXXFLAGS" |
|
|
CPPFLAGS="$SAVE_CPPFLAGS" |
|
|
LDFLAGS="$SAVE_LDFLAGS" |
|
|
LIB_OR_DLL="$SAVE_LIB_OR_DLL" |
|
|
with_dll="$SAVE_with_dll" |
|
|
WithFeatures="$SAVE_WithFeatures" |
|
|
WithPackages="$SAVE_WithPackages" |
|
|
WithoutPackages="$SAVE_WithoutPackages" |
|
|
WithProjects="$SAVE_WithProjects" |
|
|
WithoutProjects="$SAVE_WithoutProjects" |
|
|
with_extra_action="$SAVE_with_extra_action" |
|
|
with_projects="$SAVE_with_projects" |
|
|
|
|
| 6427 |
dnl make all shell scripts *.sh be executable |
dnl make all shell scripts *.sh be executable |
| 6428 |
find "$build_root/." -name '*.sh' -print | while read x_file ; do |
find "$build_root/." -name '*.sh' -print | while read x_file ; do |
| 6429 |
chmod a+x "$x_file" |
chmod a+x "$x_file" |
| 6430 |
done |
done |
| 6431 |
|
|
| 6432 |
dnl save status, cache, and log files to the build tree dir "status/" |
dnl save cache and log files to the build tree dir "status/" |
| 6433 |
if test -f config.status -a -f config.cache -a -f config.log ; then |
dnl (alongside config.status, which is now directly created there to |
| 6434 |
|
dnl avoid possible trouble; for that matter, it can be at least as |
| 6435 |
|
dnl important to avoid having config.log still open for writing during |
| 6436 |
|
dnl the move). |
| 6437 |
|
if test -f config.cache -a -f config.log ; then |
| 6438 |
test -d "$status_dir" || mkdir -p "$status_dir" |
test -d "$status_dir" || mkdir -p "$status_dir" |
| 6439 |
mv config.status config.cache config.log "$status_dir"/ |
exec AS_MESSAGE_LOG_FD>/dev/null |
| 6440 |
|
mv config.cache config.log "$status_dir"/ |
| 6441 |
|
exec AS_MESSAGE_LOG_FD>>"$status_dir/config.log" |
| 6442 |
fi |
fi |
| 6443 |
|
|
| 6444 |
dnl Update list of enabled packages |
dnl Update list of enabled packages |
| 6446 |
for p in $WithPackages $WithProjects $WithFeatures ; do |
for p in $WithPackages $WithProjects $WithFeatures ; do |
| 6447 |
touch "$status_dir"/$p.enabled |
touch "$status_dir"/$p.enabled |
| 6448 |
done |
done |
| 6449 |
|
for p in $WithoutPackages $WithoutProjects $WithoutFeatures ; do |
| 6450 |
|
touch "$status_dir"/-$p.enabled |
| 6451 |
|
done |
| 6452 |
|
|
| 6453 |
|
dnl Create dummy .dep files for system installations of (b)zlib. |
| 6454 |
|
dnl This is a stopgap measure, and fails for installations in non-system dirs. |
| 6455 |
|
# test -f "$status_dir"/LocalZ.enabled || \ |
| 6456 |
|
# touch -t 197001010000 $status_dir/.z.dep |
| 6457 |
|
# test -f "$status_dir"/LocalBZ2.enabled || \ |
| 6458 |
|
# touch -t 197001010000 $status_dir/.bz2.dep |
| 6459 |
|
|
| 6460 |
|
dnl Incorporate any Makefile.*.mk and ncbiconf.*.h files found in the tree. |
| 6461 |
|
find "$srcdir"/src/* -name .svn -prune -o -name 'Makefile.*.mk' -print \ |
| 6462 |
|
| while read x; do |
| 6463 |
|
echo |
| 6464 |
|
echo "### Extra macro definitions from $x" |
| 6465 |
|
echo |
| 6466 |
|
echo "#line 1 \"$x\"" |
| 6467 |
|
cat "$x" |
| 6468 |
|
done >> "$builddir/Makefile.mk" |
| 6469 |
|
$srcdir/scripts/common/impl/report_duplicates.awk \ |
| 6470 |
|
src="$srcdir/src/build-system/Makefile.mk.in" "$builddir/Makefile.mk" |
| 6471 |
|
find "$srcdir"/src/* -name .svn -prune -o -name 'ncbiconf.*.h' -print \ |
| 6472 |
|
| while read x; do |
| 6473 |
|
echo |
| 6474 |
|
echo "/*** Extra macro definitions from $x ***/" |
| 6475 |
|
echo |
| 6476 |
|
echo "#line 1 \"$x\"" |
| 6477 |
|
cat "$x" |
| 6478 |
|
done > "$build_root/inc/ncbiconf_extra.h" |
| 6479 |
|
if test -s "$build_root/inc/ncbiconf_extra.h"; then |
| 6480 |
|
ncbiconf=$build_root/inc/ncbiconf_unix.h |
| 6481 |
|
newconf=$ncbiconf.extra.new |
| 6482 |
|
savedconf=$ncbiconf.extra.prev |
| 6483 |
|
cat "$ncbiconf" "$build_root/inc/ncbiconf_extra.h" > "$newconf" |
| 6484 |
|
$srcdir/scripts/common/impl/report_duplicates.awk \ |
| 6485 |
|
src="$srcdir/src/build-system/config.h.in" "$newconf" |
| 6486 |
|
if test -f "$savedconf" && cmp "$newconf" "$savedconf" >/dev/null; then |
| 6487 |
|
echo "$ncbiconf is unchanged" |
| 6488 |
|
else |
| 6489 |
|
cp -p "$newconf" "$savedconf" |
| 6490 |
|
fi |
| 6491 |
|
cp -p "$savedconf" "$ncbiconf" |
| 6492 |
|
else |
| 6493 |
|
rm "$build_root/inc/ncbiconf_extra.h" |
| 6494 |
|
fi |
| 6495 |
|
|
| 6496 |
dnl Avoid gratuitous relinking |
dnl Avoid gratuitous relinking |
| 6497 |
ncbicfg="$builddir/corelib/ncbicfg.c" |
ncbicfg="$builddir/corelib/ncbicfg.c" |
| 6506 |
echo "$ncbicfg" is not present |
echo "$ncbicfg" is not present |
| 6507 |
fi |
fi |
| 6508 |
|
|
| 6509 |
|
dnl Create Makefile.flat if requested |
| 6510 |
|
if test "$with_configure_dialog" = yes; then |
| 6511 |
|
if test "$with_flat_makefile" = no; then |
| 6512 |
|
AC_MSG_ERROR([incompatible options: --without-flat-makefile but --with-configure-dialog.]) |
| 6513 |
|
fi |
| 6514 |
|
with_flat_makefile=yes |
| 6515 |
|
elif test "${with_saved_settings:-no}" != no; then |
| 6516 |
|
if test "$with_flat_makefile" = no; then |
| 6517 |
|
AC_MSG_ERROR([incompatible options: --without-flat-makefile but --with-saved-settings.]) |
| 6518 |
|
fi |
| 6519 |
|
with_flat_makefile=yes |
| 6520 |
|
fi |
| 6521 |
|
if test "$with_flat_makefile" != "no"; then |
| 6522 |
|
if test "$with_flat_makefile" = yes; then |
| 6523 |
|
cfm_flags='' |
| 6524 |
|
else |
| 6525 |
|
cfm_flags='-remoteptb' |
| 6526 |
|
fi |
| 6527 |
|
case "$with_projects" in |
| 6528 |
|
yes ) cfm_flags="$cfm_flags -p projects" ;; |
| 6529 |
|
no | '' ) ;; |
| 6530 |
|
* ) cfm_flags="$cfm_flags -p $with_projects" ;; |
| 6531 |
|
esac |
| 6532 |
|
if test "$with_configure_dialog" = yes; then |
| 6533 |
|
cfm_flags="$cfm_flags -cfg" |
| 6534 |
|
fi |
| 6535 |
|
if test "${with_saved_settings-no}" != no; then |
| 6536 |
|
cfm_flags="$cfm_flags -saved $with_saved_settings" |
| 6537 |
|
fi |
| 6538 |
|
if $real_srcdir/scripts/common/impl/create_flat_makefile.sh "$build_root" \ |
| 6539 |
|
-s "$real_srcdir" $cfm_flags && test -f "$builddir/Makefile.flat"; then |
| 6540 |
|
build_flat="Alternatively, cd $builddir && make -f Makefile.flat" |
| 6541 |
|
elif test -f "$builddir/Flat.configuration_log"; then |
| 6542 |
|
grep 'already defined' "$builddir/Flat.configuration_log" |
| 6543 |
|
AC_MSG_ERROR([flat makefile generation failed.]) |
| 6544 |
|
fi |
| 6545 |
|
fi |
| 6546 |
|
|
| 6547 |
dnl execute extra-action |
dnl execute extra-action |
| 6548 |
if test -n "$with_extra_action" ; then |
if test -n "$with_extra_action" ; then |
| 6549 |
with_extra_action=`echo "$with_extra_action" | sed "s%{}%$build_root%g"` |
with_extra_action=`echo "$with_extra_action" | sed "s%{}%$build_root%g"` |
| 6552 |
eval $with_extra_action |
eval $with_extra_action |
| 6553 |
exit_code="$?" |
exit_code="$?" |
| 6554 |
if test $exit_code -ne 0 ; then |
if test $exit_code -ne 0 ; then |
| 6555 |
echo "WARNING! non-zero exit code ($exit_code): $with_extra_action" |
AC_MSG_WARN([non-zero exit code ($exit_code): $with_extra_action]) |
| 6556 |
fi |
fi |
| 6557 |
echo |
echo |
| 6558 |
fi |
fi |
| 6599 |
To build everything: cd $builddir && make all_r |
To build everything: cd $builddir && make all_r |
| 6600 |
or simply run make in the current directory |
or simply run make in the current directory |
| 6601 |
$build_proj |
$build_proj |
| 6602 |
|
$build_flat |
| 6603 |
******* CONFIGURATION SUCCESSFUL ******* |
******* CONFIGURATION SUCCESSFUL ******* |
| 6604 |
EOCONF |
EOCONF |
| 6605 |
], [ |
], [ |
| 6606 |
SAVE_status_dir='$status_dir' |
status_dir='$status_dir' |
| 6607 |
SAVE_builddir='$builddir' |
builddir='$builddir' |
| 6608 |
SAVE_build_root='$build_root' |
build_root='$build_root' |
| 6609 |
SAVE_x_configurables='$x_configurables' |
x_configurables='$x_configurables' |
| 6610 |
SAVE_ncbiconf='$ncbiconf' |
ncbiconf='$ncbiconf' |
| 6611 |
SAVE_CFLAGS='$CFLAGS' |
CFLAGS='$CFLAGS' |
| 6612 |
SAVE_CXXFLAGS='$CXXFLAGS' |
CXXFLAGS='$CXXFLAGS' |
| 6613 |
SAVE_CPPFLAGS='$CPPFLAGS' |
CPPFLAGS='$CPPFLAGS' |
| 6614 |
SAVE_LDFLAGS='$LDFLAGS' |
LDFLAGS='$LDFLAGS' |
| 6615 |
SAVE_LIB_OR_DLL='$LIB_OR_DLL' |
LIB_OR_DLL='$LIB_OR_DLL' |
| 6616 |
SAVE_with_dll='$with_dll' |
with_dll='$with_dll' |
| 6617 |
SAVE_WithFeatures='$WithFeatures' |
WithFeatures='$WithFeatures' |
| 6618 |
SAVE_WithPackages='$WithPackages' |
WithoutFeatures='$WithoutFeatures' |
| 6619 |
SAVE_WithoutPackages='$WithoutPackages' |
WithPackages='$WithPackages' |
| 6620 |
SAVE_WithProjects='$WithProjects $OPT_GROUPS' |
WithoutPackages='$WithoutPackages' |
| 6621 |
SAVE_WithoutProjects='$WithoutProjects' |
WithProjects='$WithProjects $OPT_GROUPS' |
| 6622 |
SAVE_with_extra_action='$with_extra_action' |
WithoutProjects='$WithoutProjects' |
| 6623 |
SAVE_with_projects='$with_projects' |
with_extra_action='$with_extra_action' |
| 6624 |
|
with_projects='$with_projects' |
| 6625 |
|
with_flat_makefile='$with_flat_makefile' |
| 6626 |
|
with_configure_dialog='$with_configure_dialog' |
| 6627 |
|
with_saved_settings='$with_saved_settings' |
| 6628 |
|
smart_pwd='$smart_pwd' |
| 6629 |
|
real_srcdir='$real_srcdir' |
| 6630 |
]) |
]) |
| 6631 |
|
|
| 6632 |
|
AC_WARNING([*** Please don't forget to update .../src/build-system/NEWS if appropriate! ***])dnl |
| 6633 |
AC_OUTPUT |
AC_OUTPUT |