/[soft]/rpm/rpm-setup/trunk/configure.ac
ViewVC logotype

Contents of /rpm/rpm-setup/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8425 - (show annotations) (download)
Tue Jun 4 11:16:29 2013 UTC (10 years, 10 months ago) by colin
File size: 4644 byte(s)
1.172
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 # $Id: configure.ac 271266 2010-11-04 10:43:28Z fwang $
5
6 AC_PREREQ(2.59)
7 AC_INIT(rpm-mageia-setup, 1.172, rtp@mageia.org)
8 AC_CANONICAL_TARGET
9 AM_INIT_AUTOMAKE(1.9 -Wno-portability no-dist-gzip dist-xz)
10 AC_CONFIG_SRCDIR
11
12 # Checks for programs.
13 AC_PROG_CC
14 AC_PROG_INSTALL
15 AC_PROG_LIBTOOL
16 AC_CONFIG_FILES([
17 Makefile
18 ])
19
20 dnl See if we have pkgconfig for rpm, resort to old behavior if not
21 PKG_CHECK_MODULES([RPM], [rpm], [
22 AC_DEFINE_UNQUOTED([HAVE_RPM],1,[Define if RPM backend is available])
23 CPPFLAGS="$RPM_CFLAGS $CPPFLAGS"
24 LDFLAGS="$RPM_LIBS $LDFLAGS"
25 ], [
26 AC_PATH_PROG(RPM_PATH,rpm,none)
27 if test "$RPM_PATH" = "none"; then
28 AC_MSG_ERROR([RPM executable was not found in your system])
29 else
30 AC_DEFINE_UNQUOTED([HAVE_RPM],1,[Define if RPM backend is available])
31 fi
32 ]
33 )
34
35 AC_CHECK_LIB([rpmio], [rpmLoadMacroFile])
36 AC_HEADER_STDC
37 AC_CHECK_HEADERS([string.h rpm/rpmmacro.h rpm/rpmlib.h rpm/rpmio.h rpm/rpmtag.h])
38
39 CANONTARGETCPU=${target_cpu}
40 CANONTARGETGNU=-gnu
41
42 case "${target_cpu}" in
43 *86|athlon|k6|pentium*)
44 RPMALLARCH="i386 i486 i586 i686 k6 athlon pentium3 pentium4"
45 CANONTARGETCPU=i586
46 ;;
47 x86_64|amd64)
48 RPMALLARCH="i386 i486 i586 i686 k6 athlon pentium3 pentium4 amd64 x86_64"
49 CANONTARGETCPU=x86_64
50 CANONTARGETCPU32=i586
51 ;;
52 ppc|powerpc)
53 RPMALLARCH="ppc"
54 CANONTARGETCPU=ppc
55 ;;
56 ppc64|powerpc64)
57 RPMALLARCH="ppc ppc32 ppc64"
58 CANONTARGETCPU=ppc64
59 ;;
60 sparc|sparcv9)
61 RPMALLARCH="sparc"
62 CANONTARGETCPU=sparc
63 ;;
64 sparc64)
65 RPMALLARCH="sparc sparc64"
66 CANONTARGETCPU=sparc64
67 ;;
68 mipsel)
69 RPMALLARCH="mipsel mips32el mips64el"
70 CANONTARGETCPU=mipsel
71 ;;
72 armv4tl)
73 RPMALLARCH="arml armv4tl"
74 CANONTARGETCPU=armv4tl
75 CANONTARGETGNU=-gnueabi
76 ;;
77 armv5tl)
78 RPMALLARCH="arml armv4tl armv5tl"
79 CANONTARGETCPU=armv5tl
80 CANONTARGETGNU=-gnueabi
81 ;;
82 # some armv5te cpu have buggy instruction so better disable
83 # the "e" extension
84 armv5tel)
85 RPMALLARCH="arml armv4tl armv5tel armv5tl"
86 CANONTARGETCPU=armv5tl
87 CANONTARGETGNU=-gnueabi
88 ;;
89 armv7l)
90 RPMALLARCH="arml armv4tl armv5tl armv5tel armv7l"
91 CANONTARGETCPU=armv7l
92 CANONTARGETGNU=-gnueabi
93 esac
94 RPMALLARCH="${RPMALLARCH} noarch"
95 AC_SUBST(RPMALLARCH)
96 AC_SUBST(CANONTARGETCPU)
97 AC_SUBST(CANONTARGETCPU32)
98 AC_SUBST(CANONTARGETGNU)
99
100 #
101 # get rid of the 4-th tuple, if config.guess returned "linux-gnu" for build_os
102 #
103 if echo "$build_os" | grep '.*-gnulibc1' > /dev/null ; then
104 build_os=`echo "${build_os}" | sed 's/-gnulibc1$//'`
105 fi
106 if echo "$build_os" | grep '.*-gnu' > /dev/null ; then
107 build_os=`echo "${build_os}" | sed 's/-gnu$//'`
108 fi
109
110 changequote(<, >)
111 build_os_exact="${build_os}"
112 build_os_major=`echo "${build_os}" | sed 's/\..*$//'`
113 build_os_noversion=`echo "${build_os}" | sed 's/[0-9]*\..*$//'`
114 changequote([, ])
115
116 dnl Find our os
117 RPMOS="$build_os_noversion"
118 AC_SUBST(RPMOS)
119
120 # Checks for library functions.
121 RPMVENDOR="Mageia"
122 AC_ARG_WITH(vendor, [ --with-vendor the vendor of this config ])
123 if test $with_vendor; then
124 RPMVENDOR=$with_vendor
125 fi
126 AC_SUBST(RPMVENDOR)
127
128 RPMCANONVENDOR=`echo "${RPMVENDOR}" | tr [A-Z] [a-z]`
129 AC_SUBST(RPMCANONVENDOR)
130
131 DISTSUFFIX=".mga"
132 AC_ARG_WITH(distsuffix, [ --with-distsuffix the distsuffix to use when building packages ])
133 if test $with_distsuffix; then
134 DISTSUFFIX=$with_distsuffix
135 fi
136 AC_SUBST(DISTSUFFIX)
137
138 if test X"$prefix" = XNONE ; then
139 usrprefix="$ac_default_prefix"
140 else
141 usrprefix=$prefix
142 fi
143
144 RPMLIBDIR="${usrprefix}/lib/rpm"
145 AC_ARG_WITH(rpmlibdir, [ --with-rpmlibdir=dir location of rpm config file ])
146 if test $with_rpmlibdir; then
147 RPMLIBDIR=$with_rpmlibdir
148 fi
149 AC_SUBST(RPMLIBDIR)
150
151 RPMCONFDIR=${RPMLIBDIR}
152 AC_ARG_WITH(rpmconfdir, [ --with-rpmconfdir=dir location of our config ])
153 if test $with_rpmconfdir; then
154 RPMCONFDIR=$with_rpmconfdir
155 fi
156 AC_SUBST(RPMCONFDIR)
157
158 RPMVENDORDIR="${RPMCONFDIR}/${RPMCANONVENDOR}"
159 AC_SUBST(RPMVENDORDIR)
160
161 RPMSYSCONFDIR="/etc/rpm"
162 AC_ARG_WITH(rpmsysconfdir, [ --with-rpmsysconfdir=dir location of etc ])
163 if test $with_rpmsysconfdir; then
164 RPMSYSCONFDIR=$with_rpmsysconfdir
165 fi
166 AC_SUBST(RPMSYSCONFDIR)
167
168
169 AC_ARG_WITH(rpmplatform, [ --with-rpmplatform use /etc/rpm/platform ])
170 AM_CONDITIONAL([RPMPLATFORM],[test $with_rpmplatform])
171
172 AC_ARG_WITH(only-rpmrc, [ --with-only-rpmrc rpm uses rpmrc ])
173 AM_CONDITIONAL([ONLY_RPMRC],[test $with_only_rpmrc])
174
175 AC_OUTPUT

  ViewVC Help
Powered by ViewVC 1.1.30