1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772
|
dnl -*- Autoconf -*-
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.50)
dnl Init stuff
dnl **************************************************************************
dnl release version number info
m4_include([revision.m4])
AC_INIT(FreeCAD,[FREECAD_MAJOR.FREECAD_MINOR.FREECAD_MICRO],[wmayer@users.sourceforge.net], FreeCAD)
AC_CONFIG_AUX_DIR([m4])
AM_INIT_AUTOMAKE([tar-ustar foreign])
AM_CONFIG_HEADER([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_LANG_CPLUSPLUS
dnl Default install directory is your home directory
dnl **************************************************************************
AC_PREFIX_DEFAULT($HOME/FreeCAD)
dnl Version number
dnl **************************************************************************
dnl Shared library versioning
dnl GENERIC_LIBRARY_VERSION=1:2:0
dnl | | |
dnl +------+ | +---+
dnl | | |
dnl current:revision:age
dnl | | |
dnl | | +- increment if interfaces have been added
dnl | | set to zero if interfaces have been removed
dnl | | or changed
dnl | +- increment if source code has changed
dnl | set to zero if current is incremented
dnl +- increment if interfaces have been added, removed or changed
LIB_CURRENT=2
LIB_REVISION=0
LIB_AGE=0
AC_SUBST(LIB_CURRENT)
AC_SUBST(LIB_REVISION)
AC_SUBST(LIB_AGE)
dnl Required headers
dnl (mainly for OpenCASCADE 5.2, we need also config.h for cfg's)
dnl **************************************************************************
AC_LANG([C++])
AC_MSG_CHECKING([ for C++ header files ])
AC_CHECK_HEADERS(istream ostream istream fstream ios iomanip iostream)
AC_CHECK_HEADERS(iomanip.h limits.h values.h float.h)
AC_CHECK_HEADERS(siginfo.h bits/sigset.h bstring.h sys/types.h sys/select.h)
AC_CHECK_HEADERS(sys/filio.h sys/mman.h libc.h)
AC_CHECK_HEADERS([sstream],,[AC_MSG_ERROR([This header is needed. Bye.])])
AC_CXX_HAVE_STD_IOSTREAM
dnl Checking for programs
dnl **************************************************************************
AC_PROG_CXX
AC_PROG_CC
AC_ENABLE_SHARED(yes)
AC_ENABLE_STATIC(no)
AC_LIBTOOL_DLOPEN
AC_PROG_LIBTOOL
AC_PROG_LN_S
#AC_PROG_YACC
#AM_PROG_LEX
AC_PATH_PROG(SWIG, swig, false)
if test "$SWIG" = false ; then
AC_MSG_WARN([Can't find SWIG installation])
HAVE_SWIG=0
AM_CONDITIONAL(HAVE_SWIG_FOUND, false)
else
HAVE_SWIG=1
AM_CONDITIONAL(HAVE_SWIG_FOUND, true)
fi
AC_SUBST(HAVE_SWIG)
dnl Defines in config.h
dnl **************************************************************************
AC_DEFINE_UNQUOTED(HAVE_GETENVIRONMENTVARIABLE, 1, [Define to use GetEnvironmentVariable() instead of getenv()])
AC_DEFINE_UNQUOTED(HAVE_GL_GL_H, 1, [define if the GL header should be included as GL/gl.h])
AC_DEFINE_UNQUOTED(HAVE_QGLFORMAT_EQ_OP, 1, [Define this to 1 if operator==(QGLFormat&, QGLFormat&) is available])
AC_DEFINE_UNQUOTED(HAVE_QGLFORMAT_SETOVERLAY, 1, [Define this to 1 if QGLFormat::setOverlay() is available])
AC_DEFINE_UNQUOTED(HAVE_QGLWIDGET_SETAUTOBUFFERSWAP, 1, [Define this to 1 if QGLWidget::setAutoBufferSwap() is available])
AC_DEFINE_UNQUOTED(HAVE_QT_KEYPAD_DEFINE, 1, [Define this if Qt::Keypad is available])
AC_DEFINE_UNQUOTED(HAVE_QWIDGET_SHOWFULLSCREEN, 1, [Define this if QWidget::showFullScreen() is available])
AC_DEFINE_UNQUOTED(HAVE_SYS_TYPES_H, 1, [Define to 1 if you have the <sys/types.h> header file.])
AC_DEFINE_UNQUOTED(USE_STD_IOSTREAM, 1, [Define to 1 to build zipios++ sources with iostream.])
dnl Check if you want to use GUI, or not (currently disabled)
dnl **************************************************************************
dnl
#AC_ARG_ENABLE([gui],
# AC_HELP_STRING([--enable-gui], [Enable GUI (you can disable this feature to use FreeCAD in server mode)]),
# [case $enableval in
# no | false) fc_set_gui=false ;;
# *) fc_set_gui=true ;;
# esac],
# [fc_set_gui=true])
#
#if $fc_set_gui; then
# echo "not yet done"
#fi
#
#if test "x$use_glx" = "xyes"; then
# AM_CONDITIONAL(FREECAD_BUILD_GUI, true)
#else
# AM_CONDITIONAL(FREECAD_BUILD_GUI, false)
#fi
#if FREECAD_BUILD_GUI
# ... in Makefile.am
#endif
## DEFAULT INCLUDE/LIB PATHS
#all_includes="$all_includes -I/usr/include -I/usr/local/include"
#all_libraries="$all_libraries -L/usr/lib -L/usr/local/lib"
dnl *************************************************************************
dnl
dnl Checking for libraries.
dnl
dnl *************************************************************************
dnl checking for zlib
dnl **************************************************************************
AC_CHECK_LIB(z, inflate, [cv_libz=yes], [cv_libz=no])
if test "$cv_libz" != "yes"; then
AC_MSG_ERROR([
**** Cannot find the zlib library. ****
])
fi
dnl checking for Python
dnl **************************************************************************
dnl AC_MSG_CHECKING([for Python])
dnl fc_py_ver=`python -c "import sys; print sys.version[[:3]]"`;
dnl if test x$fc_py_ver = x; then
dnl AC_MSG_ERROR([
dnl **** Cannot find Python interpreter. ****
dnl ])
dnl fi;
dnl AC_MSG_RESULT([yes])
dnl
dnl dnl Additional test to force version number of >= 2.5
dnl AC_MSG_CHECKING([for Python version >= 2.5])
dnl prog="import sys
dnl s=0x02050000
dnl sys.exit(sys.hexversion < s)"
dnl AS_IF([AM_RUN_LOG([python -c "$prog"])],
dnl [AC_MSG_RESULT([yes])],
dnl [AC_MSG_ERROR([
dnl **** Install Python version 2.5 or later ****
dnl ])])
AC_ARG_WITH(python-version,
AC_HELP_STRING([--with-python-version=VER], [Choose the required Python version]),
[fc_py_ver=$withval],
[fc_py_ver=2.5])
dnl At least version 2.5 required
AM_PATH_PYTHON($fc_py_ver)
AC_ARG_WITH(python-include,
AC_HELP_STRING([--with-python-include=DIR], [Path to the Python header files]),
[fc_py_incs=$withval],
[fc_py_incs=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_python_inc()"`])
AC_ARG_WITH(python-lib,
AC_HELP_STRING([--with-python-lib=DIR], [Path to the Python library files]),
[fc_py_libs=$withval],
[fc_py_libs=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBDIR')"`])
fc_py_ac_save_cppflags=$CPPFLAGS
fc_py_ac_save_ldflags=$LDFLAGS
fc_py_ac_save_libs=$LIBS
CPPFLAGS="$CPPFLAGS -I$fc_py_incs"
LDFLAGS="$LDFLAGS -L$fc_py_libs"
LIBS="-lpython$PYTHON_VERSION"
dnl Small test program that only works with Python 2.5 and higher
fc_cv_lib_py_avail=no
AC_CHECK_HEADER(Python.h,[
AC_MSG_CHECKING([for libpython$PYTHON_VERSION])
AC_TRY_LINK([#include "Python.h"],
[Py_Initialize();
const char* sys = "sys";
PyImport_AddModule(sys);
Py_Finalize();],
[fc_cv_lib_py_avail=yes
AC_MSG_RESULT(yes)],
AC_MSG_RESULT(no))])
CPPFLAGS=$fc_py_ac_save_cppflags
LDFLAGS=$fc_py_ac_save_ldflags
LIBS=$fc_py_ac_save_libs
if test x"$fc_cv_lib_py_avail" = xyes; then
all_includes="$all_includes -I$fc_py_incs"
all_libraries="$all_libraries -L$fc_py_libs"
AC_SUBST([PYTHON_LIB], [python$PYTHON_VERSION])
else
AC_MSG_ERROR([
**** Cannot find Python$PYTHON_VERSION devel files. ****
])
fi
dnl checking for PyCXX & zipios++
dnl **************************************************************************
fc_local_pycxx_zipios=yes
AC_ARG_ENABLE(pycxx-zipios,
AC_HELP_STRING([--enable-pycxx-zipios], [Use local sources of PyCXX & zipios++ packages [[default=yes]]]),
[fc_local_pycxx_zipios=$enableval],[fc_local_pycxx_zipios=yes])
# check if local versions of PyCXX & zipios++ are part of these sources
if test x"$fc_local_pycxx_zipios" = xyes; then
fc_py_ac_save_cppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$srcdir -I$srcdir/src"
AC_TRY_COMPILE([#include "src/CXX/Version.hxx"], [],
[], [fc_local_pycxx_zipios=no])
CPPFLAGS=$fc_py_ac_save_cppflags
fi
AM_CONDITIONAL(ENABLE_PYCXX_ZIPIOS, test x"$fc_local_pycxx_zipios" = xyes)
AC_MSG_RESULT(Use local sources of PyCXX & zipios++... $fc_local_pycxx_zipios)
dnl checking for existence of (system-wide) PyCXX & zipios++ headers
dnl **************************************************************************
ZIPIOS_LIB=""
if test x"$fc_local_pycxx_zipios" != xyes; then
fc_py_ac_save_cppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$fc_py_incs"
ZIPIOS_LIB="-lzipios"
AC_MSG_CHECKING(for PyCXX headers)
AC_TRY_COMPILE([#include <CXX/Version.hxx>], [],
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no);AC_MSG_ERROR(Cannot find the PyCXX headers)])
AC_MSG_CHECKING(for zipios++ headers)
AC_TRY_COMPILE([#include <zipios++/zipios_defs.h>], [],
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no);AC_MSG_ERROR(Cannot find the zipios++ headers)])
CPPFLAGS=$fc_py_ac_save_cppflags
fi
AC_SUBST(ZIPIOS_LIB)
dnl checking for xerces-c
dnl **************************************************************************
AC_MSG_CHECKING([for xerces-c])
AC_ARG_WITH(xercesc-include,
AC_HELP_STRING([--with-xercesc-include=DIR], [Path to the xerces-c header files]),
[fc_xer_incs=$withval],
[fc_xer_incs=/usr/include])
AC_CHECK_FILE($fc_xer_incs/xercesc,,
[AC_CHECK_FILE(/usr/local/include/xercesc,[fc_xer_incs=/usr/local/include])])
AC_ARG_WITH(xercesc-lib,
AC_HELP_STRING([--with-xercesc-lib=DIR], [Path to the xerces-c library files]),
[fc_xer_libs=$withval],
[fc_xer_libs=/usr/lib])
fc_xer_ac_save_cppflags=$CPPFLAGS
fc_xer_ac_save_ldflags=$LDFLAGS
fc_xer_ac_save_libs=$LIBS
CPPFLAGS="$CPPFLAGS -I$fc_xer_incs"
LDFLAGS="$LDFLAGS -L$fc_xer_libs"
LIBS="-lxerces-c"
fc_cv_lib_xer_avail=no
AC_CHECK_HEADER(xercesc/framework/XMLBuffer.hpp,[
AC_MSG_CHECKING([whether xerces lib is available])
AC_TRY_LINK([#include <xercesc/framework/XMLBuffer.hpp>],
[XERCES_CPP_NAMESPACE_USE
XMLBuffer buf;],
[fc_cv_lib_xer_avail=yes
AC_MSG_RESULT(yes)],
AC_MSG_RESULT(no))])
CPPFLAGS=$fc_xer_ac_save_cppflags
LDFLAGS=$fc_xer_ac_save_ldflags
LIBS=$fc_xer_ac_save_libs
if test x"$fc_cv_lib_xer_avail" = xyes; then
all_includes="$all_includes -I$fc_xer_incs"
all_libraries="$all_libraries -L$fc_xer_libs"
else
AC_MSG_ERROR([
**** Cannot find xerces devel files. ****
])
fi
dnl checking for boost
dnl ******************
FREECAD_AC_HAVE_BOOST
dnl checking for Qt
dnl ***************
FREECAD_AC_HAVE_QT(4.3)
dnl checking for Coin
dnl **************************************************************************
SIM_AC_HAVE_COIN_IFELSE(,AC_MSG_ERROR([
**** Cannot find Coin devel files. ****
]))
AC_SUBST([sim_ac_coin_includedir])
AC_SUBST([sim_ac_coin_cppflags])
AC_SUBST([sim_ac_coin_ldflags])
AC_SUBST([sim_ac_coin_libs])
dnl checking for SoQt
dnl **************************************************************************
SIM_AC_HAVE_SOQT_IFELSE(,AC_MSG_ERROR([
**** Cannot find SoQt devel files. ****
]))
AC_SUBST([sim_ac_soqt_includedir])
AC_SUBST([sim_ac_soqt_cppflags])
AC_SUBST([sim_ac_soqt_ldflags])
AC_SUBST([sim_ac_soqt_libs])
dnl **************************************************************************
dnl checking for optional libraies
dnl **************************************************************************
dnl checking for OpenGL libs
dnl **************************************************************************
case $host_os in
mingw32*)
GL_LIBS="-lopengl32 -lglu32"
;;
darwin*)
GL_LIBS="-Wl,-F/System/Library/Frameworks -Wl,-framework,OpenGL"
;;
linux*)
GL_LIBS="-lGL -lGLU"
;;
esac
AC_SUBST(GL_LIBS)
dnl checking for OpenCascade
dnl **************************************************************************
dnl Check if CASROOT is set and estimate where the include and libs could be
if test x"$CASROOT" != x; then
fc_occ_incs_test="$CASROOT/inc"
fc_occ_libs_test="$CASROOT/Linux/lib"
else
fc_occ_incs_test=/usr/include/opencascade
fc_occ_libs_test=/usr/lib
fi
AC_CHECKING([OpenCascade])
AC_ARG_WITH(occ-include,
AC_HELP_STRING([--with-occ-include=DIR], [Path to the OpenCascade header files]),
[fc_occ_incs=$withval],
[fc_occ_incs=$fc_occ_incs_test])
AC_ARG_WITH(occ-lib,
AC_HELP_STRING([--with-occ-lib=DIR], [Path to the OpenCascade library files]),
[fc_occ_libs=$withval],
[fc_occ_libs=$fc_occ_libs_test])
fc_occ_ac_save_cppflags=$CPPFLAGS
fc_occ_ac_save_ldflags=$LDFLAGS
fc_occ_ac_save_libs=$LIBS
CPPFLAGS="$CPPFLAGS -I$fc_occ_incs"
LDFLAGS="$LDFLAGS -L$fc_occ_libs"
LIBS="-ldl -lTKernel"
fc_cv_lib_occ_avail=no
AC_CHECK_HEADER(Standard.hxx,[
AC_MSG_CHECKING([whether OCC libs are available])
AC_TRY_LINK([#define HAVE_IOSTREAM 1
#include <gp_Pnt.hxx>],
[gp_Pnt pt(0,0,0);],
[fc_cv_lib_occ_avail=yes
AC_MSG_RESULT(yes)],
AC_MSG_RESULT(no))])
# Checking for version >= 6.1
LIBS="-ldl -lTKernel -lTKMesh -lTKG2d -lTKG3d -lTKTopAlgo -lTKMath -lTKBRep -lTKGeomBase -lTKGeomAlgo"
fc_cv_lib_occ_ver_6=no
if test x"$fc_cv_lib_occ_avail" = xyes; then
AC_CHECK_HEADER(Standard.hxx,[
AC_MSG_CHECKING([whether OCC is >= 6.1])
AC_TRY_LINK([#define HAVE_IOSTREAM 1
#include <gp_Pnt.hxx>],
[gp_Pnt pt(0,0,0);],
[fc_cv_lib_occ_ver_6=yes
AC_MSG_RESULT(yes)],
AC_MSG_RESULT(no))])
fi
CPPFLAGS=$fc_occ_ac_save_cppflags
LDFLAGS=$fc_occ_ac_save_ldflags
LIBS=$fc_occ_ac_save_libs
if test x"$fc_cv_lib_occ_avail" = xyes; then
AC_SUBST([OCC_INC], [$fc_occ_incs])
AC_SUBST([OCC_LIB], [$fc_occ_libs])
else
AC_MSG_WARN([
**** Cannot find OpenCASCADE devel files.
Modules that depend on this library cannot be built. ****
])
fi
AM_CONDITIONAL(HAVE_OPENCASCADE, test x"$fc_cv_lib_occ_avail" = xyes)
AM_CONDITIONAL(OCC_VERSION6, test x"$fc_cv_lib_occ_ver_6" = xyes)
#---------------------------------------------------------------------
#
# Check if 64-bit platform
#
#---------------------------------------------------------------------
AC_MSG_CHECKING([if platform is 64-bit (-D_OCC64)])
AC_TRY_COMPILE( [],
[int array[((int)sizeof(void*))-6];],
[AC_MSG_RESULT([yes]); CPPFLAGS="$CPPFLAGS -D_OCC64"; case $platform in Linux*) CPPFLAGS="$CPPFLAGS -m64";; esac],
[AC_MSG_RESULT([no])] )
#AC_MSG_CHECKING([if platform is 64-bit (-D_OCC64)])
#AC_TRY_COMPILE([],[int array[6-(int)sizeof(void*)];],[AC_MSG_RESULT(no)],
# [AC_MSG_RESULT(yes); OCC_INC_FLAG="$OCC_INC_FLAG -D_OCC64"])
dnl checking for WildMagic3
dnl **************************************************************************
dnl AC_CHECKING([WildMagic3])
dnl AC_ARG_WITH(wm3-include,
dnl AC_HELP_STRING([--with-wm3-include=DIR], [Path to the WildMagic3 header files]),
dnl [fc_wm3_incs=$withval],
dnl [fc_wm3_incs=/usr/include/WildMagic3/Include])
dnl
dnl AC_ARG_WITH(wm3-lib,
dnl AC_HELP_STRING([--with-wm3-lib=DIR], [Path to the WildMagic3 library files]),
dnl [fc_wm3_libs=$withval],
dnl [fc_wm3_libs=/usr/lib])
dnl
dnl AC_CHECK_FILE($fc_wm3_incs/Wm3Query.h,fc_wm3_ver=340,fc_wm3_ver=330)
dnl
dnl Set the appropriate library name
dnl if test x"$fc_wm3_ver" = x"330"; then
dnl fc_wm3_lib="WildMagic3"
dnl fc_wm3_txt="Version <= 3.3.0"
dnl else
dnl fc_wm3_lib="Wm3Foundation"
dnl fc_wm3_txt="Version >= 3.4.0"
dnl fi
dnl
dnl fc_wm3_ac_save_cppflags=$CPPFLAGS
dnl fc_wm3_ac_save_ldflags=$LDFLAGS
dnl fc_wm3_ac_save_libs=$LIBS
dnl CPPFLAGS="$CPPFLAGS -I$fc_wm3_incs"
dnl LDFLAGS="$LDFLAGS -L$fc_wm3_libs"
dnl LIBS="-l$fc_wm3_lib"
dnl
dnl fc_cv_lib_wm3_avail=no
dnl AC_CHECK_HEADER(Wm3Math.h,[
dnl AC_MSG_CHECKING([whether WildMagic lib is available])
dnl AC_TRY_LINK([#include <Wm3Math.h>],
dnl [double val = Wm3::Math<double>::Cos(0.0);],
dnl [fc_cv_lib_wm3_avail=yes
dnl AC_MSG_RESULT(yes)],
dnl AC_MSG_RESULT(no))])
dnl
dnl CPPFLAGS=$fc_wm3_ac_save_cppflags
dnl LDFLAGS=$fc_wm3_ac_save_ldflags
dnl LIBS=$fc_wm3_ac_save_libs
dnl
dnl if test x"$fc_cv_lib_wm3_avail" = xyes; then
dnl AC_SUBST([WM3_CFLAGS], [-I$fc_wm3_incs])
dnl AC_SUBST([WM3_LDFLAGS], [-L$fc_wm3_libs])
dnl AC_SUBST([WM3_LIBS], [-l$fc_wm3_lib])
dnl AC_SUBST([WM3_VERSION], [$fc_wm3_ver])
dnl else
dnl AC_MSG_WARN([
dnl **** Cannot find WildMagic devel files.
dnl Modules that depend on this library cannot be built. ****
dnl ])
dnl fi
dnl
dnl AM_CONDITIONAL(WM3_LIBRARY_FILES, test x"$fc_cv_lib_wm3_avail" = xyes)
dnl checking for GTS
dnl **************************************************************************
dnl
dnl AC_PATH_PROG(GTSCONFIG, gts-config, false, $PATH)
dnl if test x"$GTSCONFIG" != xfalse; then
dnl fc_gts_incs=`gts-config --cflags`
dnl fc_gts_libs=`gts-config --libs`
dnl
dnl AC_SUBST([GTS_CFLAGS], [$fc_gts_incs])
dnl AC_SUBST([GTS_LIBS], [$fc_gts_libs])
dnl else
dnl AC_MSG_WARN([
dnl **** Cannot find GTS library files.
dnl Modules that depend on this library cannot be built. ****
dnl ])
dnl fi
dnl
dnl AM_CONDITIONAL(HAVE_GTS, test x"$GTSCONFIG" != xfalse)
dnl checking for OpenCV
dnl **************************************************************************
dnl HAVE_OPENCV=false
dnl PKG_CHECK_MODULES(opencv, opencv, [HAVE_OPENCV=true], [true])
dnl if test x$HAVE_OPENCV = xfalse; then
dnl AC_MSG_WARN([
dnl **** Cannot find OpenCV library files.
dnl Modules that depend on this library cannot be built. ****
dnl ])
dnl fi
dnl
dnl AM_CONDITIONAL([HAVE_OPENCV], [test x$HAVE_OPENCV = xtrue])
dnl **************************************************************************
AC_SUBST(all_includes)
AC_SUBST(all_libraries)
dnl Check if you want to have log info, or not
dnl **************************************************************************
AC_ARG_ENABLE([loginfo],
AC_HELP_STRING([--enable-loginfo], [Enable log information (disabled by default)]),
[case $enableval in
no | false) fc_set_loginfo=false ;;
*) fc_set_loginfo=true ;;
esac],
[fc_set_loginfo=false])
if $fc_set_loginfo; then
CPPFLAGS="$CPPFLAGS -DFC_DEBUG"
fi
AC_ARG_ENABLE([template],
AC_HELP_STRING([--enable-template], [Enable the build of the _TEMPLATE_ module (disabled by default)]),
[case $enableval in
no | false) fc_set_template=false ;;
*) fc_set_template=true ;;
esac],
[fc_set_template=false])
AM_CONDITIONAL(BUILD_TEMPLATE, test x"$fc_set_template" = xtrue)
dnl Check if you want debug information enabled, or not
dnl **************************************************************************
AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug], [Enable debug information (enabled by default)]),
[case $enableval in
no | false) fc_set_debug=false ;;
*) fc_set_debug=true ;;
esac],
[fc_set_debug=true])
if $fc_set_debug; then
CPPFLAGS="$CPPFLAGS -g -D_DEBUG"
else
CPPFLAGS="$CPPFLAGS -O2 -DNDEBUG"
fi
dnl Check if you want thread support, or not (currently disabled, thread support is forced)
dnl **************************************************************************
CPPFLAGS="$CPPFLAGS -D_REENTRANT"
LDFLAGS="$LDFLAGS -lpthread"
fc_set_thread=true
#AC_ARG_ENABLE([thread],
# AC_HELP_STRING([--enable-thread], [Enable thread support]),
# [case $enableval in
# no | false) fc_set_thread=false ;;
# *) fc_set_thread=true ;;
# esac],
# [fc_set_thread=true])
#if $fc_set_thread; then
# AC_CHECK_HEADER([pthread.h])
# AC_CHECK_LIB([pthread],[pthread_create])
# if test "$ac_cv_header_pthread_h" != yes -o \
# "$ac_cv_lib_pthread_pthread_create" != yes; then
# AC_MSG_ERROR([POSIX threads (pthreads) not working. Bye.])
# else
## this is apparently needed for some versions of autoconf/automake
## LIBS="-lpthread $LIBS"
## CXXFLAGS="$CXXFLAGS -D_REENTRANT"
# CPPFLAGS="$CPPFLAGS -D_REENTRANT"
# LDFLAGS="-lpthread"
# fi
#else
# CPPFLAGS="$CPPFLAGS -DNO_FC_THREAD"
#fi
dnl Check if you want compiler warnings enabled, or not
dnl **************************************************************************
AC_ARG_ENABLE([warnings],
AC_HELP_STRING([--enable-warnings], [Enable compiler warnings (enabled by default)]),
[case $enableval in
no | false) fc_set_warn=false ;;
*) fc_set_warn=true ;;
esac],
[fc_set_warn=true])
if $fc_set_warn; then
# CPPFLAGS="$CPPFLAGS -Wall -W"
CPPFLAGS="$CPPFLAGS -Wall"
else
CPPFLAGS="$CPPFLAGS -w"
fi
dnl Check if you want precompiled headers (PCH) enabled, or not
dnl ***********************************************************
dnl
dnl enableval=no
dnl AC_MSG_CHECKING([whether to use precompiled headers])
dnl AC_ARG_ENABLE(pch,
dnl AC_HELP_STRING([--enable-pch],
dnl [use precompiled headers, if available]))
dnl case "${enableval}" in
dnl yes)
dnl AC_MSG_RESULT(yes)
dnl COMP_FLAGS="$COMP_FLAGS -Winvalid-pch"
dnl ;;
dnl no)
dnl AC_MSG_RESULT(no)
dnl ;;
dnl *)
dnl AC_MSG_ERROR([bad value ${enableval} for --enable-pch, needs yes or no])
dnl ;;
dnl esac
dnl AM_CONDITIONAL(USE_PRECOMPILED_HEADERS, test x"$enableval" = xyes)
dnl
dnl CFLAGS="$COMP_FLAGS $OPT_FLAGS"
dnl CXXFLAGS="$COMP_FLAGS $OPT_FLAGS"
dnl **************************************************************************
dnl Use this Makefile.am
dnl if USE_PRECOMPILED_HEADERS
dnl PreCompiled.h.gch: PreCompiled.h
dnl $(CXXCOMPILE) -xc++-header -o $@ $<
dnl
dnl PRECOMPILED = PreCompiled.h.gch
dnl else
dnl PRECOMPILED =
dnl endif
dnl
dnl BUILT_SOURCES=\
dnl $(PRECOMPILED)
dnl **************************************************************************
dnl Define DISTCHECK_CONFIGURE_FLAGS
dnl **************************************************************************
DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS CXXFLAGS=\"-fno-strict-aliasing -Wno-write-strings\" LDFLAGS=\"-Wl,-z,defs\""
AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
CXX=g++
CXXFLAGS="$CXXFLAGS -Wno-deprecated -frtti"
AC_CONFIG_FILES([Makefile
src/Makefile
src/3rdParty/Makefile
src/Base/Makefile
src/App/Makefile
src/Gui/Makefile
src/Gui/Icons/Makefile
src/Gui/Language/Makefile
src/Gui/propertyeditor/Makefile
src/Gui/iisTaskPanel/Makefile
src/Gui/TaskView/Makefile
src/Main/Makefile
src/Doc/Makefile
src/Mod/Makefile
src/Mod/Part/Makefile
src/Mod/Part/App/Makefile
src/Mod/Part/Gui/Makefile
src/Mod/Raytracing/Makefile
src/Mod/Raytracing/App/Makefile
src/Mod/Raytracing/Gui/Makefile
src/Mod/Raytracing/Templates/Makefile
src/Mod/Mesh/Makefile
src/Mod/Mesh/App/Makefile
src/Mod/Mesh/Gui/Makefile
src/Mod/MeshPart/Makefile
src/Mod/MeshPart/App/Makefile
src/Mod/MeshPart/Gui/Makefile
src/Mod/MeshPart/Gui/Resources/Makefile
src/Mod/PartDesign/Makefile
src/Mod/PartDesign/App/Makefile
src/Mod/PartDesign/Gui/Makefile
src/Mod/PartDesign/Gui/Resources/Makefile
src/Mod/Sketcher/Makefile
src/Mod/Sketcher/App/Makefile
src/Mod/Sketcher/App/sketchsolve_cp/Makefile
src/Mod/Sketcher/App/sketchflat/Makefile
src/Mod/Sketcher/Gui/Makefile
src/Mod/Sketcher/Gui/Resources/Makefile
src/Mod/Sketcher/Templates/Makefile
src/Mod/Points/Makefile
src/Mod/Points/App/Makefile
src/Mod/Points/Gui/Makefile
src/Mod/Image/Makefile
src/Mod/Image/App/Makefile
src/Mod/Image/Gui/Makefile
src/Mod/Drawing/Makefile
src/Mod/Drawing/App/Makefile
src/Mod/Drawing/Gui/Makefile
src/Mod/Drawing/Gui/Resources/Makefile
src/Mod/Drawing/Templates/Makefile
src/Mod/ReverseEngineering/Makefile
src/Mod/ReverseEngineering/App/Makefile
src/Mod/ReverseEngineering/Gui/Makefile
src/Mod/ReverseEngineering/Gui/Resources/Makefile
src/Mod/Complete/Makefile
src/Mod/Complete/App/Makefile
src/Mod/Complete/Gui/Makefile
src/Mod/Complete/Gui/Resources/Makefile
src/Mod/Draft/Makefile
src/Mod/Test/Makefile
src/Mod/Test/Gui/Makefile
src/Mod/Web/Makefile
src/Mod/Web/Gui/Makefile
src/Mod/Web/Gui/Resources/Makefile
src/Mod/TemplatePyMod/Makefile
src/Tools/Makefile
src/Tools/_TEMPLATE_/Makefile
src/Tools/_TEMPLATE_/App/Makefile
src/Tools/_TEMPLATE_/Gui/Makefile
])
#src/3rdParty/Pivy/Makefile
#src/Mod/Sandbox/Makefile
#src/Mod/Sandbox/App/Makefile
#src/Mod/Sandbox/Gui/Makefile
AC_OUTPUT
dnl Show a configuration report
dnl **************************************************************************
AC_MSG_NOTICE([
**************************************************************************
FreeCAD configuration settings:
C++ compiler: $CXX
Python version: $PYTHON_VERSION
Log info enabled: $fc_set_loginfo
Debug info enabled: $fc_set_debug
Thread enabled (forced): $fc_set_thread
RTTI enabled (forced): true
Compiler warnings enabled: $fc_set_warn
installation prefix: $prefix
Now, run 'make' to build FreeCAD.
**************************************************************************
])
dnl **************************************************************************
|