1dnl Process this file with autoconf to produce a configure script.
2
3dnl Every `configure' script must call `AC_INIT'
4dnl $package is the name of the program
5dnl $version is its number
6dnl $bugreport is an email
7dnl $tarname is used to call the directories, ... related to the program
8AC_INIT([V_Sim], [3.8.0], [damien D caliste AT cea D fr], [v_sim])
9
10dnl Versioning
11V_SIM_MAJOR_VERSION=$(echo $PACKAGE_VERSION | cut -d'.' -f1)
12V_SIM_MINOR_VERSION=$(echo $PACKAGE_VERSION | cut -d'.' -f2)
13V_SIM_MICRO_VERSION=$(echo $PACKAGE_VERSION | cut -d'.' -f3)
14AC_SUBST(V_SIM_MAJOR_VERSION)
15AC_SUBST(V_SIM_MINOR_VERSION)
16AC_SUBST(V_SIM_MICRO_VERSION)
17dnl Some variables
18lib_v_sim_version=$V_SIM_MINOR_VERSION":0"
19AC_SUBST(lib_v_sim_version)
20need_cpp_compiler="no"
21
22dnl Save this value here, since automake will set cflags later
23cflags_set=${CFLAGS}
24cxxflags_set=${CXXFLAGS}
25
26dnl Initialize automake with same $package and $version
27AM_INIT_AUTOMAKE([subdir-objects])
28
29dnl Use a config.h file to store macro definitions
30AM_CONFIG_HEADER(config.h)
31AC_CONFIG_MACRO_DIR([m4])
32
33dnl Outputing some informations
34date="2020-07-07"
35AC_MSG_NOTICE([Compiling $PACKAGE_NAME])
36AC_MSG_NOTICE([$PACKAGE_TARNAME $PACKAGE_VERSION $date])
37
38dnl Set the default prefix
39AC_PREFIX_DEFAULT([/usr/local])
40AC_MSG_CHECKING([for instalation directory])
41AC_MSG_RESULT([$prefix])
42
43
44dnl Starting of consistency checks
45dnl ------------------------------
46
47dnl cherche un compilateur C
48dnl set the CC variable
49AC_PROG_CC
50dnl set the CXX variable
51AC_PROG_CXX
52dnl set the FC variable
53AC_PROG_F77
54AC_PROG_FC
55
56dnl If GCC is used, then we define the flag not to tag unused parameters.
57if test "$GCC" = "yes" ; then
58  AC_DEFINE([_U_], [__attribute((unused))], [Tag this parameter as unused.])
59fi
60
61dnl Using libtool to handle libraries
62AC_CHECK_TOOL(LIBTOOL, libtool, :)
63if test "$libtool" = ":" ; then
64  AC_MSG_ERROR(["No 'libtool' program found."])
65fi
66AC_LIBTOOL_WIN32_DLL
67AC_PROG_LIBTOOL
68
69dnl check for platform
70AC_MSG_CHECKING([for target architecture])
71case x"$target" in
72  xNONE | x)
73    target_or_host="$host" ;;
74  *)
75    target_or_host="$target" ;;
76esac
77AC_MSG_RESULT(['$target_or_host'])
78AC_MSG_CHECKING([for platform])
79define_win32=0
80define_X11=1
81case "$target_or_host" in
82  i686-w64-mingw32)
83    platform=win32
84    define_win32=1
85    define_X11=0
86    EXEEXT=.exe
87    FONT_NORMAL="Sans"
88    FONT_BOLD="Sans bold"
89    EXTRA_LDFLAGS="-no-undefined"
90    EXTRA_CFLAGS="-mms-bitfields"
91    EXTRA_LIBS="-lintl"
92    ;;
93  *-mingw* | *-*-cygwin*)
94    platform=win32
95    define_win32=1
96    define_X11=0
97    EXEEXT=.exe
98    FONT_NORMAL="Sans"
99    FONT_BOLD="Sans bold"
100    EXTRA_LDFLAGS="-no-undefined"
101    EXTRA_CFLAGS="-mms-bitfields -mno-cygwin"
102    EXTRA_LIBS="-lintl"
103    ;;
104  *-apple-darwin*)
105    platform=Apple
106    define_X11=1
107    define_win32=0
108    EXEEXT=
109    FONT_NORMAL="Nimbus normal"
110    FONT_BOLD="Nimbus bold"
111    EXTRA_LDFLAGS=
112    EXTRA_LIBS="-dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
113    EXTRA_CFLAGS=
114    ;;
115  *)
116    platform=X11
117    define_X11=1
118    define_win32=0
119    EXEEXT=
120    FONT_NORMAL="Nimbus normal"
121    FONT_BOLD="Nimbus bold"
122    EXTRA_LDFLAGS=
123    EXTRA_CFLAGS=
124    ;;
125esac
126AC_MSG_RESULT([$platform])
127AC_SUBST(FONT_NORMAL)
128AC_SUBST(FONT_BOLD)
129AC_SUBST(EXTRA_LDFLAGS)
130AC_SUBST(EXTRA_CFLAGS)
131AC_SUBST(EXTRA_LIBS)
132AC_SUBST(EXEEXT)
133AM_CONDITIONAL(PLATFORM_X11, test "$define_X11" = "1")
134AM_CONDITIONAL(PLATFORM_WIN32, test "$define_win32" = "1")
135AM_CONDITIONAL(BUILD_STATIC_BINARY, test "$define_X11" = "1")
136AM_CONDITIONAL(BUILD_SHARED_BINARY, test "$define_win32" = "1")
137
138dnl Check the GL header and lib.
139if test x"$platform" = x"Apple" ; then
140  LIBS_SVG="$LIBS"
141  LIBS="$EXTRA_LIBS $LIBS"
142fi
143AX_CHECK_GL()
144if test x"$no_gl" = x"yes" ; then
145  AC_MSG_ERROR(["No GL implementation (header or library issues)."])
146fi
147
148dnl Check the GLU header and lib.
149AX_CHECK_GLU()
150if test x"$no_glu" = x"yes" ; then
151  AC_MSG_ERROR(["No GLU implementation (header or library issues)."])
152fi
153if test x"$platform" = x"Apple" ; then
154  LIBS="$LIBS_SVG"
155fi
156
157dnl Look for FTGL
158PKG_CHECK_MODULES(FTGL, ftgl, [have_ftgl=yes], [have_ftgl=no])
159if test x"$have_ftgl" = x"yes" ; then
160  AC_DEFINE([HAVE_FTGL], [], [If set, we can call FTGL.h])
161fi
162
163dnl Check the GLX header on Unix platform.
164if test x"$platform" != x"win32" ; then
165  ac_save_CPPFLAGS="${CPPFLAGS}"
166  CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}"
167  AC_CHECK_HEADER([GL/glx.h], [glxh="yes"], [glxh="no"])
168  CPPFLAGS="${ac_save_CPPFLAGS}"
169  if test "$glxh" = "no" ; then
170    AC_MSG_ERROR(["No 'GL/glx.h' header file."])
171  fi
172  dnl Test the Pbuffer availability.
173  LIBS_SVG="$LIBS"
174  LIBS="$LIBS $GLU_LIBS"
175  AC_CHECK_FUNCS([glXChooseFBConfig glXGetVisualFromFBConfig glXCreatePbuffer],
176                 [], [ac_have_pbuffer=no])
177  LIBS="$LIBS_SVG"
178  if test x"$ac_have_pbuffer" != x"no" ; then
179    AC_DEFINE([HAVE_PBUFFER], [1], ["Will use Pbuffer from GLX 1.3 for pixmap rendering."])
180  fi
181fi
182
183dnl Add the languages which your application supports here.
184AC_PROG_INTLTOOL([0.35.0])
185
186GETTEXT_PACKAGE=$PACKAGE_TARNAME
187AC_SUBST(GETTEXT_PACKAGE)
188AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
189
190AM_GLIB_GNU_GETTEXT
191
192dnl checking for glib and gtk
193if test x"$platform" = x"win32" ; then
194   if test -z "$PKG_CONFIG_PATH" ; then
195      export PKG_CONFIG_PATH=/usr/i686-w64-mingw32/lib/pkgconfig/
196   fi
197fi
198PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.2.0 gmodule-2.0 gobject-2.0 gthread-2.0)
199PKG_CHECK_MODULES(CAIRO, cairo, [have_cairo=yes], [have_cairo=no])
200if test x"$have_cairo" = x"yes" ; then
201  AC_DEFINE([HAVE_CAIRO], [], [If set, we can call cairo.h])
202fi
203
204AC_ARG_WITH(gtk2, AS_HELP_STRING([--with-gtk2], [use Gtk2 instead of Gtk3.]), [ac_required_gtk="gtk+-2.0 >= 2.4.0"], [ac_required_gtk="gtk+-3.0 >= 3.0.2"])
205
206
207opengl="built-in"
208dnl Look for gtkglext support and create the GTKS_CFLAGS and GTKS_LIBS variables.
209AC_ARG_WITH(gtkglext, AS_HELP_STRING([--with-gtkglext], [use GtkGlExt as rendering surface for OpenGl.]), [WITH_GTK_GL_EXT=$withval], [WITH_GTK_GL_EXT=""])
210if test -n "$WITH_GTK_GL_EXT" -a "$WITH_GTK_GL_EXT" != "no" ; then
211  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)
212  opengl="GtkGlExt"
213  AC_DEFINE([HAVE_GTKGLEXT], [], [If set, we can call gtkgl.h])
214fi
215AM_CONDITIONAL(OPENGL_BUILTIN_WIN32, test "$define_win32" = "1")
216AM_CONDITIONAL(OPENGL_BUILTIN_X11,   test "$define_X11" = "1" -a "$opengl" = "built-in")
217AM_CONDITIONAL(OPENGL_GTKGLEXT, test "$define_X11" = "1" -a "$opengl" = "GtkGlExt")
218if test "$opengl" != "GtkGlExt" ; then
219  PKG_CHECK_MODULES(GTKS, glib-2.0 >= 2.2.0 ${ac_required_gtk} gmodule-2.0 gobject-2.0 gthread-2.0)
220  dnl Add -lX11 if missing.
221  if test "$define_X11" = "1" ; then
222    lx="False"
223    for fl in $GLU_LIBS ; do
224      if test x"$fl" = x"-lX11" ; then
225        lx="True"
226      fi
227    done
228    if test x"$lx" = x"False" ; then
229      GLU_LIBS=$GLU_LIBS" -lX11"
230    fi
231  fi
232fi
233
234dnl C-level YAML support.
235AX_YAML()
236if test x"$ax_have_yaml" != x"yes" ; then
237  AC_MSG_WARN([libyaml is not available.])
238else
239  AC_DEFINE([HAVE_YAML], [], [If set, we can call yaml.h])
240fi
241
242dnl Python bindings
243AC_ARG_ENABLE(python-module, AS_HELP_STRING([--enable-python-module], [create a Python module.]), [enable_python=$enableval], [enable_python="no"])
244if test -n "$enable_python" -a "$enable_python" != "no" ; then
245  AM_PATH_PYTHON(2.3.5)
246  AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
247  py_prefix=`$PYTHON -c "import sys; print (sys.prefix)"`
248  PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
249
250  PKG_CHECK_MODULES(PYGTK, pygobject-2.0 pygtk-2.0, [have_pygtk=yes], [have_pygtk=no])
251  if test x"$have_pygtk" = x"yes" ; then
252    AC_DEFINE([HAVE_PYGTK], [], [If set, we can call pygtk.h])
253  else
254    AC_MSG_WARN([header files for pygtk not installed.])
255    enable_python="no"
256  fi
257fi
258AM_CONDITIONAL(PYTHON_MODULE, test x"$enable_python" = x"yes")
259
260dnl Customization of V_Sim
261AC_MSG_CHECKING([for debug message])
262with_debug_messages=no
263define_debug=0
264AC_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)
265AC_MSG_RESULT([$with_debug_messages])
266if test "$with_debug_messages" = "yes" ; then
267  define_debug=1
268  AC_MSG_WARN([--enable-debug-messages... are you sure, this is very verbose?])
269fi
270
271dnl Building the doc
272
273
274dnl Test for plug-ins compilation
275dnl -----------------------------
276dnl Nanoquanta netcdf format
277AC_MSG_CHECKING([for ETSF file format support])
278AC_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])
279AC_ARG_WITH(nanoquanta, AS_HELP_STRING([--with-nanoquanta], [deprecated, use --with-etsf-file-format instead (default=no).]), [have_nanoquanta=$withval], [have_nanoquanta=no])
280if test x"$have_nanoquanta" = x"yes" ; then
281  have_etsf="yes"
282fi
283AC_MSG_RESULT([$have_etsf])
284if test x"$have_nanoquanta" = x"yes" ; then
285  AC_MSG_WARN(["--with-nanoquanta is deprecated, use --with-etsf-file-format instead."])
286fi
287if test "$have_etsf" = "yes" ; then
288  AC_CHECK_NETCDF([netcdf="yes"], [netcdf="no"], [3])
289  if test "$netcdf" = "yes" ; then
290    have_etsf="yes"
291  else
292    AC_MSG_WARN(["No 'netcdf.h' header file, libetsf.so will not be built."])
293    have_etsf="no"
294  fi
295fi
296AM_CONDITIONAL(HAVE_ETSF, test x"$have_etsf" = x"yes")
297
298dnl OpenBabel wrapper
299AC_MSG_CHECKING([for OpenBabel support])
300AC_ARG_WITH(openbabel, AS_HELP_STRING([--with-openbabel], [compile plug-in support for a wrapper around the OpenBabel library (default=no).]), [have_openbabel=$withval], [have_openbabel=no])
301AC_MSG_RESULT([$have_openbabel])
302if test "$have_openbabel" = "yes" ; then
303  PKG_CHECK_MODULES([OPENBABEL], [openbabel-3 >= 3.0.0], [ob=yes], [ob=no])
304  if test "$ob" = "yes" ; then
305    have_openbabel="yes"
306    need_cpp_compiler="yes"
307  else
308    AC_MSG_WARN(["No OpenBabel lib/header file found, libobloader.so will not be built."])
309    AC_MSG_WARN(["Maybe OpenBabel is not installed or version is to old (>=3.0 required)."])
310    have_openbabel="no"
311  fi
312fi
313AM_CONDITIONAL(HAVE_OPENBABEL, test x"$have_openbabel" = x"yes")
314
315dnl XCrysDen file format
316have_xsf="no"
317AC_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=$withval], [have_xsf=no])
318AC_MSG_CHECKING([for XCrysDen file support])
319AC_MSG_RESULT([$have_xsf])
320AM_CONDITIONAL(HAVE_XSF, test x"$have_xsf" = x"yes")
321
322dnl Cube file format
323have_cube="yes"
324AC_ARG_WITH(cube, AS_HELP_STRING([--without-cube], [compile plug-in support for Cube files (densities and structures) (default=yes).]), [have_cube=$withval], [have_cube=no])
325AC_MSG_CHECKING([for Cube file support])
326AC_MSG_RESULT([$have_cube])
327AM_CONDITIONAL(HAVE_CUBE, test x"$have_cube" = x"yes")
328
329dnl ABINIT input file
330ac_abinit="no"
331AC_CHECK_ABINIT()
332if test x"$ac_abinit_parser" = x"yes" ; then
333  AC_DEFINE_UNQUOTED(AB_LIBRARY_VERSION, $AB_LIBRARY_VERSION, [ABINIT library version number.])
334  AC_DEFINE_UNQUOTED(HAVE_ABINIT_PARSER,
335    "$ac_abinit_parser",
336    [Compile the ABINIT parser part for static linking.])
337fi
338AM_CONDITIONAL(HAVE_ABINIT_PARSER, test x"$ac_abinit_parser" = x"yes")
339AC_SUBST(AB_CPPFLAGS)
340AC_SUBST(AB_LIBS)
341AM_CONDITIONAL(HAVE_ABINIT, test x"$ac_abinit" = x"yes")
342
343dnl libmsym point group symmetry library
344AC_CHECK_MSYM()
345AC_SUBST(MSYM_CPPFLAGS)
346AC_SUBST(MSYM_LIBS)
347AM_CONDITIONAL(BUILTIN_MSYM, test x"$ac_msym" = x"builtin")
348AM_CONDITIONAL(HAVE_MSYM, test x"$ac_msym" = x"yes" -o x"$ac_msym" = x"builtin")
349
350dnl Archive input file support
351ac_archives="yes"
352AC_ARG_WITH([archives],
353            AS_HELP_STRING([--without-archives], [add support of compression for input files (default=yes).]),
354            [ac_archives=$withval], [ac_archives=yes])
355if test x"$ac_archives" = x"yes" ; then
356   PKG_CHECK_MODULES([LIB_ARCHIVE],
357                     [libarchive >= 2.8],
358                     [ac_archives=yes],
359                     [ac_archives=no])
360   if test x"$ac_archives" = x"yes" ; then
361      AC_DEFINE([HAVE_LIB_ARCHIVE], [1], [libarchive is linkable.])
362   else
363      AC_MSG_WARN([libarchive is not available])
364   fi
365fi
366AM_CONDITIONAL(HAVE_LIB_ARCHIVE, test x"$ac_archives" = x"yes")
367AC_SUBST(LIB_ARCHIVE_CFLAGS)
368AC_SUBST(LIB_ARCHIVE_LIBS)
369
370dnl CrystalFp library support
371ac_crystalfp="no"
372AC_ARG_WITH([crystal-fp],
373            AS_HELP_STRING([--with-crystal-fp], [add support crystal fingerprint calculation.]),
374            [ac_crystalfp=$withval], [ac_crystalfp=no])
375if test x"$ac_crystalfp" != x"no" ; then
376  CRYSTALFP_CXXFLAGS="-I$ac_crystalfp"
377  CRYSTALFP_LIBS="-L$ac_crystalfp -lCrystalFp"
378  ac_crystalfp="yes"
379fi
380AM_CONDITIONAL(HAVE_CRYSTALFP, test x"$ac_crystalfp" = x"yes")
381AC_SUBST(CRYSTALFP_CXXFLAGS)
382AC_SUBST(CRYSTALFP_LIBS)
383
384dnl BigDFT support
385ac_bigdft="no"
386AX_CHECK_BIGDFT()
387AC_SUBST(BIGDFT_CPPFLAGS)
388AC_SUBST(BIGDFT_LIBS)
389AM_CONDITIONAL(HAVE_BIGDFT, test x"$ac_bigdft" = x"yes")
390
391dnl Add Introspection capabilities
392GOBJECT_INTROSPECTION_REQUIRED=0.9.0
393AC_SUBST(GOBJECT_INTROSPECTION_REQUIRED)
394PYGOBJECT_REQUIRED=2.21.0
395AC_SUBST(PYGOBJECT_REQUIRED)
396
397AC_ARG_ENABLE([introspection],
398AS_HELP_STRING([--disable-introspection], [disable GObject introspection]),
399[], [enable_introspection=yes])
400
401if test "x$enable_introspection" != "xno" ; then
402  dnl if test "x$ac_required_gtk" != "xgtk+-3.0 >= 2.90.2" ; then
403  dnl   AC_MSG_ERROR(["GTK+ 3.0 is required for introspection."])
404  dnl fi
405  PKG_CHECK_MODULES([GOBJECT_INTROSPECTION],
406                    [gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_REQUIRED],
407                    [enable_introspection=yes],
408                    [enable_introspection=no])
409  PKG_CHECK_MODULES([PYGOBJECT],
410                    [pygobject-3.0 >= $PYGOBJECT_REQUIRED],
411                    [],
412                    [enable_introspection=no])
413fi
414if test "x$enable_introspection" = "xyes" ; then
415  girdir=$($PKG_CONFIG --variable=girdir gobject-introspection-1.0)
416  AC_DEFINE([WITH_GOBJECT_INTROSPECTION], [1], [enable GObject introspection support])
417  AC_SUBST(GOBJECT_INTROSPECTION_CFLAGS)
418  AC_SUBST(GOBJECT_INTROSPECTION_LIBS)
419  AC_SUBST([G_IR_SCANNER], [$($PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0)])
420  AC_SUBST([G_IR_COMPILER], [$($PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0)])
421
422  dnl Add Python support for the PythonGI plug-in.
423  AM_PATH_PYTHON(2.3)
424  AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
425  PYTHON_INCLUDES="`${PYTHON}-config --cflags`"
426  AC_SUBST(PYTHON_INCLUDES)
427  PYTHON_LIBS="`${PYTHON}-config --libs`"
428  AC_SUBST(PYTHON_LIBS)
429
430  AC_MSG_CHECKING(for pygobject overrides directory)
431  overrides_dir="`$PYTHON -c 'import gi; print(gi._overridesdir)' 2>/dev/null`"
432  # fallback if the previous failed
433  if test "x$overrides_dir" = "x" ; then
434    overrides_dir="${pyexecdir}/gi/overrides"
435  fi
436  # Do not test -w $overrides_dir to allow build as non-root
437  #if ! test -w $overrides_dir ; then
438  #  overrides_dir=${libdir}/python$PYTHON_VERSION/dist-packages/gi/overrides
439  #fi
440  AC_MSG_RESULT($overrides_dir)
441else
442  overrides_dir=${libdir}/python$PYTHON_VERSION/dist-packages/gi/overrides
443fi
444AM_CONDITIONAL([WITH_GOBJECT_INTROSPECTION], [test "x$enable_introspection" = "xyes"])
445
446dnl AC_PROG_CC set the CC variable and detect if we use the GNU compiler
447dnl We now append some various CFLAGS depending on platform and choice
448dnl of the user.
449AC_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 ansi ).]), [STRICT_CFLAGS=$withval], [STRICT_CFLAGS="no"])
450flags='Wall W ansi std=c99'
451flags_cpp='Wall W'
452if test "$GCC" = "yes" -a "$STRICT_CFLAGS" = "yes"; then
453  flags=$flags' std=c99'
454  flags_cpp=$flags_cpp' '
455fi
456for fl in $flags ; do
457  case " $CFLAGS " in
458  *[\ \	]-$fl[\ \	]*) ;;
459  *) CFLAGS="$CFLAGS -$fl" ;;
460  esac
461done
462for fl in $flags_cpp ; do
463  case " $CXXFLAGS " in
464  *[\ \	]-$fl[\ \	]*) ;;
465  *) CXXFLAGS="$CXXFLAGS -$fl" ;;
466  esac
467done
468AC_MSG_CHECKING([for CFLAGS used])
469AC_MSG_RESULT([$CFLAGS])
470AC_MSG_CHECKING([for CXXFLAGS used])
471AC_MSG_RESULT([$CXXFLAGS])
472
473dnl compatibility for very old version of autotools
474if test -z "$docdir" ; then
475  docdir="$datadir/doc/$PACKAGE"
476fi
477
478dnl default installation directories
479v_simexedir="$bindir"
480AC_SUBST(v_simexedir)
481v_simresourcesdir="$datadir/$PACKAGE"
482AC_SUBST(v_simresourcesdir)
483v_simpixmapsdir="$datadir/$PACKAGE/pixmaps"
484AC_SUBST(v_simpixmapsdir)
485v_simiconsdir="$datadir/pixmaps"
486AC_SUBST(v_simiconsdir)
487v_simlegaldir="${docdir}"
488AC_SUBST(v_simlegaldir)
489v_simexamplesdir="${docdir}/examples"
490AC_SUBST(v_simexamplesdir)
491v_simpluginsdir="$libdir/$PACKAGE/plug-ins"
492AC_SUBST(v_simpluginsdir)
493v_simgirdir="$datadir/gir-1.0"
494AC_SUBST(v_simgirdir)
495v_simtypelibsdir="$libdir/girepository-1.0"
496AC_SUBST(v_simtypelibsdir)
497v_simoverridesdir=$overrides_dir
498AC_SUBST(v_simoverridesdir)
499
500dnl Values of flags
501AC_DEFINE_UNQUOTED(DEBUG, $define_debug, [Compile V_Sim in debug mode, very verbose.])
502AC_DEFINE_UNQUOTED(SYSTEM_WIN32, $define_win32, [Target platform.])
503AC_DEFINE_UNQUOTED(SYSTEM_X11, $define_X11, [Target platform.])
504AC_DEFINE_UNQUOTED(V_SIM_RELEASE_DATE, "$date", [Date of version release.])
505
506AC_OUTPUT([
507Makefile
508src/Makefile
509lib/plug-ins/Makefile
510lib/plug-ins/nanoquanta-netcdf/Makefile
511lib/plug-ins/OpenBabel-wrapper/Makefile
512lib/plug-ins/xsf/Makefile
513lib/plug-ins/cube/Makefile
514lib/plug-ins/abinit/Makefile
515lib/plug-ins/python-gi/Makefile
516lib/plug-ins/archives/Makefile
517lib/plug-ins/bigdft/Makefile
518lib/plug-ins/fpcrystal/Makefile
519lib/plug-ins/msym/Makefile
520lib/python/Makefile
521lib/Makefile
522etc/Makefile
523etc/v_sim.rc
524etc/v_sim.ini
525pixmaps/Makefile
526examples/Makefile
527po/Makefile.in
528Documentation/Makefile
529Documentation/reference/Makefile
530Documentation/reference/version
531tests/Makefile
532tests/core/Makefile
533])
534
535echo "
536Configuration:
537
538    Source code location:     ${srcdir}
539    Destination path prefix:  ${prefix}
540    Compiler:                 ${CC}
541    CFLAGS:                   ${CFLAGS}
542    LDFLAGS:                  ${LDFLAGS}
543    GLIB-part CFLAGS:         ${GLIB_CFLAGS}
544    GLIB-part LIBS:           ${GLIB_LIBS}
545    GTKS-part CFLAGS:         ${GTKS_CFLAGS}
546    GTKS-part LIBS:           ${GTKS_LIBS}
547
548    OpenGL:                   ${opengl}
549     | CFLAGS:                ${GLU_CFLAGS}
550     | LIBS:                  ${GLU_LIBS}
551     | FTGL LIBS:             ${FTGL_LIBS}
552
553    Enable debug messages:    ${with_debug_messages}
554    Enable gtk-doc:           ${enable_gtk_doc}
555    Enable introspection:     ${enable_introspection}
556
557    Plug-ins:
558    With Nanoquanta support:  ${have_etsf}"
559if test "$have_etsf" = "yes" ; then
560echo \
561"     | CFLAGS:                ${NC_CFLAGS}
562     | LDFLAGS LIBS:          ${NC_LDFLAGS} ${NC_LIBS}"
563fi
564echo "    With OpenBabel support:   ${have_openbabel}"
565if test "$have_openbabel" = "yes" ; then
566echo \
567"     | CFLAGS:                ${OPENBABEL_CFLAGS}
568     | LDFLAGS LIBS:          ${OPENBABEL_LIBS}"
569fi
570echo "    With ABINIT support:      ${ac_abinit}"
571if test "$ac_abinit" = "yes" ; then
572echo \
573"     | Input file support     ${ac_abinit_parser}
574     | Symmetry analyser      built-in
575     | CFLAGS:                ${AB_CPPFLAGS}
576     | LDFLAGS LIBS:          ${AB_LIBS}"
577fi
578echo "    With XCrysDen support:    ${have_xsf}
579    With Cube support:        ${have_cube}
580    With Python scripting:    ${enable_introspection}"
581if test "${enable_introspection}" = "yes" ; then
582echo \
583"     | CFLAGS:                ${PYTHON_INCLUDES}
584     | LDFLAGS LIBS:          ${PYTHON_LIBS}"
585fi
586echo "    With archive support :    ${ac_archives}"
587if test "${ac_archives}" = "yes" ; then
588echo \
589"     | CFLAGS:                ${LIB_ARCHIVE_CFLAGS}
590     | LDFLAGS LIBS:          ${LIB_ARCHIVE_LIBS}"
591fi
592echo "    With BigDFT support :     ${ac_bigdft}"
593if test "${ac_bigdft}" = "yes" ; then
594echo \
595"     | CFLAGS:                ${BIGDFT_CPPFLAGS}
596     | LDFLAGS LIBS:          ${BIGDFT_LIBS}"
597fi
598echo "    With CrystalFp lib  :     ${ac_crystalfp}"
599if test "${ac_crystalfp}" = "yes" ; then
600echo \
601"     | CXXFLAGS:              ${CRYSTALFP_CXXFLAGS}
602     | LDFLAGS LIBS:          ${CRYSTALFP_LIBS}"
603fi
604echo "    With msym lib       :     ${ac_msym}"
605if test "${ac_msym}" = "yes" ; then
606echo \
607"     | CPPFLAGS:              ${MSYM_CPPFLAGS}
608     | LDFLAGS LIBS:          ${MSYM_LIBS}"
609fi
610echo \
611"
612    Plug-ins options:
613    Need a C++ compiler:      ${need_cpp_compiler}"
614if test "$need_cpp_compiler" = "yes" ; then
615echo \
616"     | compiler:              ${CXX}
617     | CXXFLAGS:              ${CXXFLAGS}
618"
619fi
620