aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMagnus Henoch2007-12-03 22:04:33 +0000
committerMagnus Henoch2007-12-03 22:04:33 +0000
commitcffe49096c0ad784de45d58602b7f52f6d67ffe0 (patch)
tree85d193ae896dfdd98eaa6d87125b0282f5776523
parentbedb08d44f3c32dae97693e3f095f1cfdfc66622 (diff)
downloademacs-cffe49096c0ad784de45d58602b7f52f6d67ffe0.tar.gz
emacs-cffe49096c0ad784de45d58602b7f52f6d67ffe0.zip
* configure.in: Use PKG_CHECK_MODULES to check for D-Bus.
* configure: Regenerate.
-rw-r--r--ChangeLog6
-rwxr-xr-xconfigure161
-rw-r--r--configure.in6
3 files changed, 99 insertions, 74 deletions
diff --git a/ChangeLog b/ChangeLog
index 75014df3b33..3935fb661f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
12007-12-03 Magnus Henoch <mange@freemail.hu>
2
3 * configure.in: Use PKG_CHECK_MODULES to check for D-Bus.
4
5 * configure: Regenerate.
6
12007-12-03 Michael Albinus <michael.albinus@gmx.de> 72007-12-03 Michael Albinus <michael.albinus@gmx.de>
2 8
3 * configure.in: No need for DBUS_INFO anymore. 9 * configure.in: No need for DBUS_INFO anymore.
diff --git a/configure b/configure
index 122bddb939f..19f55c23fe7 100755
--- a/configure
+++ b/configure
@@ -12004,70 +12004,101 @@ fi
12004 12004
12005HAVE_DBUS=no 12005HAVE_DBUS=no
12006if test "${with_dbus}" = "yes"; then 12006if test "${with_dbus}" = "yes"; then
12007 { echo "$as_me:$LINENO: checking for dbus_bus_get in -ldbus-1" >&5 12007
12008echo $ECHO_N "checking for dbus_bus_get in -ldbus-1... $ECHO_C" >&6; } 12008 succeeded=no
12009if test "${ac_cv_lib_dbus_1_dbus_bus_get+set}" = set; then 12009
12010 if test -z "$PKG_CONFIG"; then
12011 # Extract the first word of "pkg-config", so it can be a program name with args.
12012set dummy pkg-config; ac_word=$2
12013{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12014echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
12015if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12010 echo $ECHO_N "(cached) $ECHO_C" >&6 12016 echo $ECHO_N "(cached) $ECHO_C" >&6
12011else 12017else
12012 ac_check_lib_save_LIBS=$LIBS 12018 case $PKG_CONFIG in
12013LIBS="-ldbus-1 $LIBS" 12019 [\\/]* | ?:[\\/]*)
12014cat >conftest.$ac_ext <<_ACEOF 12020 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12015/* confdefs.h. */ 12021 ;;
12016_ACEOF 12022 *)
12017cat confdefs.h >>conftest.$ac_ext 12023 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12018cat >>conftest.$ac_ext <<_ACEOF 12024for as_dir in $PATH
12019/* end confdefs.h. */ 12025do
12026 IFS=$as_save_IFS
12027 test -z "$as_dir" && as_dir=.
12028 for ac_exec_ext in '' $ac_executable_extensions; do
12029 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12030 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12031 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12032 break 2
12033 fi
12034done
12035done
12036IFS=$as_save_IFS
12020 12037
12021/* Override any GCC internal prototype to avoid an error. 12038 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12022 Use char because int might match the return type of a GCC 12039 ;;
12023 builtin and then its argument prototype would still apply. */
12024#ifdef __cplusplus
12025extern "C"
12026#endif
12027char dbus_bus_get ();
12028int
12029main ()
12030{
12031return dbus_bus_get ();
12032 ;
12033 return 0;
12034}
12035_ACEOF
12036rm -f conftest.$ac_objext conftest$ac_exeext
12037if { (ac_try="$ac_link"
12038case "(($ac_try" in
12039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12040 *) ac_try_echo=$ac_try;;
12041esac 12040esac
12042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 12041fi
12043 (eval "$ac_link") 2>conftest.er1 12042PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12044 ac_status=$? 12043if test -n "$PKG_CONFIG"; then
12045 grep -v '^ *+' conftest.er1 >conftest.err 12044 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12046 rm -f conftest.er1 12045echo "${ECHO_T}$PKG_CONFIG" >&6; }
12047 cat conftest.err >&5
12048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12049 (exit $ac_status); } && {
12050 test -z "$ac_c_werror_flag" ||
12051 test ! -s conftest.err
12052 } && test -s conftest$ac_exeext &&
12053 $as_test_x conftest$ac_exeext; then
12054 ac_cv_lib_dbus_1_dbus_bus_get=yes
12055else 12046else
12056 echo "$as_me: failed program was:" >&5 12047 { echo "$as_me:$LINENO: result: no" >&5
12057sed 's/^/| /' conftest.$ac_ext >&5 12048echo "${ECHO_T}no" >&6; }
12058
12059 ac_cv_lib_dbus_1_dbus_bus_get=no
12060fi 12049fi
12061 12050
12062rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 12051
12063 conftest$ac_exeext conftest.$ac_ext 12052 fi
12064LIBS=$ac_check_lib_save_LIBS 12053
12065fi 12054 if test "$PKG_CONFIG" = "no" ; then
12066{ echo "$as_me:$LINENO: result: $ac_cv_lib_dbus_1_dbus_bus_get" >&5 12055 HAVE_DBUS=no
12067echo "${ECHO_T}$ac_cv_lib_dbus_1_dbus_bus_get" >&6; } 12056 else
12068if test $ac_cv_lib_dbus_1_dbus_bus_get = yes; then 12057 PKG_CONFIG_MIN_VERSION=0.9.0
12069 HAVE_DBUS=yes 12058 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12070fi 12059 { echo "$as_me:$LINENO: checking for dbus-1 >= 1.0" >&5
12060echo $ECHO_N "checking for dbus-1 >= 1.0... $ECHO_C" >&6; }
12061
12062 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
12063 { echo "$as_me:$LINENO: result: yes" >&5
12064echo "${ECHO_T}yes" >&6; }
12065 succeeded=yes
12066
12067 { echo "$as_me:$LINENO: checking DBUS_CFLAGS" >&5
12068echo $ECHO_N "checking DBUS_CFLAGS... $ECHO_C" >&6; }
12069 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
12070 { echo "$as_me:$LINENO: result: $DBUS_CFLAGS" >&5
12071echo "${ECHO_T}$DBUS_CFLAGS" >&6; }
12072
12073 { echo "$as_me:$LINENO: checking DBUS_LIBS" >&5
12074echo $ECHO_N "checking DBUS_LIBS... $ECHO_C" >&6; }
12075 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
12076 { echo "$as_me:$LINENO: result: $DBUS_LIBS" >&5
12077echo "${ECHO_T}$DBUS_LIBS" >&6; }
12078 else
12079 { echo "$as_me:$LINENO: result: no" >&5
12080echo "${ECHO_T}no" >&6; }
12081 DBUS_CFLAGS=""
12082 DBUS_LIBS=""
12083 ## If we have a custom action on failure, don't print errors, but
12084 ## do set a variable so people can do so.
12085 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
12086
12087 fi
12088
12089
12090
12091 else
12092 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12093 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12094 fi
12095 fi
12096
12097 if test $succeeded = yes; then
12098 HAVE_DBUS=yes
12099 else
12100 HAVE_DBUS=no
12101 fi
12071 12102
12072 if test "$HAVE_DBUS" = yes; then 12103 if test "$HAVE_DBUS" = yes; then
12073 12104
@@ -12075,10 +12106,6 @@ cat >>confdefs.h <<\_ACEOF
12075#define HAVE_DBUS 1 12106#define HAVE_DBUS 1
12076_ACEOF 12107_ACEOF
12077 12108
12078 DBUS_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include"
12079
12080 DBUS_LIBS="-ldbus-1"
12081
12082 fi 12109 fi
12083fi 12110fi
12084 12111
@@ -18560,13 +18587,11 @@ _ACEOF
18560cat confdefs.h >>conftest.$ac_ext 18587cat confdefs.h >>conftest.$ac_ext
18561cat >>conftest.$ac_ext <<_ACEOF 18588cat >>conftest.$ac_ext <<_ACEOF
18562/* end confdefs.h. */ 18589/* end confdefs.h. */
18563#include <sys/types.h> /* for off_t */ 18590#include <stdio.h>
18564 #include <stdio.h>
18565int 18591int
18566main () 18592main ()
18567{ 18593{
18568int (*fp) (FILE *, off_t, int) = fseeko; 18594return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
18569 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
18570 ; 18595 ;
18571 return 0; 18596 return 0;
18572} 18597}
@@ -18606,13 +18631,11 @@ cat confdefs.h >>conftest.$ac_ext
18606cat >>conftest.$ac_ext <<_ACEOF 18631cat >>conftest.$ac_ext <<_ACEOF
18607/* end confdefs.h. */ 18632/* end confdefs.h. */
18608#define _LARGEFILE_SOURCE 1 18633#define _LARGEFILE_SOURCE 1
18609#include <sys/types.h> /* for off_t */ 18634#include <stdio.h>
18610 #include <stdio.h>
18611int 18635int
18612main () 18636main ()
18613{ 18637{
18614int (*fp) (FILE *, off_t, int) = fseeko; 18638return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
18615 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
18616 ; 18639 ;
18617 return 0; 18640 return 0;
18618} 18641}
diff --git a/configure.in b/configure.in
index 9ddc30fdafc..c41db750d6f 100644
--- a/configure.in
+++ b/configure.in
@@ -2264,13 +2264,9 @@ dnl other platforms. Support for higher D-Bus versions but 1.0 is
2264dnl also not configured. 2264dnl also not configured.
2265HAVE_DBUS=no 2265HAVE_DBUS=no
2266if test "${with_dbus}" = "yes"; then 2266if test "${with_dbus}" = "yes"; then
2267 AC_CHECK_LIB(dbus-1, dbus_bus_get, HAVE_DBUS=yes) 2267 PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0, HAVE_DBUS=yes, HAVE_DBUS=no)
2268 if test "$HAVE_DBUS" = yes; then 2268 if test "$HAVE_DBUS" = yes; then
2269 AC_DEFINE(HAVE_DBUS, 1, [Define to 1 if using D-Bus.]) 2269 AC_DEFINE(HAVE_DBUS, 1, [Define to 1 if using D-Bus.])
2270 DBUS_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include"
2271 AC_SUBST(DBUS_CFLAGS)
2272 DBUS_LIBS="-ldbus-1"
2273 AC_SUBST(DBUS_LIBS)
2274 fi 2270 fi
2275fi 2271fi
2276 2272