source: git/misc/configure.in @ f093ba

spielwiese
Last change on this file since f093ba was 7b05b5, checked in by Mohamed Barakat <mohamed.barakat@…>, 13 years ago
new configure(.in) in omalloc and misc defaults: --prefix=/usr/local --includedir=${prefix}/include/${project}/${component} --libdir=${prefix}/lib/${project}/${component}
  • Property mode set to 100644
File size: 2.7 KB
Line 
1#                                               -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ([2.65])
5AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])
6AC_CONFIG_SRCDIR([mylimits.h])
7AC_CONFIG_HEADERS([auxiliary.h])
8
9# Checks for programs.
10AC_PROG_CC
11AC_PROG_CXX
12AC_PROG_LN_S
13AC_PROG_INSTALL
14
15# Checks for libraries.
16
17# Checks for header files.
18AC_CHECK_HEADERS([limits.h])
19
20# Checks for typedefs, structures, and compiler characteristics.
21AC_C_INLINE
22
23# Checks for library functions.
24AC_MSG_CHECKING(CPU for singular)
25
26# check for cpu properties:
27AC_CHECK_SIZEOF(long,4)
28
29# UNAME and PATH
30ac_cv_singcpuname=`uname -m`
31AC_MSG_RESULT($ac_cv_singcpuname)
32
33if test "$ac_cv_singuname" = ix86-Win; then
34  EXEC_EXT=".exe"
35  AC_DEFINE(SI_CPU_I386)
36  AC_SUBST(SI_CPU_I386)
37fi
38AC_SUBST(EXEC_EXT)
39if test "$ac_cv_singuname" = x86_64-Linux; then
40  AC_DEFINE(SI_CPU_X86_64)
41  AC_SUBST(SI_CPU_X86_64)
42fi
43if test "$ac_cv_singuname" = ix86-Linux; then
44  AC_DEFINE(SI_CPU_I386)
45  AC_SUBST(SI_CPU_I386)
46fi
47if test "$ac_cv_singuname" = IA64-Linux; then
48  AC_DEFINE(SI_CPU_IA64)
49  AC_SUBST(SI_CPU_IA64)
50fi
51if test "$ac_cv_singuname" = ppc-Linux; then
52  AC_DEFINE(SI_CPU_PPC)
53  AC_SUBST(SI_CPU_PPC)
54fi
55if test "$ac_cv_singuname" = ppcMac-darwin; then
56  AC_DEFINE(SI_CPU_PPC)
57  AC_SUBST(SI_CPU_PPC)
58fi
59# test again with CPU names
60if test "$ac_cv_singcpuname" = i386; then
61  AC_DEFINE(SI_CPU_I386)
62  AC_SUBST(SI_CPU_I386)
63fi
64if test "$ac_cv_singcpuname" = i686; then
65  AC_DEFINE(SI_CPU_I386)
66  AC_SUBST(SI_CPU_I386)
67fi
68if test "$ac_cv_singcpuname" = x86_64; then
69  AC_DEFINE(SI_CPU_X86_64)
70  AC_SUBST(SI_CPU_X86_64)
71fi
72if test "$ac_cv_singcpuname" = ia64; then
73  AC_DEFINE(SI_CPU_IA64)
74  AC_SUBST(SI_CPU_IA64)
75fi
76if test "$ac_cv_singcpuname" = sparc; then
77  AC_DEFINE(SI_CPU_SPARC)
78  AC_SUBST(SI_CPU_SPARC)
79fi
80if test "$ac_cv_singcpuname" = ppc; then
81  AC_DEFINE(SI_CPU_PPC)
82  AC_SUBST(SI_CPU_PPC)
83fi
84
85dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
86dnl path stuff
87dnl
88
89project=singular
90component=misc
91
92dnl set exec_prefix, libdir, includedir to some sensible values
93dnl if they are not yet already set
94
95# expand prefix
96test "x$prefix" = xNONE && prefix=$ac_default_prefix
97if test "${with_rootdir+set}" != set; then
98  AC_DEFINE_UNQUOTED(S_ROOT_DIR, "${prefix}")
99else
100  AC_DEFINE_UNQUOTED(S_ROOT_DIR, "${with_rootdir}")
101fi
102
103
104# expand exec_prefixad
105if test "x$exec_prefix" = xNONE; then
106 exec_prefix=${prefix}
107fi
108
109# expand libdir
110test "x$libdir" = 'x${exec_prefix}/lib'&& libdir="${exec_prefix}/lib/${project}/${component}"
111
112# expand includedir
113test "x$includedir" = 'x${prefix}/include' && includedir="${exec_prefix}/include/${project}/${component}"
114
115AC_CONFIG_FILES([Makefile])
116AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.