bf05bed108219a3644935e290c74dc2ac150898f diff --git a/configure.in b/configure.in index 34c79a5..5a4ec23 100644 --- a/configure.in +++ b/configure.in @@ -62,6 +62,7 @@ AC_ISC_POSIX AC_HEADER_STDC AC_C_INLINE AM_PROG_LIBTOOL +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests],[enable unit test code]),enable_tests=$enableval,enable_tests=$USE_MAINTAINER_MODE) AC_ARG_ENABLE(ansi, AS_HELP_STRING([--enable-ansi],[enable -ansi -pedantic gcc flags]),enable_ansi=$enableval,enable_ansi=no) @@ -93,7 +94,7 @@ AC_ARG_WITH(dbus_daemondir, AS_HELP_STRING([--with-dbus-daemondir=[dirname]],[Di AC_DEFINE(DBUS_UNIX,1,[dbus on unix]) -dnl DBUS_BUILD_TESTS controls unit tests built in to .c files +dnl DBUS_BUILD_TESTS controls unit tests built in to .c files dnl and also some stuff in the test/ subdir AM_CONDITIONAL(DBUS_BUILD_TESTS, test x$enable_tests = xyes) if test x$enable_tests = xyes; then @@ -110,7 +111,7 @@ if test x$enable_asserts = xno; then R_DYNAMIC_LDFLAG="" else # -rdynamic is needed for glibc's backtrace_symbols to work. - # No clue how much overhead this adds, but it's useful + # No clue how much overhead this adds, but it's useful # to do this on any assertion failure, # so for now it's enabled anytime asserts are (currently not # in production builds). @@ -136,7 +137,7 @@ if test x$enable_gcov = xyes; then AC_MSG_CHECKING([for gcc 3.3 version of gcov file format]) have_gcc33_gcov=no - AC_RUN_IFELSE( [AC_LANG_PROGRAM( , [[ if (__GNUC__ >=3 && __GNUC_MINOR__ >= 3) exit (0); else exit (1); ]])], + AC_RUN_IFELSE( [AC_LANG_PROGRAM( , [[ if (__GNUC__ >=3 && __GNUC_MINOR__ >= 3) exit (0); else exit (1); ]])], have_gcc33_gcov=yes) if test x$have_gcc33_gcov = xyes ; then AC_DEFINE_UNQUOTED(DBUS_HAVE_GCC33_GCOV, 1, [Defined if we have gcc 3.3 and thus the new gcov format]) @@ -145,7 +146,7 @@ if test x$enable_gcov = xyes; then fi AM_CONDITIONAL(DBUS_GCOV_ENABLED, test x$enable_gcov = xyes) -#### Integer sizes +#### Integer sizes AC_CHECK_SIZEOF(char) AC_CHECK_SIZEOF(short) @@ -411,13 +412,13 @@ DIR *dirp; dirp = opendir("."); dirfd(dirp); closedir(dirp); -], +], dbus_have_dirfd=yes, dbus_have_dirfd=no) AC_MSG_RESULT($dbus_have_dirfd) if test "$dbus_have_dirfd" = yes; then AC_DEFINE(HAVE_DIRFD,1,[Have dirfd function]) else - AC_MSG_CHECKING(for DIR *dirp->dd_fd) + AC_MSG_CHECKING(for DIR *dirp->dd_fd) AC_TRY_LINK([ #include #include @@ -449,7 +450,7 @@ case $host_os in solaris*) CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS" ;; esac - + # checking for a posix version of getpwnam_r # if we are cross compiling and can not run the test # assume getpwnam_r is the posix version @@ -468,10 +469,10 @@ AC_CACHE_CHECK([for posix getpwnam_r], struct passwd pwd, *pwptr = &pwd; int error; errno = 0; - error = getpwnam_r ("", &pwd, buffer, + error = getpwnam_r ("", &pwd, buffer, sizeof (buffer), &pwptr); - return (error < 0 && errno == ENOSYS) - || error == ENOSYS; + return (error < 0 && errno == ENOSYS) + || error == ENOSYS; ]])], [ac_cv_func_posix_getpwnam_r=yes], [ac_cv_func_posix_getpwnam_r=no], @@ -488,7 +489,7 @@ else [AC_TRY_LINK([#include ], [char buffer[10000]; struct passwd pwd; - getpwnam_r ("", &pwd, buffer, + getpwnam_r ("", &pwd, buffer, sizeof (buffer));], [ac_cv_func_nonposix_getpwnam_r=yes], [ac_cv_func_nonposix_getpwnam_r=no])]) @@ -514,7 +515,7 @@ if test "x$dbus_have_socklen_t" = "xyes"; then AC_DEFINE(HAVE_SOCKLEN_T,1,[Have socklen_t type]) fi -dnl check for writev header and writev function so we're +dnl check for writev header and writev function so we're dnl good to go if HAVE_WRITEV gets defined. AC_CHECK_HEADERS(sys/uio.h, [AC_CHECK_FUNCS(writev)]) @@ -589,9 +590,9 @@ AC_CACHE_CHECK([abstract socket namespace], [[ int listen_fd; struct sockaddr_un addr; - + listen_fd = socket (PF_UNIX, SOCK_STREAM, 0); - + if (listen_fd < 0) { fprintf (stderr, "socket() failed: %s\n", strerror (errno)); @@ -602,14 +603,14 @@ AC_CACHE_CHECK([abstract socket namespace], addr.sun_family = AF_UNIX; strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test"); addr.sun_path[0] = '\0'; /* this is what makes it abstract */ - + if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0) { - fprintf (stderr, "Abstract socket namespace bind() failed: %s\n", + fprintf (stderr, "Abstract socket namespace bind() failed: %s\n", strerror (errno)); exit (1); } - else + else exit (0); ]])], [ac_cv_have_abstract_sockets=yes], @@ -642,8 +643,8 @@ else DBUS_PATH_OR_ABSTRACT=path fi -# this is used in addresses to prefer abstract, e.g. -# unix:path=/foo or unix:abstract=/foo +# this is used in addresses to prefer abstract, e.g. +# unix:path=/foo or unix:abstract=/foo AC_SUBST(DBUS_PATH_OR_ABSTRACT) #### Sort out XML library @@ -668,7 +669,7 @@ elif test x$with_xml = xlibxml; then fi dbus_use_libxml=true else - ### expat is the default because libxml can't currently survive + ### expat is the default because libxml can't currently survive ### our brutal OOM-handling unit test setup. ### http://bugzilla.gnome.org/show_bug.cgi?id=109368 if test x$have_expat = xfalse; then @@ -724,7 +725,7 @@ if test x$enable_selinux = xno ; then have_selinux=no; else # See if we have SELinux library - AC_CHECK_LIB(selinux, is_selinux_enabled, + AC_CHECK_LIB(selinux, is_selinux_enabled, have_selinux=yes, have_selinux=no) # see if we have the SELinux header with the new D-Bus stuff in it @@ -743,7 +744,7 @@ else if test x$have_selinux = xno ; then AC_MSG_WARN([Sufficiently new SELinux library not found]) fi - else + else if test x$have_selinux = xno ; then AC_MSG_ERROR([SElinux explicitly required, and SELinux library not found]) fi @@ -784,7 +785,7 @@ if test x$enable_dnotify = xno ; then have_dnotify=no; else if test x$have_inotify = xno -a x$host_os = xlinux-gnu -o x$host_os = xlinux; then - have_dnotify=yes; + have_dnotify=yes; else have_dnotify=no; fi @@ -815,7 +816,7 @@ if test x$have_kqueue = xyes; then AC_DEFINE(DBUS_BUS_ENABLE_KQUEUE,1,[Use kqueue]) fi -AM_CONDITIONAL(DBUS_BUS_ENABLE_KQUEUE, test x$have_kqueue = xyes) +AM_CONDITIONAL(DBUS_BUS_ENABLE_KQUEUE, test x$have_kqueue = xyes) dnl console owner file if test x$enable_console_owner_file = xno ; then @@ -838,10 +839,10 @@ if test x$enable_libaudit = xno ; then have_libaudit=no; else # See if we have audit daemon & capabilities library - AC_CHECK_LIB(audit, audit_log_user_avc_message, + AC_CHECK_LIB(audit, audit_log_user_avc_message, have_libaudit=yes, have_libaudit=no) if test x$have_libaudit = xyes ; then - AC_CHECK_LIB(cap, cap_set_proc, + AC_CHECK_LIB(cap, cap_set_proc, have_libaudit=yes, have_libaudit=no) fi fi @@ -906,7 +907,7 @@ AC_SUBST(DBUS_TEST_LIBS) ### X11 detection AC_PATH_XTRA -## for now enable_x11 just tracks have_x11, +## for now enable_x11 just tracks have_x11, ## there's no --enable-x11 if test x$no_x = xyes ; then have_x11=no @@ -1021,7 +1022,7 @@ if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-Wfloat-equal[\ \ ]*) ;; *) if cc_supports_flag -Wfloat-equals; then - CFLAGS="$CFLAGS -Wfloat-equal" + CFLAGS="$CFLAGS -Wfloat-equal" fi ;; esac @@ -1065,18 +1066,18 @@ if test "x$GCC" = "xyes"; then fi ;; esac - + ### Disabled warnings, and compiler flag overrides - + # Let's just ignore unused for now case " $CFLAGS " in *[\ \ ]-Wno-unused[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wno-unused" ;; - esac - + esac + # This group is for warnings we currently don't pass. # We would like to, however. Please fix. - + # http://bugs.freedesktop.org/show_bug.cgi?id=17433 case " $CFLAGS " in *[\ \ ]-Wno-sign-compare[\ \ ]*) ;; @@ -1088,14 +1089,14 @@ if test "x$GCC" = "xyes"; then CFLAGS="$CFLAGS -Wno-pointer-sign" fi ;; - esac - + esac + # http://bugs.freedesktop.org/show_bug.cgi?id=19195 case " $CFLAGS " in *[\ \ ]-Wno-format[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wno-format" ;; esac - + # This one is special - it's not a warning override. # http://bugs.freedesktop.org/show_bug.cgi?id=10599 case " $CFLAGS " in @@ -1123,7 +1124,7 @@ if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-pedantic[\ \ ]*) ;; *) CFLAGS="$CFLAGS -pedantic" ;; - esac + esac fi if test x$enable_gcov = xyes; then case " $CFLAGS " in @@ -1146,9 +1147,9 @@ else fi AC_SUBST(PIC_CFLAGS) -AC_SUBST(PIC_LDFLAGS) +AC_SUBST(PIC_LDFLAGS) AC_SUBST(PIE_CFLAGS) -AC_SUBST(PIE_LDFLAGS) +AC_SUBST(PIE_LDFLAGS) if ld_supports_flag --gc-sections; then SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS" @@ -1164,7 +1165,7 @@ case $host_os in solaris*) CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS" ;; esac - + changequote(,)dnl # compress spaces in flags CFLAGS=`echo "$CFLAGS" | sed -e 's/ +/ /g'` @@ -1280,7 +1281,7 @@ fi AC_SUBST(DBUS_SYSTEM_SOCKET) AC_DEFINE_UNQUOTED(DBUS_SYSTEM_SOCKET,"$DBUS_SYSTEM_SOCKET",[The name of the socket the system bus listens on by default]) -## system bus only listens on local domain sockets, and never +## system bus only listens on local domain sockets, and never ## on an abstract socket (so only root can create the socket) DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="unix:path=$DBUS_SYSTEM_SOCKET" AC_SUBST(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS)