~ubuntu-branches/debian/sid/rpm/sid

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Package Import Robot
  • Author(s): Michal Čihař
  • Date: 2013-06-06 11:39:34 UTC
  • mfrom: (1.1.16)
  • Revision ID: package-import@ubuntu.com-20130606113934-ela3du14fyba0t6u
Tags: 4.11.0.1-1
* New upstream release.
* Bump standards to 3.9.4.
* Refresh patches, update patch from Fedora.
* Build with Lua 5.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
AC_PREREQ(2.61)
2
 
AC_INIT(rpm, 4.10.3.1, rpm-maint@lists.rpm.org)
 
2
AC_INIT(rpm, 4.11.0.1, rpm-maint@lists.rpm.org)
3
3
 
4
4
AC_CONFIG_SRCDIR([rpmqv.c])
5
5
AC_CONFIG_HEADERS([config.h])
37
37
AS=${AS-as}
38
38
AC_SUBST(AS)
39
39
if test "$GCC" = yes; then
40
 
    CFLAGS="$CFLAGS -fPIC -DPIC -D_REENTRANT -Wall -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes"
41
40
    cflags_to_try="-fno-strict-aliasing -fstack-protector -Wempty-body"
42
41
    AC_MSG_CHECKING([supported compiler flags])
43
42
    old_cflags=$CFLAGS
44
43
    echo
45
44
    for flag in $cflags_to_try; do
46
 
        CFLAGS="$CFLAGS $flag"
 
45
        CFLAGS="$CFLAGS $flag -Werror"
47
46
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[return 0;]])],[
48
47
                echo "   $flag"
49
48
                RPMCFLAGS="$RPMCFLAGS $flag"
50
49
        ],[])
51
50
        CFLAGS=$old_cflags
52
51
    done
53
 
    CFLAGS="$CFLAGS $RPMCFLAGS"
 
52
    CFLAGS="$CFLAGS -fPIC -DPIC -D_REENTRANT -Wall -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes $RPMCFLAGS"
54
53
fi
55
54
export CFLAGS
56
55
 
142
141
AC_PATH_PROG(__OBJDUMP, objdump, /usr/bin/objdump, $MYPATH)
143
142
AC_PATH_PROG(__STRIP, strip, /usr/bin/strip, $MYPATH)
144
143
 
 
144
AC_PATH_PROG(__GIT, git, /usr/bin/git, $MYPATH)
 
145
AC_PATH_PROG(__HG, hg, /usr/bin/hg, $MYPATH)
 
146
AC_PATH_PROG(__BZR, bzr, /usr/bin/bzr, $MYPATH)
 
147
AC_PATH_PROG(__QUILT, quilt, /usr/bin/quilt, $MYPATH)
 
148
 
145
149
AC_PATH_PROG(__FAKECHROOT, fakechroot, no, $MYPATH)
146
150
AM_CONDITIONAL(HAVE_FAKECHROOT, [test "$__FAKECHROOT" != "no"])
147
151
 
239
243
AM_CONDITIONAL(LIBDWARF,[test "$WITH_LIBDWARF" = yes])
240
244
 
241
245
#=================
 
246
# Check for beecrypt library if requested.
 
247
AC_ARG_WITH(beecrypt, [  --with-beecrypt         build with beecrypt support ],,[with_beecrypt=no])
 
248
AC_ARG_WITH(internal_beecrypt, [  --with-internal-beecrypt build with internal beecrypt library ],,[with_internal_beecrypt=no])
 
249
AM_CONDITIONAL([WITH_INTERNAL_BEECRYPT],[test "$with_internal_beecrypt" = yes])
 
250
if test "$with_internal_beecrypt" = yes ; then
 
251
  with_beecrypt=yes
 
252
fi
 
253
AM_CONDITIONAL([WITH_BEECRYPT],[test "$with_beecrypt" = yes])
 
254
 
 
255
WITH_BEECRYPT_INCLUDE=
 
256
WITH_BEECRYPT_LIB=
 
257
if test "$with_beecrypt" = yes ; then
 
258
  AC_DEFINE(WITH_BEECRYPT, 1, [Build with beecrypt instead of nss3 support?])
 
259
  if test "$with_internal_beecrypt" = yes ; then
 
260
    WITH_BEECRYPT_INCLUDE="-I\$(top_srcdir)/beecrypt"
 
261
    AC_DEFINE(HAVE_BEECRYPT_API_H, 1, [Define to 1 if you have the <beecrypt/api.h> header file.])
 
262
  else
 
263
    AC_CHECK_LIB(beecrypt, mpfprintln, [
 
264
      WITH_BEECRYPT_LIB="-lbeecrypt"
 
265
    ],[
 
266
      AC_MSG_ERROR([missing required library 'beecrypt']) 
 
267
    ])
 
268
    AC_CHECK_HEADER([beecrypt/api.h], [AC_DEFINE(HAVE_BEECRYPT_API_H, 1, [Define to 1 if you have the <beecrypt/api.h> header file.])
 
269
    ])
 
270
  fi
 
271
fi
 
272
AC_SUBST(WITH_BEECRYPT_LIB)
 
273
AC_SUBST(WITH_BEECRYPT_INCLUDE)
 
274
 
 
275
#=================
242
276
# Check for NSS library.
243
277
# We need nss.h from NSS which needs nspr.h. Unfortunately both glibc and NSS 
244
278
# have a header named nss.h... so make extra check for NSS's sechash.h 
245
279
# which we use too and hopefully is slightly more unique to NSS.
246
280
WITH_NSS_INCLUDE=
247
281
WITH_NSS_LIB=
 
282
if test "$with_beecrypt" != yes ; then
248
283
AC_CHECK_HEADERS([nspr.h nss.h sechash.h], [], [
249
284
  AC_MSG_ERROR([missing required NSPR / NSS header])
250
285
])
251
 
AC_CHECK_LIB(nss3, NSS_NoDB_Init, [
 
286
AC_CHECK_LIB(nss3, VFY_VerifyDigestDirect, [
252
287
  WITH_NSS_LIB=-lnss3
253
288
  AC_CHECK_LIB(nss3, NSS_InitContext, [
254
289
    AC_DEFINE(HAVE_NSS_INITCONTEXT, 1, [Define to 1 if NSS has NSS_InitContext])
255
290
    AC_SUBST(HAVE_NSS_INITCONTEXT, [1])
256
291
  ])
257
292
], [
258
 
  AC_MSG_ERROR([missing required NSS library 'nss3'])
 
293
  AC_MSG_ERROR([required NSS library 'nss3' missing or too old])
259
294
])
 
295
fi
260
296
AC_SUBST(WITH_NSS_INCLUDE)
261
297
AC_SUBST(WITH_NSS_LIB)
262
298
 
351
387
AC_CHECK_HEADERS(sys/systemcfg.h)
352
388
AC_CHECK_HEADERS(sys/param.h)
353
389
 
354
 
AC_CHECK_HEADERS(glob.h)
355
 
 
356
390
dnl statfs portability fiddles.
357
391
dnl
358
392
dnl We should really emulate/steal sections of the statfs and struct statfs
482
516
 
483
517
dnl Checks for library functions.
484
518
AC_CHECK_FUNCS(putenv)
 
519
AC_CHECK_FUNCS(mempcpy)
 
520
AC_CHECK_FUNCS(fdatasync)
485
521
 
486
522
AC_REPLACE_FUNCS(stpcpy stpncpy)
487
523
 
491
527
   [mkstemp getcwd basename dirname realpath setenv unsetenv regcomp lchown],
492
528
   [], [AC_MSG_ERROR([function required by rpm])])
493
529
 
494
 
dnl XXX Glob *is* broken on linux with libc5, solaris and possibly aix when
495
 
dnl %files gets something like
496
 
dnl     /usr/*/locale/*/LC_MESSAGES/*.mo
497
 
dnl (Note: more than one asterisk in glob pattern.)
498
 
dnl
499
 
dnl XXX Glob is "fixed" in glibc-2.3.3-61, but the cost is that
500
 
dnl dangling symlinks are no longer globbed. Always use the internal glob.
501
 
AC_DEFINE(USE_GNU_GLOB, 1, [Use the included glob.c?])
502
 
AC_LIBOBJ(glob)
503
530
AC_LIBOBJ(fnmatch)
504
531
 
505
532
dnl check if python is requested
705
732
 
706
733
AS_IF([test "$with_lua" != no],[
707
734
  PKG_CHECK_MODULES([LUA],
708
 
    [lua5.1 >= 5.1],
 
735
    [lua5.2 >= 5.2],
709
736
    [AC_DEFINE(WITH_LUA, 1, [Build with lua support?])],
710
737
    [AC_MSG_ERROR([lua not present (--without-lua to disable)])])
711
738
  AC_SUBST(LUA_CFLAGS)