source: git/Singular/svd/configure.in

spielwiese
Last change on this file was 317c14, checked in by Hans Schoenemann <hannes@…>, 18 months ago
AC_LANG_CPLUSPLUS -> AC_LANG([C++])
  • Property mode set to 100644
File size: 2.4 KB
Line 
1dnl
2dnl Process this file with autoconf to produce a configure script.
3dnl
4
5dnl
6dnl Initialisation
7dnl
8AC_INIT(svd.h)
9
10dnl
11dnl Set up variables for Makefile.in
12dnl
13dnl Change variables here:
14
15targetname=libsvd
16AC_SUBST(targetname)
17
18dnl
19dnl Parse options
20dnl
21
22AC_ARG_WITH(
23  svd,
24  [  --with-svd    build the svd libray])
25
26if test "$with_svd" = yes; then
27  AC_DEFINE(HAVE_SVD)
28fi
29
30dnl
31dnl add to -I and -L, if necessary
32dnl
33if (test "x${prefix} != xNONE && test "${prefix} != "/usr/local") || \
34  test "${ac_default_prefix}" != "/usr/local" || \
35  test "${includedir}" != '${prefix}/include'; then
36  CPPFLAGS="-I${includedir} ${CPPFLAGS}"
37fi
38
39if (test "x${prefix} != xNONE && test "${prefix} != "/usr/local") || \
40  test "${ac_default_prefix}" != "/usr/local" || \
41  test "${libdir}" != '${prefix}/lib'; then
42  LDFLAGS="-L${libdir} ${LDFLAGS}"
43fi
44LDFLAGS="-L. ${LDFLAGS}"
45
46if test "${CXXFLAGS+set}" != set; then
47  ac_cxxflags_set=no
48  if test "$with_debug" = yes; then
49    CXXFLAGS="-g"
50  else
51    CXXFLAGS="-O"
52    AC_DEFINE(NDEBUG)
53  fi
54fi
55
56#
57# - check for libraries.
58#
59AC_CHECK_LIB(mpfr, mpfr_add, , [ AC_MSG_ERROR(libmpfr not found) ])
60
61dnl
62dnl Checks for programs.
63dnl
64AC_LANG([C++])
65AC_PROG_CXX
66AC_REQUIRE_CPP
67AC_PROG_MAKE_SET
68AC_PROG_RANLIB
69AC_CHECK_PROG(AR,ar,ar)
70if test -z "$AR"; then
71  AC_MSG_ERROR(Need ar)
72fi
73
74dnl
75dnl programs for installation
76dnl
77dnl ac_save_path=${PATH}
78dnl PATH="$PATH:.."
79dnl AC_PROG_INSTALL
80dnl AC_PATH_PROG(MKINSTALLDIRS, mkinstalldirs, -mkdir -p)
81dnl PATH="$ac_save_path"
82
83dnl
84dnl Checks for header files.
85dnl
86
87dnl
88dnl Checks for libraries.
89dnl
90
91dnl
92dnl Checks for typedefs, structures, and compiler characteristics.
93dnl
94
95dnl
96dnl Last, but not least, customize CFLAGS
97dnl
98if test x${GXX} = xyes; then
99
100  if test "$ac_cxxflags_set" = no; then
101    if test "$with_debug" = yes; then
102       CXXFLAGS="-O -g"
103    else
104       CXXFLAGS="-O3 "
105    fi
106# check whether CXX accepts -fno-rtti
107AC_LANG_SAVE
108AC_LANG([C++])
109AC_MSG_CHECKING(whether gcc accepts -fno-rtti)
110tmp_flags=${CXXFLAGS}
111CXXFLAGS="${CXXFLAGS} -fno-rtti"
112AC_CACHE_VAL(ac_cv_cxx_have_rtti,
113AC_TRY_COMPILE(,,ac_cv_cxx_have_rtti=yes,ac_cv_cxx_have_rtti=no)
114)
115AC_MSG_RESULT(${ac_cv_cxx_have_rtti})
116CXXFLAGS=$tmp_flags
117if test "${ac_cv_cxx_have_rtti}" = yes; then
118CXXFLAGS="$CXXFLAGS -fno-rtti"
119fi
120
121AC_LANG_RESTORE
122
123  fi
124  CXXTEMPLFLAGS="-fno-implicit-templates"
125
126
127else
128  CXXTEMPFLAGS=""
129fi
130AC_SUBST(CXXTEMPLFLAGS)
131
132AC_OUTPUT(Makefile)
133
Note: See TracBrowser for help on using the repository browser.