File: configure.ac

package info (click to toggle)
cdebootstrap 0.3.4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 816 kB
  • ctags: 308
  • sloc: sh: 3,408; ansic: 2,522; makefile: 243
file content (115 lines) | stat: -rw-r--r-- 2,712 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
AC_INIT([cdebootstrap],m4_esyscmd(dpkg-parsechangelog | perl -ne 'print $1 if m/^Version: (.*)$/;'))
AM_INIT_AUTOMAKE([foreign no-define])
AC_CONFIG_HEADERS([config.h])
AM_MAINTAINER_MODE

AC_CANONICAL_TARGET

AC_PROG_CC
AC_PROG_RANLIB

AC_ARG_WITH(debian-architecture,
	AS_HELP_STRING(--with-debian-architecture=NAME,which debian architecture to use),
	[DEB_ARCH="$withval"])

if test -z "$DEB_ARCH"; then
	AC_PATH_PROG(DPKG_ARCHITECTURE,dpkg-architecture)

	if test -n "$DPKG_ARCHITECTURE"; then
		target_alias=$target_cpu
		if test "$target_os" = linux-gnu; then
			target_alias="$target_alias-linux"
		else
			target_alias="$target_alias-$target_os"
		fi
		DEB_ARCH=$($DPKG_ARCHITECTURE -t$target_alias -qDEB_HOST_ARCH)
	fi
fi

if test -z "$DEB_ARCH"; then
	AC_MSG_WARN([can't determine default debian architecture])
fi

AC_MSG_CHECKING(for debian architecture)
AC_DEFINE_UNQUOTED([DEB_ARCH],["$DEB_ARCH"],[Debian architecture])
AC_MSG_RESULT($DEB_ARCH)

AC_PATH_PROG(FAKEROOT,fakeroot)
AC_SUBST(FAKEROOT)

AC_ARG_WITH(frontend,
	AS_HELP_STRING(--with-frontend=NAME,which frontend to use),
	[FRONTEND=$withval],[FRONTEND=standalone])

AC_MSG_CHECKING(for frontend)
if test "$FRONTEND" = "debian-installer"; then
	FRONTEND_LIBS="-ldebconfclient"
elif test "$FRONTEND" = "standalone"; then
	FRONTEND_LIBS=""
else
	AC_MSG_ERROR([unknown frontend $FRONTEND], 1)
fi
AC_MSG_RESULT($FRONTEND)

AC_SUBST(FRONTEND)
AC_SUBST(FRONTEND_LIBS)

CONFIGDIR="\${datadir}/$PACKAGE_NAME"

AC_MSG_CHECKING(for configdir)
AC_ARG_WITH(configdir,
	AS_HELP_STRING(--with-configdir=DIR,a),
	[
CONFIGDIR=$withval
AC_MSG_RESULT([$CONFIGDIR])
],[
AC_MSG_RESULT(default)
])

AC_SUBST([CONFIGDIR])

AC_MSG_CHECKING(for ar)
AC_ARG_ENABLE(ar-internal,
	AS_HELP_STRING(--enable-ar-internal,a),
	[
AC_DEFINE([ENABLE_AR_INTERNAL],1,[Use internal ar.])
AC_MSG_RESULT(internal)
],[
AC_MSG_RESULT(external)
])

AH_VERBATIM([_BSD_SOURCE],
[/* Enable BSD extensions on systems that have them.  */
#ifndef _BSD_SOURCE
# undef _BSD_SOURCE
#endif])dnl
AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
AC_DEFINE([_BSD_SOURCE])

AH_VERBATIM([_XOPEN_SOURCE],
[/* Enable XOPEN extensions on systems that have them.  */
#ifndef _XOPEN_SOURCE
# undef _XOPEN_SOURCE
#endif])dnl
AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
AC_DEFINE([_XOPEN_SOURCE])

AC_CONFIG_FILES([
Makefile
config/Makefile
config/sarge/Makefile
config/sid/Makefile
config/woody/Makefile
helper/Makefile
helper/cdebootstrap-helper-diverts/Makefile
helper/cdebootstrap-helper-makedev/Makefile
include/Makefile
src/Makefile
src/frontend/Makefile
src/frontend/debian-installer/Makefile
src/frontend/standalone/Makefile
])

AC_OUTPUT