summaryrefslogtreecommitdiff
path: root/debian/patches/99-autoreconf.patch
blob: 733d31b865c3ed3fe71c3baa0c267e6821738e38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
Index: consolekit/aclocal.m4
===================================================================
--- consolekit.orig/aclocal.m4	2009-11-04 19:45:33.562022249 +0100
+++ consolekit/aclocal.m4	2009-11-04 19:44:43.682021633 +0100
@@ -2933,6 +2933,18 @@
   dynamic_linker='GNU/Linux ld.so'
   ;;
 
+netbsdelf*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='NetBSD ld.elf_so'
+  ;;
+
 netbsd*)
   version_type=sunos
   need_lib_prefix=no
@@ -3524,7 +3536,7 @@
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-netbsd*)
+netbsd* | netbsdelf*-gnu)
   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
   else
@@ -4205,7 +4217,7 @@
 	    ;;
 	esac
 	;;
-      netbsd*)
+      netbsd* | netbsdelf*-gnu)
 	;;
       *qnx* | *nto*)
         # QNX uses GNU C++, but need to define -shared option too, otherwise
@@ -4630,6 +4642,9 @@
   cygwin* | mingw* | cegcc*)
     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
   ;;
+  linux* | k*bsd*-gnu)
+    _LT_TAGVAR(link_all_deplibs, $1)=no
+  ;;
   *)
     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
   ;;
@@ -4694,6 +4709,9 @@
   openbsd*)
     with_gnu_ld=no
     ;;
+  linux* | k*bsd*-gnu)
+    _LT_TAGVAR(link_all_deplibs, $1)=no
+    ;;
   esac
 
   _LT_TAGVAR(ld_shlibs, $1)=yes
@@ -4876,7 +4894,7 @@
       fi
       ;;
 
-    netbsd*)
+    netbsd* | netbsdelf*-gnu)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
@@ -5051,6 +5069,7 @@
 	if test "$aix_use_runtimelinking" = yes; then
 	  shared_flag="$shared_flag "'${wl}-G'
 	fi
+	_LT_TAGVAR(link_all_deplibs, $1)=no
       else
 	# not using gcc
 	if test "$host_cpu" = ia64; then
@@ -5289,7 +5308,7 @@
       _LT_TAGVAR(link_all_deplibs, $1)=yes
       ;;
 
-    netbsd*)
+    netbsd* | netbsdelf*-gnu)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
       else
@@ -8466,14 +8485,16 @@
 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 # ---------------------------------------------
 m4_define([_PKG_CONFIG],
-[if test -n "$$1"; then
-    pkg_cv_[]$1="$$1"
- elif test -n "$PKG_CONFIG"; then
-    PKG_CHECK_EXISTS([$3],
-                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
-		     [pkg_failed=yes])
- else
-    pkg_failed=untried
+[if test -n "$PKG_CONFIG"; then
+    if test -n "$$1"; then
+        pkg_cv_[]$1="$$1"
+    else
+        PKG_CHECK_EXISTS([$3],
+                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+			 [pkg_failed=yes])
+    fi
+else
+	pkg_failed=untried
 fi[]dnl
 ])# _PKG_CONFIG
 
@@ -8517,9 +8538,9 @@
 if test $pkg_failed = yes; then
         _PKG_SHORT_ERRORS_SUPPORTED
         if test $_pkg_short_errors_supported = yes; then
-	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
         else 
-	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
Index: consolekit/configure
===================================================================
--- consolekit.orig/configure	2009-11-04 19:45:33.214032944 +0100
+++ consolekit/configure	2009-11-04 19:44:55.010015927 +0100
@@ -805,6 +805,8 @@
 HAVE_PAM_FALSE
 HAVE_PAM_TRUE
 CK_BACKEND
+CK_COMPILE_GNU_FALSE
+CK_COMPILE_GNU_TRUE
 CK_COMPILE_SOLARIS_FALSE
 CK_COMPILE_SOLARIS_TRUE
 CK_COMPILE_FREEBSD_FALSE
@@ -6277,13 +6279,13 @@
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:6280: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:6282: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:6283: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:6285: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:6286: output\"" >&5)
+  (eval echo "\"\$as_me:6288: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -6753,7 +6755,7 @@
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-netbsd*)
+netbsd* | netbsdelf*-gnu)
   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
   else
