source: git/libfac/configure.in @ 0183d6

spielwiese
Last change on this file since 0183d6 was 4a81ec, checked in by Hans Schönemann <hannes@…>, 27 years ago
* hannes/michael: libfac-0.3.0 git-svn-id: file:///usr/local/Singular/svn/trunk@708 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 2.9 KB
Line 
1dnl
2dnl Process this file with autoconf to produce a configure script.
3dnl
4
5dnl
6dnl Initialisation
7dnl
8AC_INIT(factor.h)
9
10dnl
11dnl Set up variables for Makefile.in
12dnl
13dnl Change libfac variables here:
14AC_SUBST(libfac_name)
15libfac_name="\"Factorization and characteristic sets library\""
16AC_SUBST(libfac_version)
17libfac_version="0.3.0"
18AC_SUBST(libfac_date)
19libfac_date="\"Sep 11 1997\""
20AC_SUBST(libfac_author)
21libfac_author="\"M. Messollen\""
22
23AC_SUBST(libfac)
24libfac="libfac"
25AC_SUBST(libfac_g)
26libfac_g="libfac-g"
27AC_SUBST(libsingfac)
28libsingfac="libsingfac"
29AC_SUBST(libsingfac_g)
30libsingfac_g="libsingfac-g"
31AC_SUBST(factorH)
32factorH="factor.h"
33AC_SUBST(targetname)
34
35dnl
36dnl Parse options
37dnl
38
39AC_ARG_WITH(
40  debug,
41  [  --with-debug    build with debugging options turned on])
42
43AC_ARG_WITH(
44  Singular,
45  [  --with-Singular build for use with Singular])
46
47if test "$with_Singular" = yes; then
48  AC_DEFINE(SINGULAR)
49  AC_DEFINE(NOSTREAMIO)
50  if test "$with_debug" = yes; then
51     targetname="libsingfac-g"
52  else
53     targetname="libsingfac"
54  fi
55else
56  if test "$with_debug" = yes; then
57     targetname="libfac-g"
58  else
59     targetname="libfac"
60  fi
61fi
62
63dnl
64dnl add to -I and -L, if necessary
65dnl
66if (test "x${prefix} != xNONE && test "${prefix} != "/usr/local") || \
67  test "${ac_default_prefix}" != "/usr/local" || \
68  test "${includedir}" != '${prefix}/include'; then
69  CPPFLAGS="-I${includedir} ${CPPFLAGS}"
70fi
71CPPFLAGS="-I./factor ${CPPFLAGS}"
72
73if (test "x${prefix} != xNONE && test "${prefix} != "/usr/local") || \
74  test "${ac_default_prefix}" != "/usr/local" || \
75  test "${libdir}" != '${prefix}/lib'; then
76  LDFLAGS="-L${libdir} ${LDFLAGS}"
77fi
78LDFLAGS="-L. ${LDFLAGS}"
79
80if test "${CXXFLAGS+set}" != set; then
81  ac_cxxflags_set=no
82  if test "$with_debug" = yes; then
83    CXXFLAGS="-g"
84  else
85    CXXFLAGS="-O"
86    AC_DEFINE(NDEBUG)
87  fi 
88fi
89
90dnl
91dnl Checks for programs.
92dnl
93AC_LANG_CPLUSPLUS 
94AC_PROG_CXX
95AC_REQUIRE_CPP
96AC_PROG_MAKE_SET
97AC_PROG_RANLIB
98AC_CHECK_PROG(AR,ar,ar)
99if test -z "$AR"; then
100  AC_MSG_ERROR(Need ar)
101fi
102
103dnl
104dnl programs for installation
105dnl
106dnl ac_save_path=${PATH}
107dnl PATH="$PATH:.." 
108dnl AC_PROG_INSTALL
109dnl AC_PATH_PROG(MKINSTALLDIRS, mkinstalldirs, -mkdir -p)
110dnl PATH="$ac_save_path"
111
112dnl
113dnl Checks for header files.
114dnl
115AC_CHECK_HEADER(factory.h,,AC_MSG_WARN(factory.h not found! Install factory before building libfac!))
116
117dnl
118dnl Checks for libraries.
119dnl
120
121
122dnl
123dnl Checks for typedefs, structures, and compiler characteristics.
124dnl
125AC_C_CONST
126AC_C_INLINE
127
128dnl
129dnl Last, but not least, customize CFLAGS
130dnl
131if test ${GXX} = yes; then
132  if test "$ac_cxxflags_set" = no; then
133    if test "$with_debug" = yes; then
134       CXXFLAGS="-O -g"
135    else
136       CXXFLAGS="-O3 "
137    fi
138  fi
139  CXXTEMPLFLAGS="-fno-implicit-templates"
140else
141  CXXTEMPFLAGS=""
142fi
143AC_SUBST(CXXTEMPLFLAGS)
144 
145AC_OUTPUT(Makefile)
146
147dnl
148dnl Plans:
149dnl 1) look for libraries (warn if not found) for building testprog
150dnl 1) search for perl
Note: See TracBrowser for help on using the repository browser.