File: configure.ac

package info (click to toggle)
singular 1:4.1.1-p2+ds-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 35,860 kB
  • sloc: cpp: 288,280; ansic: 17,387; lisp: 4,242; yacc: 1,654; python: 1,608; makefile: 1,424; lex: 1,387; perl: 632; sh: 567; xml: 182
file content (106 lines) | stat: -rw-r--r-- 2,612 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
dnl File: configure.ac
dnl Purpose: Process this file with autoconf to produce configure
dnl Author:  obachman@mathematik.uni-kl.de (Olaf Bachmann)
dnl Created: 11/99
dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll

AC_INIT([xmalloc],[4.1])

AC_CONFIG_MACRO_DIR([../m4])
AC_CONFIG_AUX_DIR([../build-aux])
AC_CONFIG_SRCDIR(dummy.c)
AC_CONFIG_HEADER([_config.h])

AC_PROG_CC
AC_PROG_CXX

SING_RESET_FLAGS()

AM_MAINTAINER_MODE([enable])
AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])

AM_SANITY_CHECK

# Add pre'prefixed config
AX_PREFIX_CONFIG_H([omConfig.h],[],[_config.h])

# SING_CHECK_SET_ARGS()

AC_SUBST(VERSION)

CPPFLAGS="-I.. -I. $CPPFLAGS"
AC_PROG_MAKE_SET
AC_PROG_CC
AC_PROG_CPP

AC_PROG_LN_S
AC_PROG_INSTALL
AM_PROG_CC_C_O
# AM_PROG_AR
AC_C_CONST
AC_C_INLINE

LT_INIT([win32-dll])

SING_WIN_FLAGS


dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
dnl check for programs
dnl
AC_CHECK_PROG(AR, ar, ar, :)
if test "$ac_cv_prog_AR" = no; then
  AC_MSG_ERROR(*** ar program not found)
fi

dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
dnl header file checks
dnl
AC_HEADER_STDC
AC_CHECK_HEADERS(limits.h,,
  AC_MSG_ERROR(Can not compile without limits.h))

AC_CHECK_HEADERS(unistd.h sys/mman.h fcntl.h /usr/include/malloc.h)

AC_CHECK_FUNCS(popen mmap sbrk random malloc_usable_size malloc_size)

dnl llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
dnl Find out more about particularity of the system
dnl

# sizes
AC_CHECK_SIZEOF(long,4)
AC_CHECK_SIZEOF(void*,4)
AC_CHECK_SIZEOF(double, 8)
AC_CHECK_SIZEOF(size_t, 4)

if test "$ac_cv_sizeof_long" != "$ac_cv_sizeof_voidp"; then
  AC_MSG_ERROR(need equal sizes for long and void*)
fi
if test "$ac_cv_sizeof_voidp" != 4 && test "$ac_cv_sizeof_voidp" != 8; then
  AC_MSG_ERROR(need void* to be 4 or 8 bytes long)
fi
if test "$ac_cv_sizeof_double" != 4 && test "$ac_cv_sizeof_double" != 8; then
  AC_MSG_ERROR(need double to be 4 or 8 bytes long)
fi

dnl Set compiler, linker flags so that we can work with omalloc
BACKUP_CFLAGS=$CFLAGS
BACKUP_CXXFLAGS=$CXXFLAGS
BACKUP_LDFLAGS=$LDFLAGS

CFLAGS="$CFLAGS -I$srcdir"
CXXFLAGS="$CXXFLAGS -I$srcdir"

AC_SUBST(OM_MALLOC_HEADER)
AC_SUBST(OM_MALLOC_SOURCE)

dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
dnl wrap it up
dnl
AC_CONFIG_FILES([Makefile omalloc.pc])
AC_OUTPUT