~ubuntu-branches/ubuntu/precise/rpm/precise-proposed

« back to all changes in this revision

Viewing changes to .pc/fix-directories.patch/configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Michal Čihař
  • Date: 2010-06-28 11:12:30 UTC
  • mfrom: (17.2.5 sid)
  • Revision ID: james.westby@ubuntu.com-20100628111230-8ggjjhgpvrnr3ybx
Tags: 4.8.1-5
Fix compilation on hurd and kfreebsd (Closes: #587366).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
AC_PREREQ(2.61)
2
 
AC_INIT(rpm, 4.7.2, rpm-maint@lists.rpm.org)
 
2
AC_INIT(rpm, 4.8.1, rpm-maint@lists.rpm.org)
3
3
 
4
4
AC_CONFIG_SRCDIR([rpmqv.c])
5
5
AC_CONFIG_HEADERS([config.h])
36
36
    CFLAGS="$CFLAGS -fPIC -DPIC -D_REENTRANT -Wall -Wpointer-arith -Wmissing-prototypes -Wno-char-subscripts"
37
37
    # XXX disabled for now due to noise from NSPR headers
38
38
    # CFLAGS="$CFLAGS -Wstrict-prototypes"
39
 
    cflags_to_try="-fno-strict-aliasing -fstack-protector"
 
39
    cflags_to_try="-fno-strict-aliasing -fstack-protector -Wempty-body"
40
40
    AC_MSG_CHECKING([supported compiler flags])
41
41
    old_cflags=$CFLAGS
42
42
    echo
61
61
touch foo.chmodtest
62
62
chmod 744 foo.chmodtest
63
63
chmod +X foo.chmodtest 2>/dev/null
64
 
a=`ls -l foo.chmodtest | awk '{print $1}'`
 
64
a=`ls -l foo.chmodtest | awk '{print substr($1,1,10)}'`
65
65
rm -f foo.chmodtest
66
66
if test "$a" = "-rwxr-xr-x"; then
67
67
    AC_MSG_RESULT(yes)
154
154
AC_SUBST(__ID_U)
155
155
 
156
156
AC_PATH_PROG(__INSTALL, install, /usr/bin/install, $MYPATH)
157
 
AC_PATH_PROG(__LZMA, lzma, /usr/bin/lzma, $MYPATH)
158
157
AC_PATH_PROG(__XZ, xz, /usr/bin/xz, $MYPATH)
159
158
AC_PATH_PROG(__MAKE, make, /usr/bin/make, $MYPATH)
160
159
AC_PATH_PROG(__MKDIR, mkdir, /bin/mkdir, $MYPATH)
357
356
 
358
357
#=================
359
358
# Process --with/without-external-db
360
 
AC_ARG_WITH(external_db, [  --with-external-db      build against an external Berkeley db],
 
359
AC_ARG_WITH(external_db, [AS_HELP_STRING([--with-external-db],[build against an external Berkeley db])],
361
360
[case "$with_external_db" in
362
361
yes|no) ;;
363
362
*) AC_MSG_ERROR([invalid argument to --with-external-db]) ;;
402
401
 
403
402
#=================
404
403
# Check for sqlite3 library.
405
 
AC_ARG_ENABLE(sqlite3, [  --enable-sqlite3        enable sqlite3 support],
 
404
AC_ARG_ENABLE(sqlite3, [AS_HELP_STRING([--enable-sqlite3],[enable sqlite3 support])],
406
405
[case "$enable_sqlite3" in
407
406
yes|no) ;;
408
407
*) AC_MSG_ERROR([invalid argument to --enable-sqlite3])
635
634
 
636
635
AC_CHECK_FUNCS(getaddrinfo getnameinfo inet_aton)
637
636
AC_CHECK_FUNCS(mtrace)
638
 
AC_CHECK_FUNCS(strndup strerror)
 
637
AC_CHECK_FUNCS(strerror)
639
638
 
640
639
AC_REPLACE_FUNCS(basename getcwd getwd)
641
640
AC_REPLACE_FUNCS(putenv realpath setenv)
662
661
AC_LIBOBJ(fnmatch)
663
662
 
664
663
dnl check if python is requested
665
 
AC_ARG_ENABLE(python, [  --enable-python         build rpm python bindings ],
 
664
AC_ARG_ENABLE(python, [AS_HELP_STRING([--enable-python],[build rpm python bindings])],
666
665
[case "$enable_python" in
667
666
yes|no) ;;
668
667
*) AC_MSG_ERROR([invalid argument to --enable-python])
671
670
[enable_python=no])
672
671
 
673
672
AS_IF([test "$enable_python" = yes],[
674
 
# rpm-python is based on python-2.5, 
675
 
# with legacy hacks to allow building against python >= 2.3
676
 
  AM_PATH_PYTHON([2.3],[
677
 
    WITH_PYTHON_INCLUDE=`${PYTHON} -c 'from distutils.sysconfig import *; print get_python_inc()'`
 
673
  AM_PATH_PYTHON([2.6],[
 
674
    WITH_PYTHON_INCLUDE=`${PYTHON} -c 'from distutils.sysconfig import *; import sys; sys.stdout.write(get_python_inc())'`
678
675
    WITH_PYTHON_SUBPACKAGE=1
679
676
    save_CPPFLAGS="$CPPFLAGS"
680
677
    CPPFLAGS="$CPPFLAGS -I$WITH_PYTHON_INCLUDE"
706
703
dnl
707
704
dnl Only build internal API + source hacking docs on request
708
705
dnl
709
 
AC_ARG_WITH(hackingdocs, [  --with-hackingdocs          build rpm hacking docs ],,[with_hackingdocs=no])
 
706
AC_ARG_WITH(hackingdocs, [AS_HELP_STRING([--with-hackingdocs],[build rpm hacking docs])],,[with_hackingdocs=no])
710
707
 
711
708
case "$with_hackingdocs" in
712
709
auto)
720
717
AC_CHECK_PROG(HAVE_DOT,[dot],[YES],[NO])
721
718
 
722
719
WITH_SELINUX_LIB=
723
 
AC_ARG_WITH(selinux, [  --with-selinux          build with selinux support ],
 
720
AC_ARG_WITH(selinux, [AS_HELP_STRING([--with-selinux],[build with selinux support])],
724
721
[case "$with_selinux" in
725
722
yes|no) ;;
726
723
*) AC_MSG_ERROR([invalid argument to --with-selinux])
746
743
 
747
744
# libcap
748
745
WITH_CAP_LIB=
749
 
AC_ARG_WITH(cap, [  --with-cap              build with capability support ],
 
746
AC_ARG_WITH(cap, [AS_HELP_STRING([--with-cap],[build with capability support])],
750
747
[case "$with_cap" in
751
748
yes|no) ;;
752
749
*) AC_MSG_ERROR([invalid argument to --with-cap])
778
775
AM_CONDITIONAL(CAP,[test "$with_cap" = yes])
779
776
 
780
777
WITH_ACL_LIB=
781
 
AC_ARG_WITH(acl, [  --with-acl              build with acl support ],
 
778
AC_ARG_WITH(acl, [AS_HELP_STRING([--with-acl],[build with acl support])],
782
779
[case "$with_acl" in
783
780
yes|no) ;;
784
781
*) AC_MSG_ERROR([invalid argument to --with-acl])
805
802
 
806
803
WITH_LUA_LIB=
807
804
WITH_LUA_INCLUDE=
808
 
AC_ARG_WITH(lua, [  --with-lua              build with lua support ],,[with_lua=yes])
 
805
AC_ARG_WITH(lua, [AS_HELP_STRING([--with-lua],[build with lua support])],,[with_lua=yes])
809
806
AS_IF([test "$with_lua" = yes],[
810
807
  AC_CHECK_HEADER([lua.h],[
811
808
    AC_CHECK_LIB(lua,[luaL_openlibs],[with_lua=yes],[
827
824
AM_CONDITIONAL(WITH_LUAEXT,[test "$with_lua" = yes])
828
825
 
829
826
with_dmalloc=no
830
 
AC_ARG_WITH(dmalloc, [  --with-dmalloc          build with dmalloc debugging support ])
 
827
AC_ARG_WITH(dmalloc, [AS_HELP_STRING([--with-dmalloc],[build with dmalloc debugging support])])
831
828
if test "$with_dmalloc" = yes ; then
832
829
  AC_DEFINE(DMALLOC, 1, [Build with dmalloc support?])
833
830
  LIBS="$LIBS -ldmalloc"
859
856
    dnl Does chown() follow symlinks? This should be a good enough test.
860
857
    AC_MSG_CHECKING(whether chown() follows symlinks)
861
858
    AC_ARG_ENABLE([broken-chown],
862
 
    [  --enable-broken-chown   this system's chown follows symbolic links], 
 
859
            [AS_HELP_STRING([--enable-broken-chown],[this system's chown follows symbolic links])], 
863
860
            result=$enableval, result=unknown)
864
861
    if echo "$build" | ${EGREP} "(aix)|(hpux)|(linux)" > /dev/null ; then
865
862
        result=yes