File: configure.in

package info (click to toggle)
deborphan 1.7.23
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,516 kB
  • ctags: 305
  • sloc: sh: 3,841; ansic: 1,563; makefile: 114
file content (150 lines) | stat: -rw-r--r-- 3,976 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# Copyright (C) 2000, 2001, 2002, 2003 Cris van Pelt
# Copyright (C) 2003, 2004, 2005, 2006 Peter Palfrader
#
# $Id: configure.in 594 2006-11-22 00:21:12Z weasel $

dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/deborphan.c)
AM_INIT_AUTOMAKE(deborphan, 1.7.23)
AM_CONFIG_HEADER(include/config.h)

AM_MAINTAINER_MODE

AC_DEFINE(STATUS_FILE, "/var/lib/dpkg/status", [Location of your statusfile])
AC_DEFINE(REG_FLAGS, REG_ICASE, [Bitwise or'd list of flags for regcomp()])

AC_PROG_CC
ALL_LINGUAS="ca cs da de es eu fr ja nl pl"

AM_GNU_GETTEXT
AM_GNU_GETTEXT_VERSION(0.14.1)

AC_PROG_INSTALL
AC_STDC_HEADERS
AC_HAVE_HEADERS(string.h getopt.h errno.h)
AC_CHECK_FUNCS(getopt_long, ,AC_MSG_ERROR([You need getopt_long()]))
AC_C_INLINE

AC_MSG_CHECKING(wether to use xalloc)
AC_ARG_WITH(xalloc,
[  --without-xalloc        Disable safe memory allocation. ],
[if [[ "$withval" = "no" ]]; then
  xalloc=0
  AC_MSG_RESULT(no)
else
  xalloc=1
  AC_MSG_RESULT(yes)
fi], [ xalloc=1; AC_MSG_RESULT(yes) ]
)

AC_MSG_CHECKING(debfoster's keepers file)
if [[ -r /var/state/debfoster/keepers ]]; then
  dffile="/var/state/debfoster/keepers"
  AC_MSG_RESULT($dffile)
else 
  if [[ -r /etc/apt/keepers ]]; then
    dffile="/etc/apt/keepers"
    AC_MSG_RESULT($dffile)
  else
    with_debfoster="no"
    AC_MSG_RESULT("not found.")
  fi
fi 

AC_MSG_CHECKING(wether to ignore debfoster)
AC_ARG_WITH(debfoster,
[  --without-debfoster     Ignore debfoster's keepers file. ],
[if [[ "$withval" = "no" ]]; then
  ignore_df=1
  AC_MSG_RESULT(yes)
else
  ignore_df=0
  AC_MSG_RESULT(no)
fi], [ ignore_df=0; AC_MSG_RESULT(no) ]
)

AC_MSG_CHECKING(memory usage)
AC_ARG_WITH(lowmem,
[  --with-lowmem           Turn on conservative memory usage. ],
[if [[ "$withval" = "yes" ]]; then
  himem=0
  AC_MSG_RESULT(low)
else
  himem=1
  AC_MSG_RESULT(high)
fi], [ himem=1; AC_MSG_RESULT(high) ]
)

AC_MSG_CHECKING(wether to imply -s)
AC_ARG_WITH(isfa,
[  --without-isfa          Disable implication of -s when using -a. ],
[if [[ "$withval" = "no" ]]; then
  isfa=0
  AC_MSG_RESULT(no)
else
  isfa=1
  AC_MSG_RESULT(yes)
fi], [ isfa=1; AC_MSG_RESULT(yes) ]
)

AC_MSG_CHECKING(wether to run in nice mode)
AC_ARG_WITH(nice,
[  --without-nice          Do not run in nice mode by default. ],
[if [[ "$withval" = "no" ]]; then
  nice=0
  AC_MSG_RESULT(no)
else
  nice=1
  AC_MSG_RESULT(yes)
fi], [ nice=1; AC_MSG_RESULT(yes) ]
)

AC_MSG_CHECKING(default priority)
AC_ARG_WITH(priority,
[  --with-priority=PRIOR   Default minimum priority. ],
[if echo $withval | grep -E '^[[[:digit:]]]+$' >/dev/null; then
  priority=$withval
  AC_MSG_RESULT($priority)
else
  AC_MSG_ERROR(invalid priority: $withval)
fi], [ priority=2; AC_MSG_RESULT(2) ]
)

AC_MSG_CHECKING(ignore essential)
AC_ARG_WITH(ignore-essential,
[  --with-ignore-essential Ignore 'Essential: yes' lines. ],
[if [[ "$withval" = "yes" ]]; then
  essential=0
  AC_MSG_RESULT(yes)
else
  essential=1
  AC_MSG_RESULT(no)
fi], [ essential=1; AC_MSG_RESULT(no) ]
)

AC_DEFINE_UNQUOTED(DEFAULT_PRIORITY, $priority, [Default minimum priority])

if [[ $isfa -eq 1 ]]; then
  AC_DEFINE(ALL_PACKAGES_IMPLY_SECTION, 1, [Imply --show-section when using --all-packages.])
fi
if [[ $ignore_df -eq 1 ]]; then
  AC_DEFINE(IGNORE_DEBFOSTER, 1, [Ignore debfoster's keepers file.])
fi
if [[ $xalloc -eq 1 ]]; then
  AC_DEFINE(USE_XALLOC, 1, [Safe memory allocation])
fi
if [[ $nice -eq 1 ]]; then
  AC_DEFINE(DEFAULT_NICE, 1, [Count 'recommends' and 'suggests' as 'depends'])
fi
if [[ ! $himem -eq 1 ]]; then
  AC_DEFINE(LOW_MEM, 1, [ Conservative memory usage])
fi
if [[ ! $essential -eq 1 ]]; then
  AC_DEFINE(IGNORE_ESSENTIAL, 1, [Ignore 'Essential: yes' lines])
fi
if [[ ! -z $dffile ]]; then
  AC_DEFINE_UNQUOTED(DEBFOSTER_KEEP, "$dffile", [Location of debfoster's keepers file.])
fi

AC_OUTPUT(Makefile src/Makefile doc/Makefile doc/po/Makefile doc/fr/Makefile doc/pl/Makefile include/Makefile po/Makefile.in intl/Makefile util/Makefile)