2 # Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 # Copyright (C) INRIA - 2006-2008 - Sylvestre Ledru
4 # Copyright (C) DIGITEO - 2009-2010 - Sylvestre Ledru
5 # Copyright (C) Scilab Enterprises - 2015 - Clement DAVID
7 # Copyright (C) 2012 - 2016 - Scilab Enterprises
9 # This file is hereby licensed under the terms of the GNU GPL v2.0,
10 # pursuant to article 5.3.4 of the CeCILL v.2.1.
11 # This file was originally licensed under the terms of the CeCILL v2.1,
12 # and continues to be available under such terms.
13 # For more information, see the COPYING file which you should have received
14 # along with this program.
18 ### Configure.ac is used to create the configure file which will be
19 ### used by the incremental link to detect compilers, flags, linker...
20 ### Should be multiplateform
24 AC_INIT([scilab],[0],[http://bugzilla.scilab.org/])
25 AC_CONFIG_MACRO_DIR([m4])
27 # Initialise automake (foreign is low strictness)
28 AM_INIT_AUTOMAKE([foreign])
33 LT_INIT([shared disable-static dlopen])
38 # Detect C++ compiler and enforce c++11
40 AX_CXX_COMPILE_STDCXX_11(noext,mandatory)
42 # Detect Fortran Compiler (77 and 90)
44 AC_F77_LIBRARY_LDFLAGS
50 # Specify which Makefile.in should be "adapted"
51 AC_CONFIG_FILES([Makefile])
59 CFLAGS="$CFLAGS -fPIC"
60 CXXFLAGS="$CXXFLAGS -fPIC"
61 FFLAGS="$CXXFLAGS -fPIC"
62 FCFLAGS="$FCFLAGS -fPIC"
66 # Mac OS >= 10.6 need -arch xx
69 CFLAGS=" $CFLAGS -I/sw/include "
70 CPPFLAGS=" $CPPFLAGS -I/sw/include "
71 LDFLAGS=" $LDFLAGS -L/sw/lib/ "
72 CC=" $CC -arch x86_64 "
73 CXX=" $CXX -arch x86_64 "
76 # Configure the Makefile
81 echo "Options used to compile and link:"
83 echo " CFLAGS = $CFLAGS"
85 echo " CPPFLAGS = $CPPFLAGS"
86 echo " PCFLAGS = $PCFLAGS"
89 echo " LDFLAGS = $LDFLAGS"
92 echo " CXXFLAGS = $CXXFLAGS"
94 echo " FFLAGS = $FFLAGS"
95 echo " FLIBS = $FLIBS"
97 echo " FFLAGS = $FCFLAGS"
98 echo " FCLIBS = $FCLIBS"