@@ -7488,7 +7490,7 @@
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 7491 "configure"' > conftest.$ac_ext
+  echo '#line 7493 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -8823,11 +8825,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8826: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8828: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8830: \$? = $ac_status" >&5
+   echo "$as_me:8832: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -9162,11 +9164,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9165: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:9167: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:9169: \$? = $ac_status" >&5
+   echo "$as_me:9171: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -9267,11 +9269,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9270: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:9272: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:9274: \$? = $ac_status" >&5
+   echo "$as_me:9276: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -9322,11 +9324,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9325: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:9327: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:9329: \$? = $ac_status" >&5
+   echo "$as_me:9331: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -9441,6 +9443,9 @@
   openbsd*)
     with_gnu_ld=no
     ;;
+  linux* | k*bsd*-gnu)
+    link_all_deplibs=no
+    ;;
   esac
 
   ld_shlibs=yes
@@ -9623,7 +9628,7 @@
       fi
       ;;
 
-    netbsd*)
+    netbsd* | netbsdelf*-gnu)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
@@ -9798,6 +9803,7 @@
 	if test "$aix_use_runtimelinking" = yes; then
 	  shared_flag="$shared_flag "'${wl}-G'
 	fi
+	link_all_deplibs=no
       else
 	# not using gcc
 	if test "$host_cpu" = ia64; then
@@ -10212,7 +10218,7 @@
       link_all_deplibs=yes
       ;;
 
-    netbsd*)
+    netbsd* | netbsdelf*-gnu)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
       else
@@ -11189,6 +11195,18 @@
   dynamic_linker='GNU/Linux ld.so'
   ;;
 
+netbsdelf*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='NetBSD ld.elf_so'
+  ;;
+
 netbsd*)
   version_type=sunos
   need_lib_prefix=no
@@ -12122,7 +12140,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12125 "configure"
+#line 12143 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12218,7 +12236,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12221 "configure"
+#line 12239 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15109,10 +15127,11 @@
 { $as_echo "$as_me:$LINENO: checking for CONSOLE_KIT" >&5
 $as_echo_n "checking for CONSOLE_KIT... " >&6; }
 
