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
|
dnl Process this file with autoconf to produce a configure script.
dnl Every `configure' script must call `AC_INIT'
dnl $package is the name of the program
dnl $version is its number
dnl $bugreport is an email
dnl $tarname is used to call the directories, ... related to the program
AC_INIT([V_Sim stable branch], [3.7.2], [damien D caliste AT cea D fr], [v_sim])
dnl Versioning
V_SIM_MAJOR_VERSION=$(echo $PACKAGE_VERSION | cut -d'.' -f1)
V_SIM_MINOR_VERSION=$(echo $PACKAGE_VERSION | cut -d'.' -f2)
V_SIM_MICRO_VERSION=$(echo $PACKAGE_VERSION | cut -d'.' -f3)
case "x$V_SIM_MICRO_VERSION" in
x99*)
V_SIM_MINOR_VERSION=$(($V_SIM_MINOR_VERSION + 1));;
esac
AC_SUBST(V_SIM_MAJOR_VERSION)
AC_SUBST(V_SIM_MINOR_VERSION)
AC_SUBST(V_SIM_MICRO_VERSION)
dnl Some variables
lib_v_sim_version=$V_SIM_MINOR_VERSION":0"
AC_SUBST(lib_v_sim_version)
need_cpp_compiler="no"
dnl Save this value here, since automake will set cflags later
cflags_set=${CFLAGS}
cxxflags_set=${CXXFLAGS}
dnl Initialize automake with same $package and $version
AM_INIT_AUTOMAKE([$PACKAGE_TARNAME], [$PACKAGE_VERSION])
dnl Use a config.h file to store macro definitions
AM_CONFIG_HEADER(config.h)
AC_CONFIG_MACRO_DIR([m4])
dnl Outputing some informations
date="2014-12-19"
AC_MSG_NOTICE([Compiling $PACKAGE_NAME])
AC_MSG_NOTICE([$PACKAGE_TARNAME $PACKAGE_VERSION $date])
dnl Set the default prefix
AC_PREFIX_DEFAULT([/usr/local])
AC_MSG_CHECKING([for instalation directory])
AC_MSG_RESULT([$prefix])
dnl Starting of consistency checks
dnl ------------------------------
dnl cherche un compilateur C
dnl set the CC variable
AC_PROG_CC
dnl set the CXX variable
AC_PROG_CXX
dnl set the FC variable
AC_PROG_F77
AC_PROG_FC
dnl If GCC is used, then we define the flag not to tag unused parameters.
if test "$GCC" = "yes" ; then
AC_DEFINE([_U_], [__attribute((unused))], [Tag this parameter as unused.])
fi
dnl Using libtool to handle libraries
AC_CHECK_TOOL(LIBTOOL, libtool, :)
if test "$libtool" = ":" ; then
AC_MSG_ERROR(["No 'libtool' program found."])
fi
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
dnl check for platform
AC_MSG_CHECKING([for target architecture])
case x"$target" in
xNONE | x)
target_or_host="$host" ;;
*)
target_or_host="$target" ;;
esac
AC_MSG_RESULT(['$target_or_host'])
AC_MSG_CHECKING([for platform])
define_win32=0
define_X11=1
case "$target_or_host" in
i686-w64-mingw32)
platform=win32
define_win32=1
define_X11=0
EXEEXT=.exe
FONT_NORMAL="Sans"
FONT_BOLD="Sans bold"
EXTRA_LDFLAGS="-no-undefined"
EXTRA_CFLAGS="-mms-bitfields"
EXTRA_LIBS="-lintl"
;;
*-mingw* | *-*-cygwin*)
platform=win32
define_win32=1
define_X11=0
EXEEXT=.exe
FONT_NORMAL="Sans"
FONT_BOLD="Sans bold"
EXTRA_LDFLAGS="-no-undefined"
EXTRA_CFLAGS="-mms-bitfields -mno-cygwin"
EXTRA_LIBS="-lintl"
;;
*-apple-darwin*)
platform=Apple
define_X11=1
define_win32=0
EXEEXT=
FONT_NORMAL="Nimbus normal"
FONT_BOLD="Nimbus bold"
EXTRA_LDFLAGS=
EXTRA_LIBS="-dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
EXTRA_CFLAGS=
;;
*)
platform=X11
define_X11=1
define_win32=0
EXEEXT=
FONT_NORMAL="Nimbus normal"
FONT_BOLD="Nimbus bold"
EXTRA_LDFLAGS=
EXTRA_CFLAGS=
;;
esac
AC_MSG_RESULT([$platform])
AC_SUBST(FONT_NORMAL)
AC_SUBST(FONT_BOLD)
AC_SUBST(EXTRA_LDFLAGS)
AC_SUBST(EXTRA_CFLAGS)
AC_SUBST(EXTRA_LIBS)
AC_SUBST(EXEEXT)
AM_CONDITIONAL(PLATFORM_X11, test "$define_X11" = "1")
AM_CONDITIONAL(PLATFORM_WIN32, test "$define_win32" = "1")
AM_CONDITIONAL(BUILD_STATIC_BINARY, test "$define_X11" = "1")
AM_CONDITIONAL(BUILD_SHARED_BINARY, test "$define_win32" = "1")
dnl Check the GL header and lib.
if test x"$platform" = x"Apple" ; then
LIBS_SVG="$LIBS"
LIBS="$EXTRA_LIBS $LIBS"
fi
AX_CHECK_GL()
if test x"$no_gl" = x"yes" ; then
AC_MSG_ERROR(["No GL implementation (header or library issues)."])
fi
dnl Check the GLU header and lib.
AX_CHECK_GLU()
if test x"$no_glu" = x"yes" ; then
AC_MSG_ERROR(["No GLU implementation (header or library issues)."])
fi
if test x"$platform" = x"Apple" ; then
LIBS="$LIBS_SVG"
fi
dnl Look for FTGL
PKG_CHECK_MODULES(FTGL, ftgl, [have_ftgl=yes], [have_ftgl=no])
if test x"$have_ftgl" = x"yes" ; then
AC_DEFINE([HAVE_FTGL], [], [If set, we can call FTGL.h])
fi
dnl Check the GLX header on Unix platform.
if test x"$platform" != x"win32" ; then
ac_save_CPPFLAGS="${CPPFLAGS}"
CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}"
AC_CHECK_HEADER([GL/glx.h], [glxh="yes"], [glxh="no"])
CPPFLAGS="${ac_save_CPPFLAGS}"
if test "$glxh" = "no" ; then
AC_MSG_ERROR(["No 'GL/glx.h' header file."])
fi
dnl Test the Pbuffer availability.
LIBS_SVG="$LIBS"
LIBS="$LIBS $GLU_LIBS"
AC_CHECK_FUNCS([glXChooseFBConfig glXGetVisualFromFBConfig glXCreatePbuffer],
[], [ac_have_pbuffer=no])
LIBS="$LIBS_SVG"
if test x"$ac_have_pbuffer" != x"no" ; then
AC_DEFINE([HAVE_PBUFFER], [1], ["Will use Pbuffer from GLX 1.3 for pixmap rendering."])
fi
fi
dnl Add the languages which your application supports here.
AC_PROG_INTLTOOL([0.35.0])
GETTEXT_PACKAGE=$PACKAGE_TARNAME
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
AM_GLIB_GNU_GETTEXT
dnl checking for glib and gtk
if test x"$platform" = x"win32" ; then
if test -z "$PKG_CONFIG_PATH" ; then
export PKG_CONFIG_PATH=/usr/i686-w64-mingw32/lib/pkgconfig/
fi
fi
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.2.0 gmodule-2.0 gobject-2.0 gthread-2.0)
PKG_CHECK_MODULES(CAIRO, cairo, [have_cairo=yes], [have_cairo=no])
if test x"$have_cairo" = x"yes" ; then
AC_DEFINE([HAVE_CAIRO], [], [If set, we can call cairo.h])
fi
AC_ARG_WITH(gtk3, AS_HELP_STRING([--with-gtk3], [use Gtk3 instead of Gtk2.]), [ac_required_gtk="gtk+-3.0 >= 3.0.2"], [ac_required_gtk="gtk+-2.0 >= 2.4.0"])
opengl="built-in"
dnl Look for gtkglext support and create the GTKS_CFLAGS and GTKS_LIBS variables.
AC_ARG_WITH(gtkglext, AS_HELP_STRING([--with-gtkglext], [use GtkGlExt as rendering surface for OpenGl.]), [WITH_GTK_GL_EXT=$withval], [WITH_GTK_GL_EXT=""])
if test -n "$WITH_GTK_GL_EXT" -a "$WITH_GTK_GL_EXT" != "no" ; then
PKG_CHECK_MODULES(GTKS, gtkglext-1.0 >= 1.0.0 glib-2.0 >= 2.2.0 ${ac_required_gtk} gmodule-2.0 gobject-2.0 gthread-2.0)
opengl="GtkGlExt"
AC_DEFINE([HAVE_GTKGLEXT], [], [If set, we can call gtkgl.h])
fi
AM_CONDITIONAL(OPENGL_BUILTIN_WIN32, test "$define_win32" = "1")
AM_CONDITIONAL(OPENGL_BUILTIN_X11, test "$define_X11" = "1" -a "$opengl" = "built-in")
AM_CONDITIONAL(OPENGL_GTKGLEXT, test "$define_X11" = "1" -a "$opengl" = "GtkGlExt")
if test "$opengl" != "GtkGlExt" ; then
PKG_CHECK_MODULES(GTKS, glib-2.0 >= 2.2.0 ${ac_required_gtk} gmodule-2.0 gobject-2.0 gthread-2.0)
dnl Add -lX11 if missing.
if test "$define_X11" = "1" ; then
lx="False"
for fl in $GLU_LIBS ; do
if test x"$fl" = x"-lX11" ; then
lx="True"
fi
done
if test x"$lx" = x"False" ; then
GLU_LIBS=$GLU_LIBS" -lX11"
fi
fi
fi
dnl Yaml parser
ac_use_libyaml="yes"
AC_ARG_WITH([yaml],
AS_HELP_STRING([--without-yaml], [add support of YAML for input files (default = yes).]),
[ac_use_libyaml=$withval], [ac_use_libyaml=yes])
AC_ARG_WITH([yaml-path],
AS_HELP_STRING([--with-yaml-path], [give a path to find libyaml.]),
[ac_path_yaml=$withval])
if test x"$ac_use_libyaml" != x"no" ; then
if test x"$ac_path_yaml" == x"" ; then
ac_path_yaml="/usr"
fi
LDFLAGS_SVG="$LDFLAGS"
AC_LANG_PUSH(C)
LDFLAGS="-L$ac_path_yaml/lib"
AC_CHECK_LIB([yaml], [yaml_parser_parse],
[ac_use_libyaml=yes], [ac_use_libyaml=warn])
if test x"$ac_use_libyaml" = x"yes"; then
if test x"$ac_path_yaml" != x"/usr" ; then
LIB_YAML_CFLAGS="-I$ac_path_yaml/include"
LIB_YAML_LIBS="-L$ac_path_yaml/lib "
fi
LIB_YAML_LIBS=$LIB_YAML_LIBS"-lyaml"
fi
AC_LANG_POP(C)
LDFLAGS="$LDFLAGS_SVG"
if test x"$ac_use_libyaml" != x"yes" ; then
AC_MSG_WARN([libyaml is not available.])
else
AC_DEFINE([HAVE_YAML], [], [If set, we can call yaml.h])
fi
fi
AC_SUBST(LIB_YAML_CFLAGS)
AC_SUBST(LIB_YAML_LIBS)
dnl Python bindings
AC_ARG_ENABLE(python-module, AS_HELP_STRING([--enable-python-module], [create a Python module.]), [enable_python=$enableval], [enable_python="no"])
if test -n "$enable_python" -a "$enable_python" != "no" ; then
AM_PATH_PYTHON(2.3.5)
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
py_prefix=`$PYTHON -c "import sys; print(sys.prefix)"`
PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
PKG_CHECK_MODULES(PYGTK, pygobject-2.0 pygtk-2.0, [have_pygtk=yes], [have_pygtk=no])
if test x"$have_pygtk" = x"yes" ; then
AC_DEFINE([HAVE_PYGTK], [], [If set, we can call pygtk.h])
else
AC_MSG_WARN([header files for pygtk not installed.])
enable_python="no"
fi
fi
AM_CONDITIONAL(PYTHON_MODULE, test x"$enable_python" = x"yes")
dnl Customization of V_Sim
AC_MSG_CHECKING([for debug message])
with_debug_messages=no
define_debug=0
AC_ARG_ENABLE(debug-messages, AS_HELP_STRING([--enable-debug-messages], [compile V_Sim with all the debug strings, it is very verbose (default=no).]), with_debug_messages=$enableval, with_debug_messages=no)
AC_MSG_RESULT([$with_debug_messages])
if test "$with_debug_messages" = "yes" ; then
define_debug=1
AC_MSG_WARN([--enable-debug-messages... are you sure, this is very verbose?])
fi
dnl Building the doc
GTK_DOC_CHECK([1.3])
dnl Test for plug-ins compilation
dnl -----------------------------
dnl Nanoquanta netcdf format
AC_MSG_CHECKING([for ETSF file format support])
AC_ARG_WITH(etsf_file_format, AS_HELP_STRING([--with-etsf-file-format], [compile plug-in support for files that follow the ETSF specifications for structural positions and densities (default=no).]), [have_etsf=yes], [have_etsf=no])
AC_ARG_WITH(nanoquanta, AS_HELP_STRING([--with-nanoquanta], [deprecated, use --with-etsf-file-format instead (default=no).]), [have_nanoquanta=yes], [have_nanoquanta=no])
if test x"$have_nanoquanta" = x"yes" ; then
have_etsf="yes"
fi
AC_MSG_RESULT([$have_etsf])
if test x"$have_nanoquanta" = x"yes" ; then
AC_MSG_WARN(["--with-nanoquanta is deprecated, use --with-etsf-file-format instead."])
fi
if test "$have_etsf" = "yes" ; then
AC_CHECK_NETCDF([netcdf="yes"], [netcdf="no"], [3])
if test "$netcdf" = "yes" ; then
have_etsf="yes"
else
AC_MSG_WARN(["No 'netcdf.h' header file, libetsf.so will not be built."])
have_etsf="no"
fi
fi
AM_CONDITIONAL(HAVE_ETSF, test x"$have_etsf" = x"yes")
dnl OpenBabel wrapper
AC_MSG_CHECKING([for OpenBabel support])
AC_ARG_WITH(openbabel, AS_HELP_STRING([--with-openbabel], [compile plug-in support for a wrapper around the OpenBabel library (default=no).]), [have_openbabel=yes], [have_openbabel=no])
AC_MSG_RESULT([$have_openbabel])
if test "$have_openbabel" = "yes" ; then
PKG_CHECK_MODULES([OPENBABEL], [openbabel-3 >= 3.0.0], [ob=yes], [ob=no])
if test "$ob" = "yes" ; then
have_openbabel="yes"
need_cpp_compiler="yes"
else
AC_MSG_WARN(["No OpenBabel lib/header file found, libobloader.so will not be built."])
AC_MSG_WARN(["Maybe OpenBabel is not installed or version is to old (>=3.0 required)."])
have_openbabel="no"
fi
fi
AM_CONDITIONAL(HAVE_OPENBABEL, test x"$have_openbabel" = x"yes")
dnl XCrysDen file format
have_xsf="no"
AC_ARG_WITH(xsf, AS_HELP_STRING([--with-xsf], [compile plug-in support for files that follow the XCrysDen format for structural positions and densities (default=no).]), [have_xsf=yes], [have_xsf=no])
AC_MSG_CHECKING([for XCrysDen file support])
AC_MSG_RESULT([$have_xsf])
AM_CONDITIONAL(HAVE_XSF, test x"$have_xsf" = x"yes")
dnl Cube file format
have_cube="no"
AC_ARG_WITH(cube, AS_HELP_STRING([--with-cube], [compile plug-in support for Cube files (densities and structures) (default=no).]), [have_cube=yes], [have_cube=no])
AC_MSG_CHECKING([for Cube file support])
AC_MSG_RESULT([$have_cube])
AM_CONDITIONAL(HAVE_CUBE, test x"$have_cube" = x"yes")
dnl ABINIT input file
ac_abinit="no"
AC_CHECK_ABINIT()
if test x"$ac_abinit" = "xyes" ; then
AC_DEFINE_UNQUOTED(AB_LIBRARY_VERSION, $AB_LIBRARY_VERSION, [ABINIT library version number.])
fi
if test x"$ac_abinit_parser" = x"yes" ; then
AC_DEFINE_UNQUOTED(HAVE_ABINIT_PARSER,
"$ac_abinit_parser",
[Compile the ABINIT parser part for static linking.])
fi
AM_CONDITIONAL(HAVE_ABINIT_PARSER, test x"$ac_abinit_parser" = x"yes")
if test x"$ac_abinit_symmetry" = x"yes" ; then
AC_DEFINE_UNQUOTED(HAVE_ABINIT_SYMMETRY,
"$ac_abinit_symmetry",
[Compile the ABINIT symmetry part for static linking.])
fi
AM_CONDITIONAL(HAVE_ABINIT_SYMMETRY, test x"$ac_abinit_symmetry" = x"yes")
AC_SUBST(AB_CPPFLAGS)
AC_SUBST(AB_LIBS)
AM_CONDITIONAL(HAVE_ABINIT, test x"$ac_abinit_symmetry" = x"yes" -o x"$ac_abinit_parser" = x"yes")
dnl Archive input file support
ac_archives="no"
AC_ARG_WITH([archives],
AS_HELP_STRING([--with-archives], [add support of archives for input files.]),
[ac_archives=yes], [ac_archives=no])
if test x"$ac_archives" = x"yes" ; then
PKG_CHECK_MODULES([LIB_ARCHIVE],
[libarchive >= 2.4],
[ac_archives=yes],
[ac_archives=no])
if test x"$ac_archives" = x"yes" ; then
AC_DEFINE([HAVE_LIB_ARCHIVE], [1], [libarchive is linkable.])
else
AC_MSG_WARN([libarchive is not available])
fi
fi
AM_CONDITIONAL(HAVE_LIB_ARCHIVE, test x"$ac_archives" = x"yes")
AC_SUBST(LIB_ARCHIVE_CFLAGS)
AC_SUBST(LIB_ARCHIVE_LIBS)
dnl BigDFT support
ac_bigdft="no"
AX_CHECK_BIGDFT()
AC_SUBST(BIGDFT_CPPFLAGS)
AC_SUBST(BIGDFT_LIBS)
AM_CONDITIONAL(HAVE_BIGDFT, test x"$ac_bigdft" = x"yes")
dnl Add Introspection capabilities
GOBJECT_INTROSPECTION_REQUIRED=0.9.0
AC_SUBST(GOBJECT_INTROSPECTION_REQUIRED)
PYGOBJECT_REQUIRED=2.21.0
AC_SUBST(PYGOBJECT_REQUIRED)
AC_ARG_ENABLE([introspection],
AS_HELP_STRING([--enable-introspection], [enable GObject introspection]),
[], [enable_introspection=no])
if test "x$enable_introspection" != "xno" ; then
dnl if test "x$ac_required_gtk" != "xgtk+-3.0 >= 2.90.2" ; then
dnl AC_MSG_ERROR(["GTK+ 3.0 is required for introspection."])
dnl fi
PKG_CHECK_MODULES([GOBJECT_INTROSPECTION],
[gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_REQUIRED],
[enable_introspection=yes],
[if test "x$enable_introspection" = "xcheck"; then
enable_introspection=no
else
AC_MSG_ERROR([gobject-introspection is not available])
fi])
PKG_CHECK_MODULES([PYGOBJECT],
[pygobject-3.0 >= $PYGOBJECT_REQUIRED],
[enable_introspection=yes],
[if test "x$enable_introspection" = "xcheck"; then
enable_introspection=no
else
AC_MSG_ERROR([pygobject is not available])
fi])
fi
if test "x$enable_introspection" = "xyes" ; then
girdir=$($PKG_CONFIG --variable=girdir gobject-introspection-1.0)
AC_DEFINE([WITH_GOBJECT_INTROSPECTION], [1], [enable GObject introspection support])
AC_SUBST(GOBJECT_INTROSPECTION_CFLAGS)
AC_SUBST(GOBJECT_INTROSPECTION_LIBS)
AC_SUBST([G_IR_SCANNER], [$($PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0)])
AC_SUBST([G_IR_COMPILER], [$($PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0)])
dnl Add Python support for the PythonGI plug-in.
AM_PATH_PYTHON(2.3)
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
PYTHON_INCLUDES="`python3-config --cflags`"
AC_SUBST(PYTHON_INCLUDES)
PYTHON_LIBS="`python3-config --libs`"
AC_SUBST(PYTHON_LIBS)
AC_MSG_CHECKING(for pygobject overrides directory)
overrides_dir="`$PYTHON -c 'import gi; print(gi._overridesdir)' 2>/dev/null`"
# fallback if the previous failed
if test "x$overrides_dir" = "x" ; then
overrides_dir="${pyexecdir}/gi/overrides"
fi
if ! test -w $overrides_dir ; then
overrides_dir=${libdir}/python$PYTHON_VERSION/dist-packages/gi/overrides
fi
AC_MSG_RESULT($overrides_dir)
else
overrides_dir=${libdir}/python$PYTHON_VERSION/dist-packages/gi/overrides
fi
AM_CONDITIONAL([WITH_GOBJECT_INTROSPECTION], [test "x$enable_introspection" = "xyes"])
dnl Set CFLAGS if not already set by user
dnl Setting CFLAGS or not to avoid the -g appended by AC_PROG_CC
if test x"$cflags_set" = "x" ; then
CFLAGS="-O2"
fi
if test x"$cxxflags_set" = "x" ; then
CXXFLAGS="-O2"
fi
dnl AC_PROG_CC set the CC variable and detect if we use the GNU compiler
dnl We now append some various CFLAGS depending on platform and choice
dnl of the user.
AC_ARG_WITH(strict-cflags, AS_HELP_STRING([--with-strict-cflags], [if set or absent some correctness cflags are appended to the CFLAGS variable. Appended values dependent on the platform and code branch (default on Unix for development is Wall Wno-unused W Werror pedantic-errors).]), [STRICT_CFLAGS=$withval], [STRICT_CFLAGS="yes"])
flags='Wall W'
flags_cpp='Wall W'
if test "$GCC" = "yes" -a "$STRICT_CFLAGS" = "yes"; then
dnl Used flags for V_Sim.
if test "$PACKAGE" = "v_sim-dev" ; then
if test x"$platform" != x"win32" -a x"$platform" != x"Apple" ; then
flags=$flags' Werror pedantic-errors std=c99 g'
flags_cpp=$flags_cpp' Werror pedantic-errors std=c99 g'
fi
fi
fi
for fl in $flags ; do
case " $CFLAGS " in
*[\ \ ]-$fl[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -$fl" ;;
esac
done
for fl in $flags_cpp ; do
case " $CXXFLAGS " in
*[\ \ ]-$fl[\ \ ]*) ;;
*) CXXFLAGS="$CXXFLAGS -$fl" ;;
esac
done
AC_MSG_CHECKING([for CFLAGS used])
AC_MSG_RESULT([$CFLAGS])
AC_MSG_CHECKING([for CXXFLAGS used])
AC_MSG_RESULT([$CXXFLAGS])
dnl compatibility for very old version of autotools
if test -z "$docdir" ; then
docdir="$datadir/doc/$PACKAGE"
fi
dnl default installation directories
v_simexedir="$bindir"
AC_SUBST(v_simexedir)
v_simresourcesdir="$datadir/$PACKAGE"
AC_SUBST(v_simresourcesdir)
v_simpixmapsdir="$datadir/$PACKAGE/pixmaps"
AC_SUBST(v_simpixmapsdir)
v_simiconsdir="$datadir/pixmaps"
AC_SUBST(v_simiconsdir)
v_simlegaldir="${docdir}"
AC_SUBST(v_simlegaldir)
v_simexamplesdir="${docdir}/examples"
AC_SUBST(v_simexamplesdir)
v_simpluginsdir="$libdir/$PACKAGE/plug-ins"
AC_SUBST(v_simpluginsdir)
v_simgirdir="$datadir/gir-1.0"
AC_SUBST(v_simgirdir)
v_simtypelibsdir="$libdir/girepository-1.0"
AC_SUBST(v_simtypelibsdir)
v_simoverridesdir=$overrides_dir
AC_SUBST(v_simoverridesdir)
dnl Values of flags
AC_DEFINE_UNQUOTED(DEBUG, $define_debug, [Compile V_Sim in debug mode, very verbose.])
AC_DEFINE_UNQUOTED(SYSTEM_WIN32, $define_win32, [Target platform.])
AC_DEFINE_UNQUOTED(SYSTEM_X11, $define_X11, [Target platform.])
AC_DEFINE_UNQUOTED(V_SIM_RELEASE_DATE, "$date", [Date of version release.])
AC_OUTPUT([
Makefile
src/Makefile
lib/plug-ins/Makefile
lib/plug-ins/nanoquanta-netcdf/Makefile
lib/plug-ins/OpenBabel-wrapper/Makefile
lib/plug-ins/xsf/Makefile
lib/plug-ins/cube/Makefile
lib/plug-ins/abinit/Makefile
lib/plug-ins/python-gi/Makefile
lib/plug-ins/archives/Makefile
lib/plug-ins/bigdft/Makefile
lib/python/Makefile
lib/Makefile
etc/Makefile
etc/v_sim.rc
etc/v_sim.ini
etc/v_sim-dev.ini
pixmaps/Makefile
examples/Makefile
po/Makefile.in
Documentation/Makefile
Documentation/reference/Makefile
Documentation/reference/version
])
echo "
Configuration:
Source code location: ${srcdir}
Destination path prefix: ${prefix}
Compiler: ${CC}
CFLAGS: ${CFLAGS}
LDFLAGS: ${LDFLAGS}
GLIB-part CFLAGS: ${GLIB_CFLAGS}
GLIB-part LIBS: ${GLIB_LIBS}
GTKS-part CFLAGS: ${GTKS_CFLAGS}
GTKS-part LIBS: ${GTKS_LIBS}
OpenGL: ${opengl}
| CFLAGS: ${GLU_CFLAGS}
| LIBS: ${GLU_LIBS}
| FTGL LIBS: ${FTGL_LIBS}
Enable debug messages: ${with_debug_messages}
Enable gtk-doc: ${enable_gtk_doc}
Enable Python bindings: ${enable_python}
Enable introspection: ${enable_introspection}
Plug-ins:
With Nanoquanta support: ${have_etsf}"
if test "$have_etsf" = "yes" ; then
echo \
" | CFLAGS: ${NC_CFLAGS}
| LDFLAGS LIBS: ${NC_LDFLAGS} ${NC_LIBS}"
fi
echo " With OpenBabel support: ${have_openbabel}"
if test "$have_openbabel" = "yes" ; then
echo \
" | CFLAGS: ${OPENBABEL_CFLAGS}
| LDFLAGS LIBS: ${OPENBABEL_LIBS}"
fi
echo " With ABINIT support: ${ac_abinit}"
if test "$ac_abinit" = "yes" ; then
echo \
" | Input file support ${ac_abinit_parser}
| Symmetry analyser ${ac_abinit_symmetry}
| CFLAGS: ${AB_CPPFLAGS}
| LDFLAGS LIBS: ${AB_LIBS}"
fi
echo " With XCrysDen support: ${have_xsf}
With Cube support: ${have_cube}
With Python scripting: ${enable_introspection}"
if test "${enable_introspection}" = "yes" ; then
echo \
" | CFLAGS: ${PYTHON_INCLUDES}
| LDFLAGS LIBS: ${PYTHON_LIBS}"
fi
echo " With archive support : ${ac_archives}"
if test "${ac_archives}" = "yes" ; then
echo \
" | CFLAGS: ${LIB_ARCHIVE_CFLAGS}
| LDFLAGS LIBS: ${LIB_ARCHIVE_LIBS}"
fi
echo " With BigDFT support : ${ac_bigdft}"
if test "${ac_bigdft}" = "yes" ; then
echo \
" | CFLAGS: ${BIGDFT_CPPFLAGS}
| LDFLAGS LIBS: ${BIGDFT_LIBS}"
fi
echo \
"
Plug-ins options:
Need a C++ compiler: ${need_cpp_compiler}"
if test "$need_cpp_compiler" = "yes" ; then
echo \
" | compiler: ${CXX}
| CXXFLAGS: ${CXXFLAGS}
"
fi
|