source: git/libfac/configure.in @ 99be05

spielwiese
Last change on this file since 99be05 was 99be05, checked in by Olaf Bachmann <obachman@…>, 27 years ago
* merged fixes from 1-0 branch git-svn-id: file:///usr/local/Singular/svn/trunk@357 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 2.5 KB
Line 
1dnl
2dnl Process this file with autoconf to produce a configure script.
3dnl
4
5AC_INIT(factor.h)
6
7dnl
8dnl Set up variables for Makefile.in
9dnl
10AC_SUBST(libfacversion)
11libfacversion="0.2.2"
12AC_SUBST(libfac)
13libfac="libfac"
14AC_SUBST(libfac_g)
15libfac_g="libfac-g"
16AC_SUBST(libsingfac)
17libsingfac="libsingfac"
18AC_SUBST(libsingfac_g)
19libsingfac_g="libsingfac-g"
20AC_SUBST(factorH)
21factorH="factor.h"
22AC_SUBST(targetname)
23
24dnl
25dnl Parse options
26dnl
27
28AC_ARG_WITH(
29  debug,
30  [  --with-debug    build with debugging options turned on])
31
32AC_ARG_WITH(
33  Singular,
34  [  --with-Singular build for use with Singular])
35
36if test "$with_Singular" = yes; then
37  AC_DEFINE(HAVE_SINGULAR)
38  if test "$with_debug" = yes; then
39     targetname="libsingfac-g"
40  else
41     targetname="libsingfac"
42  fi
43else
44  if test "$with_debug" = yes; then
45     targetname="libfac-g"
46  else
47     targetname="libfac"
48  fi
49fi
50
51dnl
52dnl add to -I and -L, if necessary
53dnl
54if (test "x${prefix} != xNONE && test "${prefix} != "/usr/local") || \
55  test "${ac_default_prefix}" != "/usr/local" || \
56  test "${includedir}" != '${prefix}/include'; then
57  CPPFLAGS="-I${includedir} ${CPPFLAGS}"
58fi
59CPPFLAGS="-I./factor ${CPPFLAGS}"
60
61if (test "x${prefix} != xNONE && test "${prefix} != "/usr/local") || \
62  test "${ac_default_prefix}" != "/usr/local" || \
63  test "${libdir}" != '${prefix}/lib'; then
64  LDFLAGS="-L${libdir} ${LDFLAGS}"
65fi
66LDFLAGS="-L. ${LDFLAGS}"
67
68if test "${CXXFLAGS+set}" != set; then
69  ac_cxxflags_set=no
70  if test "$with_debug" = yes; then
71    CXXFLAGS="-g"
72  else
73    CXXFLAGS="-O"
74    AC_DEFINE(NDEBUG) 
75  fi
76fi
77
78
79dnl
80dnl Checks for programs.
81dnl
82AC_LANG_CPLUSPLUS 
83AC_PROG_CXX
84AC_REQUIRE_CPP
85AC_PROG_MAKE_SET
86AC_PROG_RANLIB
87AC_CHECK_PROG(AR,ar,ar)
88if test -z "$AR"; then
89  AC_MSG_ERROR(Need ar)
90fi
91
92dnl
93dnl Checks for header files.
94dnl
95AC_CHECK_HEADERS(factory.h)
96
97if test "$ac_cv_header_factory_h" != yes; then
98  if test "$enable_factory" != yes; then
99    AC_MSG_ERROR(Need factory.h to built libfac)
100  else
101    AC_MSG_WARN(Make sure to _install_ factory.h befor building libfac)
102  fi
103fi
104
105dnl
106dnl Checks for libraries.
107dnl
108
109
110dnl
111dnl Checks for typedefs, structures, and compiler characteristics.
112dnl
113AC_C_CONST
114AC_C_INLINE
115
116dnl
117dnl Last, but not least, customize CFLAGS
118dnl
119if test ${GXX} = yes; then
120  if test "$ac_cxxflags_set" = no; then
121    if test "$with_debug" = yes; then
122      CXXFLAGS="-O -g"
123    else
124      CXXFLAGS="-O3 "
125    fi
126  fi
127  CXXTEMPLFLAGS="-fno-implicit-templates"
128else
129  CXXTEMPFLAGS=""
130fi
131AC_SUBST(CXXTEMPLFLAGS)
132 
133AC_OUTPUT(Makefile)
Note: See TracBrowser for help on using the repository browser.