-if test -n "$CONSOLE_KIT_CFLAGS"; then
-    pkg_cv_CONSOLE_KIT_CFLAGS="$CONSOLE_KIT_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
+if test -n "$PKG_CONFIG"; then
+    if test -n "$CONSOLE_KIT_CFLAGS"; then
+        pkg_cv_CONSOLE_KIT_CFLAGS="$CONSOLE_KIT_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
     { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-glib-1 >= \$DBUS_REQUIRED_VERSION
   gobject-2.0 >= \$GLIB_REQUIRED_VERSION
   gthread-2.0 >= \$GLIB_REQUIRED_VERSION
@@ -15131,13 +15150,15 @@
 else
   pkg_failed=yes
 fi
- else
-    pkg_failed=untried
+    fi
+else
+	pkg_failed=untried
 fi
-if test -n "$CONSOLE_KIT_LIBS"; then
-    pkg_cv_CONSOLE_KIT_LIBS="$CONSOLE_KIT_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
+if test -n "$PKG_CONFIG"; then
+    if test -n "$CONSOLE_KIT_LIBS"; then
+        pkg_cv_CONSOLE_KIT_LIBS="$CONSOLE_KIT_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
     { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-glib-1 >= \$DBUS_REQUIRED_VERSION
   gobject-2.0 >= \$GLIB_REQUIRED_VERSION
   gthread-2.0 >= \$GLIB_REQUIRED_VERSION
@@ -15156,8 +15177,9 @@
 else
   pkg_failed=yes
 fi
- else
-    pkg_failed=untried
+    fi
+else
+	pkg_failed=untried
 fi
 
 
@@ -15170,15 +15192,15 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        CONSOLE_KIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dbus-glib-1 >= $DBUS_REQUIRED_VERSION
+	        CONSOLE_KIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dbus-glib-1 >= $DBUS_REQUIRED_VERSION
   gobject-2.0 >= $GLIB_REQUIRED_VERSION
   gthread-2.0 >= $GLIB_REQUIRED_VERSION
-" 2>&1`
+"`
         else
-	        CONSOLE_KIT_PKG_ERRORS=`$PKG_CONFIG --print-errors "dbus-glib-1 >= $DBUS_REQUIRED_VERSION
+	        CONSOLE_KIT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-glib-1 >= $DBUS_REQUIRED_VERSION
   gobject-2.0 >= $GLIB_REQUIRED_VERSION
   gthread-2.0 >= $GLIB_REQUIRED_VERSION
-" 2>&1`
+"`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$CONSOLE_KIT_PKG_ERRORS" >&5
@@ -15249,10 +15271,11 @@
 { $as_echo "$as_me:$LINENO: checking for POLKIT" >&5
 $as_echo_n "checking for POLKIT... " >&6; }
 
-if test -n "$POLKIT_CFLAGS"; then
-    pkg_cv_POLKIT_CFLAGS="$POLKIT_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
+if test -n "$PKG_CONFIG"; then
+    if test -n "$POLKIT_CFLAGS"; then
+        pkg_cv_POLKIT_CFLAGS="$POLKIT_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
     { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"polkit-gobject-1 >= \$POLKIT_REQUIRED_VERSION\"") >&5
   ($PKG_CONFIG --exists --print-errors "polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION") 2>&5
   ac_status=$?
@@ -15262,13 +15285,15 @@
 else
   pkg_failed=yes
 fi
- else
-    pkg_failed=untried
+    fi
+else
+	pkg_failed=untried
 fi
-if test -n "$POLKIT_LIBS"; then
-    pkg_cv_POLKIT_LIBS="$POLKIT_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
+if test -n "$PKG_CONFIG"; then
+    if test -n "$POLKIT_LIBS"; then
+        pkg_cv_POLKIT_LIBS="$POLKIT_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
     { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"polkit-gobject-1 >= \$POLKIT_REQUIRED_VERSION\"") >&5
   ($PKG_CONFIG --exists --print-errors "polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION") 2>&5
   ac_status=$?
@@ -15278,8 +15303,9 @@
 else
   pkg_failed=yes
 fi
- else
-    pkg_failed=untried
+    fi
+else
+	pkg_failed=untried
 fi
 
 
@@ -15292,9 +15318,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        POLKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION" 2>&1`
+	        POLKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION"`
         else
-	        POLKIT_PKG_ERRORS=`$PKG_CONFIG --print-errors "polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION" 2>&1`
+	        POLKIT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION"`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$POLKIT_PKG_ERRORS" >&5
@@ -15333,10 +15359,11 @@
 { $as_echo "$as_me:$LINENO: checking for LIBDBUS" >&5
 $as_echo_n "checking for LIBDBUS... " >&6; }
 
-if test -n "$LIBDBUS_CFLAGS"; then
-    pkg_cv_LIBDBUS_CFLAGS="$LIBDBUS_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
+if test -n "$PKG_CONFIG"; then
+    if test -n "$LIBDBUS_CFLAGS"; then
+        pkg_cv_LIBDBUS_CFLAGS="$LIBDBUS_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
     { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-1 >= \$DBUS_REQUIRED_VERSION
 \"") >&5
   ($PKG_CONFIG --exists --print-errors "dbus-1 >= $DBUS_REQUIRED_VERSION
@@ -15349,13 +15376,15 @@
 else
   pkg_failed=yes
 fi
- else
-    pkg_failed=untried
+    fi
+else
+	pkg_failed=untried
 fi
-if test -n "$LIBDBUS_LIBS"; then
-    pkg_cv_LIBDBUS_LIBS="$LIBDBUS_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
+if test -n "$PKG_CONFIG"; then
+    if test -n "$LIBDBUS_LIBS"; then
+        pkg_cv_LIBDBUS_LIBS="$LIBDBUS_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
     { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-1 >= \$DBUS_REQUIRED_VERSION
 \"") >&5
   ($PKG_CONFIG --exists --print-errors "dbus-1 >= $DBUS_REQUIRED_VERSION
@@ -15368,8 +15397,9 @@
 else
   pkg_failed=yes
 fi
- else
-    pkg_failed=untried
+    fi
+else
+	pkg_failed=untried
 fi
 
 
@@ -15382,11 +15412,11 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        LIBDBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dbus-1 >= $DBUS_REQUIRED_VERSION
-" 2>&1`
+	        LIBDBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dbus-1 >= $DBUS_REQUIRED_VERSION
+"`
         else
-	        LIBDBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors "dbus-1 >= $DBUS_REQUIRED_VERSION
-" 2>&1`
+	        LIBDBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= $DBUS_REQUIRED_VERSION
+"`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$LIBDBUS_PKG_ERRORS" >&5
@@ -15452,10 +15482,11 @@
 { $as_echo "$as_me:$LINENO: checking for TOOLS" >&5
 $as_echo_n "checking for TOOLS... " >&6; }
 
-if test -n "$TOOLS_CFLAGS"; then
-    pkg_cv_TOOLS_CFLAGS="$TOOLS_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
+if test -n "$PKG_CONFIG"; then
+    if test -n "$TOOLS_CFLAGS"; then
+        pkg_cv_TOOLS_CFLAGS="$TOOLS_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
     { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 >= \$X11_REQUIRED_VERSION
   glib-2.0 >= \$GLIB_REQUIRED_VERSION
 \"") >&5
@@ -15471,13 +15502,15 @@
 else
   pkg_failed=yes
 fi
- else
-    pkg_failed=untried
+    fi
+else
+	pkg_failed=untried
 fi
-if test -n "$TOOLS_LIBS"; then
-    pkg_cv_TOOLS_LIBS="$TOOLS_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
+if test -n "$PKG_CONFIG"; then
+    if test -n "$TOOLS_LIBS"; then
+        pkg_cv_TOOLS_LIBS="$TOOLS_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
     { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 >= \$X11_REQUIRED_VERSION
   glib-2.0 >= \$GLIB_REQUIRED_VERSION
 \"") >&5
@@ -15493,8 +15526,9 @@
 else
   pkg_failed=yes
 fi
- else
-    pkg_failed=untried
+    fi
+else
+	pkg_failed=untried
 fi
 
 
@@ -15507,13 +15541,13 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        TOOLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11 >= $X11_REQUIRED_VERSION
+	        TOOLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 >= $X11_REQUIRED_VERSION
   glib-2.0 >= $GLIB_REQUIRED_VERSION
-" 2>&1`
+"`
         else
-	        TOOLS_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11 >= $X11_REQUIRED_VERSION
+	        TOOLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 >= $X11_REQUIRED_VERSION
   glib-2.0 >= $GLIB_REQUIRED_VERSION
-" 2>&1`
+"`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$TOOLS_PKG_ERRORS" >&5
@@ -15582,10 +15616,11 @@
 { $as_echo "$as_me:$LINENO: checking for HISTORY" >&5
 $as_echo_n "checking for HISTORY... " >&6; }
 
-if test -n "$HISTORY_CFLAGS"; then
-    pkg_cv_HISTORY_CFLAGS="$HISTORY_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
+if test -n "$PKG_CONFIG"; then
+    if test -n "$HISTORY_CFLAGS"; then
+        pkg_cv_HISTORY_CFLAGS="$HISTORY_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
     { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_REQUIRED_VERSION
 \"") >&5
   ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_REQUIRED_VERSION
@@ -15598,13 +15633,15 @@
 else
   pkg_failed=yes
 fi
- else
-    pkg_failed=untried
+    fi
+else
+	pkg_failed=untried
 fi
-if test -n "$HISTORY_LIBS"; then
-    pkg_cv_HISTORY_LIBS="$HISTORY_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
+if test -n "$PKG_CONFIG"; then
+    if test -n "$HISTORY_LIBS"; then
+        pkg_cv_HISTORY_LIBS="$HISTORY_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
     { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_REQUIRED_VERSION
 \"") >&5
   ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_REQUIRED_VERSION
@@ -15617,8 +15654,9 @@
 else
   pkg_failed=yes
 fi
- else
-    pkg_failed=untried
+    fi
+else
+	pkg_failed=untried
 fi
 
 
@@ -15631,11 +15669,11 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        HISTORY_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= $GLIB_REQUIRED_VERSION
-" 2>&1`
+	        HISTORY_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0 >= $GLIB_REQUIRED_VERSION
+"`
         else
-	        HISTORY_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= $GLIB_REQUIRED_VERSION
-" 2>&1`
+	        HISTORY_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= $GLIB_REQUIRED_VERSION
+"`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$HISTORY_PKG_ERRORS" >&5
@@ -16237,7 +16275,7 @@
 CK_BACKEND=""
 KVM_LIBS=""
 case "$host" in
-        *-*-freebsd*)
+        *-*-freebsd* | *-*-kfreebsd*-gnu)
         CK_BACKEND="freebsd"
         { $as_echo "$as_me:$LINENO: checking for kvm_openfiles in -lkvm" >&5
 $as_echo_n "checking for kvm_openfiles in -lkvm... " >&6; }
@@ -16322,6 +16360,9 @@
         *-*-solaris*)
         CK_BACKEND="solaris"
         ;;
+        *-*-gnu*)
+        CK_BACKEND="gnu"
+        ;;
 	*)
 	{ { $as_echo "$as_me:$LINENO: error: No sysdeps back-end implemented for host $host" >&5
 $as_echo "$as_me: error: No sysdeps back-end implemented for host $host" >&2;}
@@ -16355,6 +16396,14 @@
   CK_COMPILE_SOLARIS_FALSE=
 fi
 
+ if test x$CK_BACKEND = xgnu; then
+  CK_COMPILE_GNU_TRUE=
+  CK_COMPILE_GNU_FALSE='#'
+else
+  CK_COMPILE_GNU_TRUE='#'
+  CK_COMPILE_GNU_FALSE=
+fi
+
 
 
 
@@ -17388,6 +17437,13 @@
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
+if test -z "${CK_COMPILE_GNU_TRUE}" && test -z "${CK_COMPILE_GNU_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"CK_COMPILE_GNU\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"CK_COMPILE_GNU\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 if test -z "${HAVE_PAM_TRUE}" && test -z "${HAVE_PAM_FALSE}"; then
   { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_PAM\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
Index: consolekit/src/Makefile.in
===================================================================
--- consolekit.orig/src/Makefile.in	2009-11-04 19:45:33.418020671 +0100
+++ consolekit/src/Makefile.in	2009-11-04 19:44:57.430016634 +0100
@@ -46,6 +46,10 @@
 @CK_COMPILE_FREEBSD_TRUE@	ck-sysdeps-freebsd.c	\
 @CK_COMPILE_FREEBSD_TRUE@	$(NULL)
 
+@CK_COMPILE_GNU_TRUE@am__append_4 = \
+@CK_COMPILE_GNU_TRUE@	ck-sysdeps-gnu.c	\
+@CK_COMPILE_GNU_TRUE@	$(NULL)
+
 sbin_PROGRAMS = console-kit-daemon$(EXEEXT) $(am__EXEEXT_1)
 noinst_PROGRAMS = test-event-logger$(EXEEXT) \
 	test-tty-idle-monitor$(EXEEXT) test-vt-monitor$(EXEEXT) \
@@ -69,15 +73,19 @@
 @CK_COMPILE_FREEBSD_TRUE@libck_la_DEPENDENCIES =  \
 @CK_COMPILE_FREEBSD_TRUE@	$(am__DEPENDENCIES_1)
 am__libck_la_SOURCES_DIST = ck-sysdeps.h ck-sysdeps-unix.c \
-	ck-sysdeps-linux.c ck-sysdeps-solaris.c ck-sysdeps-freebsd.c
+	ck-sysdeps-linux.c ck-sysdeps-solaris.c ck-sysdeps-freebsd.c \
+	ck-sysdeps-gnu.c
 @CK_COMPILE_LINUX_TRUE@am__objects_2 = ck-sysdeps-linux.lo \
 @CK_COMPILE_LINUX_TRUE@	$(am__objects_1)
 @CK_COMPILE_SOLARIS_TRUE@am__objects_3 = ck-sysdeps-solaris.lo \
 @CK_COMPILE_SOLARIS_TRUE@	$(am__objects_1)
 @CK_COMPILE_FREEBSD_TRUE@am__objects_4 = ck-sysdeps-freebsd.lo \
 @CK_COMPILE_FREEBSD_TRUE@	$(am__objects_1)
+@CK_COMPILE_GNU_TRUE@am__objects_5 = ck-sysdeps-gnu.lo \
+@CK_COMPILE_GNU_TRUE@	$(am__objects_1)
 am_libck_la_OBJECTS = ck-sysdeps-unix.lo $(am__objects_1) \
-	$(am__objects_2) $(am__objects_3) $(am__objects_4)
+	$(am__objects_2) $(am__objects_3) $(am__objects_4) \
+	$(am__objects_5)
 libck_la_OBJECTS = $(am_libck_la_OBJECTS)
 am__EXEEXT_1 =
 am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(dbusifdir)"
@@ -92,16 +100,16 @@
 	ck-manager-glue.h ck-seat-glue.h ck-session-glue.h \
 	ck-marshal.c ck-marshal.h ck-file-monitor-dummy.c \
 	ck-file-monitor-inotify.c
-am__objects_5 = ck-marshal.$(OBJEXT) $(am__objects_1)
-@ENABLE_INOTIFY_FALSE@am__objects_6 = ck-file-monitor-dummy.$(OBJEXT)
-@ENABLE_INOTIFY_TRUE@am__objects_6 =  \
+am__objects_6 = ck-marshal.$(OBJEXT) $(am__objects_1)
+@ENABLE_INOTIFY_FALSE@am__objects_7 = ck-file-monitor-dummy.$(OBJEXT)
+@ENABLE_INOTIFY_TRUE@am__objects_7 =  \
 @ENABLE_INOTIFY_TRUE@	ck-file-monitor-inotify.$(OBJEXT)
 am_console_kit_daemon_OBJECTS = main.$(OBJEXT) ck-manager.$(OBJEXT) \
 	ck-vt-monitor.$(OBJEXT) ck-tty-idle-monitor.$(OBJEXT) \
 	ck-job.$(OBJEXT) ck-seat.$(OBJEXT) ck-session-leader.$(OBJEXT) \
 	ck-session.$(OBJEXT) ck-log.$(OBJEXT) \
 	ck-run-programs.$(OBJEXT) ck-event-logger.$(OBJEXT) \
-	$(am__objects_5) $(am__objects_1) $(am__objects_6)
+	$(am__objects_6) $(am__objects_1) $(am__objects_7)
 console_kit_daemon_OBJECTS = $(am_console_kit_daemon_OBJECTS)
 console_kit_daemon_DEPENDENCIES = $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) libck.la \
@@ -117,7 +125,7 @@
 	ck-file-monitor-dummy.c ck-file-monitor-inotify.c \
 	test-tty-idle-monitor.c
 am_test_tty_idle_monitor_OBJECTS = ck-tty-idle-monitor.$(OBJEXT) \
-	$(am__objects_6) test-tty-idle-monitor.$(OBJEXT) \
+	$(am__objects_7) test-tty-idle-monitor.$(OBJEXT) \
 	$(am__objects_1)
 test_tty_idle_monitor_OBJECTS = $(am_test_tty_idle_monitor_OBJECTS)
 test_tty_idle_monitor_DEPENDENCIES = $(am__DEPENDENCIES_1) \
@@ -363,12 +371,15 @@
 	$(NULL)
 
 libck_la_SOURCES = ck-sysdeps.h ck-sysdeps-unix.c $(NULL) \
-	$(am__append_1) $(am__append_2) $(am__append_3)
+	$(am__append_1) $(am__append_2) $(am__append_3) \
+	$(am__append_4)
 @CK_COMPILE_FREEBSD_TRUE@libck_la_LIBADD = $(KVM_LIBS)
+@CK_COMPILE_GNU_TRUE@libck_la_LIBADD = -lps
 EXTRA_libck_la_SOURCES = \
 	ck-sysdeps-linux.c		\
 	ck-sysdeps-solaris.c		\
 	ck-sysdeps-freebsd.c		\
+	ck-sysdeps-gnu.c		\
 	$(NULL)
 
 BUILT_SOURCES = \
@@ -574,6 +585,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-session-leader.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-session.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-sysdeps-freebsd.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-sysdeps-gnu.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-sysdeps-linux.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-sysdeps-solaris.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-sysdeps-unix.Plo@am__quote@