Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 80219 | Differences between
and this patch

Collapse All | Expand All

(-)distcc-2.16/Makefile.in (-4 / +16 lines)
Lines 62-68 Link Here
62
GNOME_CFLAGS = @GNOME_CFLAGS@
62
GNOME_CFLAGS = @GNOME_CFLAGS@
63
GNOME_LIBS = @GNOME_LIBS@
63
GNOME_LIBS = @GNOME_LIBS@
64
64
65
LIBS = @LIBS@
65
LIBS = @LIBS@ @LIB_SLP@
66
66
67
DESTDIR =
67
DESTDIR =
68
68
Lines 84-89 Link Here
84
	$(MEN)							\
84
	$(MEN)							\
85
	$(pkgdoc_DOCS)						\
85
	$(pkgdoc_DOCS)						\
86
	$(example_DOCS)						\
86
	$(example_DOCS)						\
87
	$(slp_EXTRA) $(slp_SRC) $(slp_HEADERS)				\
87
	$(popt_EXTRA) $(popt_SRC) $(popt_HEADERS)		\
88
	$(popt_EXTRA) $(popt_SRC) $(popt_HEADERS)		\
88
	$(SRC) $(HEADERS)					\
89
	$(SRC) $(HEADERS)					\
89
	$(test_SOURCE)						\
90
	$(test_SOURCE)						\
Lines 176-181 Link Here
176
	src/safeguard.o src/snprintf.o src/timeval.o			\
177
	src/safeguard.o src/snprintf.o src/timeval.o			\
177
	lzo/minilzo.o
178
	lzo/minilzo.o
178
179
180
distccenv_obj = src/distccenv.o src/cc_version.o
181
179
distcc_obj = src/backoff.o						\
182
distcc_obj = src/backoff.o						\
180
	src/climasq.o src/clinet.o src/clirpc.o				\
183
	src/climasq.o src/clinet.o src/clirpc.o				\
181
	src/compile.o src/cpp.o						\
184
	src/compile.o src/cpp.o						\
Lines 193-199 Link Here
193
	src/ncpus.o							\
196
	src/ncpus.o							\
194
	src/prefork.o							\
197
	src/prefork.o							\
195
	src/serve.o src/setuid.o src/srvnet.o src/srvrpc.o		\
198
	src/serve.o src/setuid.o src/srvnet.o src/srvrpc.o		\
196
	$(common_obj) @BUILD_POPT@
199
	$(common_obj) @BUILD_POPT@ @BUILD_SLP@
197
200
198
# Objects that need to be linked in to build monitors
201
# Objects that need to be linked in to build monitors
199
mon_obj =								\
202
mon_obj =								\
Lines 227-233 Link Here
227
	src/cleanup.c							\
230
	src/cleanup.c							\
228
	src/climasq.c src/clinet.c src/clirpc.c src/compile.c		\
231
	src/climasq.c src/clinet.c src/clirpc.c src/compile.c		\
229
	src/compress.c src/cpp.c					\
232
	src/compress.c src/cpp.c					\
230
	src/daemon.c src/distcc.c src/dsignal.c				\
233
	src/daemon.c src/distcc.c src/dsignal.c src/register_slp.c	\
231
	src/dopt.c src/dparent.c src/exec.c src/filename.c		\
234
	src/dopt.c src/dparent.c src/exec.c src/filename.c		\
232
	src/h_argvtostr.c						\
235
	src/h_argvtostr.c						\
233
	src/h_exten.c src/h_hosts.c src/h_issource.c src/h_parsemask.c	\
236
	src/h_exten.c src/h_hosts.c src/h_issource.c src/h_parsemask.c	\
Lines 270-275 Link Here
270
gnome_data = gnome/distccmon-gnome-icon.png	\
273
gnome_data = gnome/distccmon-gnome-icon.png	\
271
	gnome/distccmon-gnome.desktop
274
	gnome/distccmon-gnome.desktop
272
275
276
slp_OBJS=src/register_slp.o src/cc_version.o
277
slp_SRC=src/register_slp.c src/cc_version.c
278
slp_HEADERS = src/register_slp.h src/cc_version.h
279
slp_EXTRA = README.slp
280
273
popt_OBJS=popt/findme.o  popt/popt.o  popt/poptconfig.o \
281
popt_OBJS=popt/findme.o  popt/popt.o  popt/poptconfig.o \
274
	popt/popthelp.o popt/poptparse.o
282
	popt/popthelp.o popt/poptparse.o
275
283
Lines 297-303 Link Here
297
	distcc@EXEEXT@ \
305
	distcc@EXEEXT@ \
298
	distccd@EXEEXT@ \
306
	distccd@EXEEXT@ \
299
	distccmon-text@EXEEXT@ \
307
	distccmon-text@EXEEXT@ \
300
	@GNOME_BIN@ 
308
	@GNOME_BIN@ \
309
	@SLP_BIN@ 
301
310
302
check_PROGRAMS = \
311
check_PROGRAMS = \
303
	h_argvtostr@EXEEXT@ \
312
	h_argvtostr@EXEEXT@ \
Lines 339-344 Link Here
339
distcc@EXEEXT@: $(distcc_obj)
348
distcc@EXEEXT@: $(distcc_obj)
340
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(distcc_obj) $(LIBS)
349
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(distcc_obj) $(LIBS)
341
350
351
distccenv@EXEEXT@: $(distccenv_obj)
352
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(distccenv_obj) $(LIBS)
353
342
distccd@EXEEXT@: $(distccd_obj)
354
distccd@EXEEXT@: $(distccd_obj)
343
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(distccd_obj) $(LIBS)	
355
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(distccd_obj) $(LIBS)	
344
356
(-)distcc-2.16/README.slp (+40 lines)
Line 0 Link Here
1
#
2
# SLP support in distcc
3
#
4
5
It is enough to start the SLP server and distcc server, if you have 
6
compiled distccd with SLP support. You can simply use distcc as compiler
7
afterwards.
8
9
NOTE: SLP support is only used, when distccd runs as daemon, not when
10
      running via inetd or xinetd !
11
12
The distcc frontend cache SLP results inside the $HOME/.distcc.slp.cache
13
file. This file gets update every 3 minutes (hardcoded for now).
14
15
Alternative you can set the enviroment once via distccenv. A bash user
16
might simply do to set $DISTCC_HOSTS with
17
18
  eval `distccenv`
19
20
A distcc service url looks like
21
22
 service:distccd.$IDENTITY
23
24
The identity is usually set based on the used compiler at build time 
25
of distcc and the used system architecture.
26
However there is no check which checks the installed compiler, since it
27
is not known how it is called at distccd startup time.
28
29
You can set the IDENTITY during distccd startup via the --slp-identy=$IDENTITY
30
switch. You need to set the $DISTCC_IDENTITY enviroment variable to the
31
same value afterwards inside your enviroment (or during distccenv run).
32
33
There is some very basic load balancing code. You can enable it via
34
35
  export DISTCC_LOAD_BALANCE=1
36
37
in your compile enviroment. It is not active, if $DISTCC_HOSTS is set.
38
39
Have fun, adrian.
40
(-)distcc-2.16/configure (-64 / +210 lines)
Lines 310-316 Link Here
310
# include <unistd.h>
310
# include <unistd.h>
311
#endif"
311
#endif"
312
312
313
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os docdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT GNOME_PACKAGES GNOME_CFLAGS GNOME_LIBS INSTALL_GNOME SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PYTHON CPP EGREP BUILD_POPT GNOME_BIN LIBOBJS LTLIBOBJS'
313
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os docdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT GNOME_PACKAGES GNOME_CFLAGS GNOME_LIBS INSTALL_GNOME SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PYTHON CPP EGREP LIB_SLP BUILD_POPT GNOME_BIN SLP_BIN BUILD_SLP LIBOBJS LTLIBOBJS'
314
ac_subst_files=''
314
ac_subst_files=''
315
315
316
# Initialize some variables set by options.
316
# Initialize some variables set by options.
Lines 853-858 Link Here
853
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
853
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
854
  --enable-rfc2553        use getaddrinfo, getnameinfo, etc
854
  --enable-rfc2553        use getaddrinfo, getnameinfo, etc
855
  --enable-profile        turn on gprof
855
  --enable-profile        turn on gprof
856
  --enable-slp            find hosts via slp
856
857
857
Optional Packages:
858
Optional Packages:
858
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
859
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
Lines 965-971 Link Here
965
    else
966
    else
966
      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
967
      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
967
    fi
968
    fi
968
    cd "$ac_popdir"
969
    cd $ac_popdir
969
  done
970
  done
970
fi
971
fi
971
972
Lines 2000-2006 Link Here
2000
  cat conftest.err >&5
2001
  cat conftest.err >&5
2001
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2002
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2002
  (exit $ac_status); } &&
2003
  (exit $ac_status); } &&
2003
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
2004
	 { ac_try='test -z "$ac_c_werror_flag"
2005
			 || test ! -s conftest.err'
2004
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2006
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2005
  (eval $ac_try) 2>&5
2007
  (eval $ac_try) 2>&5
2006
  ac_status=$?
2008
  ac_status=$?
Lines 2058-2064 Link Here
2058
  cat conftest.err >&5
2060
  cat conftest.err >&5
2059
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2061
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2060
  (exit $ac_status); } &&
2062
  (exit $ac_status); } &&
2061
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
2063
	 { ac_try='test -z "$ac_c_werror_flag"
2064
			 || test ! -s conftest.err'
2062
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2065
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2063
  (eval $ac_try) 2>&5
2066
  (eval $ac_try) 2>&5
2064
  ac_status=$?
2067
  ac_status=$?
Lines 2174-2180 Link Here
2174
  cat conftest.err >&5
2177
  cat conftest.err >&5
2175
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2178
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2176
  (exit $ac_status); } &&
2179
  (exit $ac_status); } &&
2177
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
2180
	 { ac_try='test -z "$ac_c_werror_flag"
2181
			 || test ! -s conftest.err'
2178
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2182
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2179
  (eval $ac_try) 2>&5
2183
  (eval $ac_try) 2>&5
2180
  ac_status=$?
2184
  ac_status=$?
Lines 2228-2234 Link Here
2228
  cat conftest.err >&5
2232
  cat conftest.err >&5
2229
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2233
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2230
  (exit $ac_status); } &&
2234
  (exit $ac_status); } &&
2231
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
2235
	 { ac_try='test -z "$ac_c_werror_flag"
2236
			 || test ! -s conftest.err'
2232
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2237
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2233
  (eval $ac_try) 2>&5
2238
  (eval $ac_try) 2>&5
2234
  ac_status=$?
2239
  ac_status=$?
Lines 2273-2279 Link Here
2273
  cat conftest.err >&5
2278
  cat conftest.err >&5
2274
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2279
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2275
  (exit $ac_status); } &&
2280
  (exit $ac_status); } &&
2276
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
2281
	 { ac_try='test -z "$ac_c_werror_flag"
2282
			 || test ! -s conftest.err'
2277
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2283
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2278
  (eval $ac_try) 2>&5
2284
  (eval $ac_try) 2>&5
2279
  ac_status=$?
2285
  ac_status=$?
Lines 2317-2323 Link Here
2317
  cat conftest.err >&5
2323
  cat conftest.err >&5
2318
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2324
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2319
  (exit $ac_status); } &&
2325
  (exit $ac_status); } &&
2320
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
2326
	 { ac_try='test -z "$ac_c_werror_flag"
2327
			 || test ! -s conftest.err'
2321
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2328
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2322
  (eval $ac_try) 2>&5
2329
  (eval $ac_try) 2>&5
2323
  ac_status=$?
2330
  ac_status=$?
Lines 2391-2397 Link Here
2391
  cat conftest.err >&5
2398
  cat conftest.err >&5
2392
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2399
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2393
  (exit $ac_status); } &&
2400
  (exit $ac_status); } &&
2394
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
2401
	 { ac_try='test -z "$ac_c_werror_flag"
2402
			 || test ! -s conftest.err'
2395
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2403
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2396
  (eval $ac_try) 2>&5
2404
  (eval $ac_try) 2>&5
2397
  ac_status=$?
2405
  ac_status=$?
Lines 2461-2467 Link Here
2461
  cat conftest.err >&5
2469
  cat conftest.err >&5
2462
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2470
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2463
  (exit $ac_status); } &&
2471
  (exit $ac_status); } &&
2464
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
2472
	 { ac_try='test -z "$ac_c_werror_flag"
2473
			 || test ! -s conftest.err'
2465
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2474
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2466
  (eval $ac_try) 2>&5
2475
  (eval $ac_try) 2>&5
2467
  ac_status=$?
2476
  ac_status=$?
Lines 2526-2532 Link Here
2526
fi;
2535
fi;
2527
2536
2528
2537
2529
2530
# Check whether --with-gnome or --without-gnome was given.
2538
# Check whether --with-gnome or --without-gnome was given.
2531
if test "${with_gnome+set}" = set; then
2539
if test "${with_gnome+set}" = set; then
2532
  withval="$with_gnome"
2540
  withval="$with_gnome"
Lines 2990-2996 Link Here
2990
  cat conftest.err >&5
2998
  cat conftest.err >&5
2991
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2999
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2992
  (exit $ac_status); } &&
3000
  (exit $ac_status); } &&
2993
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
3001
	 { ac_try='test -z "$ac_c_werror_flag"
3002
			 || test ! -s conftest.err'
2994
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3003
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2995
  (eval $ac_try) 2>&5
3004
  (eval $ac_try) 2>&5
2996
  ac_status=$?
3005
  ac_status=$?
Lines 3048-3054 Link Here
3048
  cat conftest.err >&5
3057
  cat conftest.err >&5
3049
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3058
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3050
  (exit $ac_status); } &&
3059
  (exit $ac_status); } &&
3051
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
3060
	 { ac_try='test -z "$ac_c_werror_flag"
3061
			 || test ! -s conftest.err'
3052
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3062
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3053
  (eval $ac_try) 2>&5
3063
  (eval $ac_try) 2>&5
3054
  ac_status=$?
3064
  ac_status=$?
Lines 3164-3170 Link Here
3164
  cat conftest.err >&5
3174
  cat conftest.err >&5
3165
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3175
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3166
  (exit $ac_status); } &&
3176
  (exit $ac_status); } &&
3167
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
3177
	 { ac_try='test -z "$ac_c_werror_flag"
3178
			 || test ! -s conftest.err'
3168
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3179
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3169
  (eval $ac_try) 2>&5
3180
  (eval $ac_try) 2>&5
3170
  ac_status=$?
3181
  ac_status=$?
Lines 3218-3224 Link Here
3218
  cat conftest.err >&5
3229
  cat conftest.err >&5
3219
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3230
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3220
  (exit $ac_status); } &&
3231
  (exit $ac_status); } &&
3221
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
3232
	 { ac_try='test -z "$ac_c_werror_flag"
3233
			 || test ! -s conftest.err'
3222
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3234
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3223
  (eval $ac_try) 2>&5
3235
  (eval $ac_try) 2>&5
3224
  ac_status=$?
3236
  ac_status=$?
Lines 3263-3269 Link Here
3263
  cat conftest.err >&5
3275
  cat conftest.err >&5
3264
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3276
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3265
  (exit $ac_status); } &&
3277
  (exit $ac_status); } &&
3266
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
3278
	 { ac_try='test -z "$ac_c_werror_flag"
3279
			 || test ! -s conftest.err'
3267
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3280
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3268
  (eval $ac_try) 2>&5
3281
  (eval $ac_try) 2>&5
3269
  ac_status=$?
3282
  ac_status=$?
Lines 3307-3313 Link Here
3307
  cat conftest.err >&5
3320
  cat conftest.err >&5
3308
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3321
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3309
  (exit $ac_status); } &&
3322
  (exit $ac_status); } &&
3310
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
3323
	 { ac_try='test -z "$ac_c_werror_flag"
3324
			 || test ! -s conftest.err'
3311
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3325
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3312
  (eval $ac_try) 2>&5
3326
  (eval $ac_try) 2>&5
3313
  ac_status=$?
3327
  ac_status=$?
Lines 3393-3399 Link Here
3393
  cat conftest.err >&5
3407
  cat conftest.err >&5
3394
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3408
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3395
  (exit $ac_status); } &&
3409
  (exit $ac_status); } &&
3396
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
3410
	 { ac_try='test -z "$ac_c_werror_flag"
3411
			 || test ! -s conftest.err'
3397
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3412
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3398
  (eval $ac_try) 2>&5
3413
  (eval $ac_try) 2>&5
3399
  ac_status=$?
3414
  ac_status=$?
Lines 3447-3453 Link Here
3447
  cat conftest.err >&5
3462
  cat conftest.err >&5
3448
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3463
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3449
  (exit $ac_status); } &&
3464
  (exit $ac_status); } &&
3450
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
3465
	 { ac_try='test -z "$ac_c_werror_flag"
3466
			 || test ! -s conftest.err'
3451
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3467
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3452
  (eval $ac_try) 2>&5
3468
  (eval $ac_try) 2>&5
3453
  ac_status=$?
3469
  ac_status=$?
Lines 3680-3686 Link Here
3680
  cat conftest.err >&5
3696
  cat conftest.err >&5
3681
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3697
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3682
  (exit $ac_status); } &&
3698
  (exit $ac_status); } &&
3683
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
3699
	 { ac_try='test -z "$ac_c_werror_flag"
3700
			 || test ! -s conftest.err'
3684
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3701
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3685
  (eval $ac_try) 2>&5
3702
  (eval $ac_try) 2>&5
3686
  ac_status=$?
3703
  ac_status=$?
Lines 4010-4016 Link Here
4010
  cat conftest.err >&5
4027
  cat conftest.err >&5
4011
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4028
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4012
  (exit $ac_status); } &&
4029
  (exit $ac_status); } &&
4013
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
4030
	 { ac_try='test -z "$ac_c_werror_flag"
4031
			 || test ! -s conftest.err'
4014
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4032
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4015
  (eval $ac_try) 2>&5
4033
  (eval $ac_try) 2>&5
4016
  ac_status=$?
4034
  ac_status=$?
Lines 4180-4186 Link Here
4180
  cat conftest.err >&5
4198
  cat conftest.err >&5
4181
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4199
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4182
  (exit $ac_status); } &&
4200
  (exit $ac_status); } &&
4183
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
4201
	 { ac_try='test -z "$ac_c_werror_flag"
4202
			 || test ! -s conftest.err'
4184
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4203
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4185
  (eval $ac_try) 2>&5
4204
  (eval $ac_try) 2>&5
4186
  ac_status=$?
4205
  ac_status=$?
Lines 4250-4256 Link Here
4250
  cat conftest.err >&5
4269
  cat conftest.err >&5
4251
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4270
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4252
  (exit $ac_status); } &&
4271
  (exit $ac_status); } &&
4253
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
4272
	 { ac_try='test -z "$ac_c_werror_flag"
4273
			 || test ! -s conftest.err'
4254
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4274
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4255
  (eval $ac_try) 2>&5
4275
  (eval $ac_try) 2>&5
4256
  ac_status=$?
4276
  ac_status=$?
Lines 4402-4408 Link Here
4402
  cat conftest.err >&5
4422
  cat conftest.err >&5
4403
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4423
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4404
  (exit $ac_status); } &&
4424
  (exit $ac_status); } &&
4405
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
4425
	 { ac_try='test -z "$ac_c_werror_flag"
4426
			 || test ! -s conftest.err'
4406
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4427
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4407
  (eval $ac_try) 2>&5
4428
  (eval $ac_try) 2>&5
4408
  ac_status=$?
4429
  ac_status=$?
Lines 4548-4554 Link Here
4548
  cat conftest.err >&5
4569
  cat conftest.err >&5
4549
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4570
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4550
  (exit $ac_status); } &&
4571
  (exit $ac_status); } &&
4551
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
4572
	 { ac_try='test -z "$ac_c_werror_flag"
4573
			 || test ! -s conftest.err'
4552
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4574
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4553
  (eval $ac_try) 2>&5
4575
  (eval $ac_try) 2>&5
4554
  ac_status=$?
4576
  ac_status=$?
Lines 4611-4617 Link Here
4611
  cat conftest.err >&5
4633
  cat conftest.err >&5
4612
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4634
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4613
  (exit $ac_status); } &&
4635
  (exit $ac_status); } &&
4614
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
4636
	 { ac_try='test -z "$ac_c_werror_flag"
4637
			 || test ! -s conftest.err'
4615
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4638
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4616
  (eval $ac_try) 2>&5
4639
  (eval $ac_try) 2>&5
4617
  ac_status=$?
4640
  ac_status=$?
Lines 4680-4686 Link Here
4680
  cat conftest.err >&5
4703
  cat conftest.err >&5
4681
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4704
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4682
  (exit $ac_status); } &&
4705
  (exit $ac_status); } &&
4683
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
4706
	 { ac_try='test -z "$ac_c_werror_flag"
4707
			 || test ! -s conftest.err'
4684
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4708
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4685
  (eval $ac_try) 2>&5
4709
  (eval $ac_try) 2>&5
4686
  ac_status=$?
4710
  ac_status=$?
Lines 4751-4757 Link Here
4751
  cat conftest.err >&5
4775
  cat conftest.err >&5
4752
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4776
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4753
  (exit $ac_status); } &&
4777
  (exit $ac_status); } &&
4754
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
4778
	 { ac_try='test -z "$ac_c_werror_flag"
4779
			 || test ! -s conftest.err'
4755
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4780
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4756
  (eval $ac_try) 2>&5
4781
  (eval $ac_try) 2>&5
4757
  ac_status=$?
4782
  ac_status=$?
Lines 4915-4921 Link Here
4915
  cat conftest.err >&5
4940
  cat conftest.err >&5
4916
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4941
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4917
  (exit $ac_status); } &&
4942
  (exit $ac_status); } &&
4918
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
4943
	 { ac_try='test -z "$ac_c_werror_flag"
4944
			 || test ! -s conftest.err'
4919
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4945
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4920
  (eval $ac_try) 2>&5
4946
  (eval $ac_try) 2>&5
4921
  ac_status=$?
4947
  ac_status=$?
Lines 4992-4998 Link Here
4992
  cat conftest.err >&5
5018
  cat conftest.err >&5
4993
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5019
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4994
  (exit $ac_status); } &&
5020
  (exit $ac_status); } &&
4995
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
5021
	 { ac_try='test -z "$ac_c_werror_flag"
5022
			 || test ! -s conftest.err'
4996
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5023
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4997
  (eval $ac_try) 2>&5
5024
  (eval $ac_try) 2>&5
4998
  ac_status=$?
5025
  ac_status=$?
Lines 5069-5075 Link Here
5069
  cat conftest.err >&5
5096
  cat conftest.err >&5
5070
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5097
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5071
  (exit $ac_status); } &&
5098
  (exit $ac_status); } &&
5072
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
5099
	 { ac_try='test -z "$ac_c_werror_flag"
5100
			 || test ! -s conftest.err'
5073
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5101
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5074
  (eval $ac_try) 2>&5
5102
  (eval $ac_try) 2>&5
5075
  ac_status=$?
5103
  ac_status=$?
Lines 5151-5157 Link Here
5151
  cat conftest.err >&5
5179
  cat conftest.err >&5
5152
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5180
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5153
  (exit $ac_status); } &&
5181
  (exit $ac_status); } &&
5154
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
5182
	 { ac_try='test -z "$ac_c_werror_flag"
5183
			 || test ! -s conftest.err'
5155
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5184
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5156
  (eval $ac_try) 2>&5
5185
  (eval $ac_try) 2>&5
5157
  ac_status=$?
5186
  ac_status=$?
Lines 5205-5211 Link Here
5205
  cat conftest.err >&5
5234
  cat conftest.err >&5
5206
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5235
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5207
  (exit $ac_status); } &&
5236
  (exit $ac_status); } &&
5208
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
5237
	 { ac_try='test -z "$ac_c_werror_flag"
5238
			 || test ! -s conftest.err'
5209
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5239
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5210
  (eval $ac_try) 2>&5
5240
  (eval $ac_try) 2>&5
5211
  ac_status=$?
5241
  ac_status=$?
Lines 5275-5281 Link Here
5275
  cat conftest.err >&5
5305
  cat conftest.err >&5
5276
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5306
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5277
  (exit $ac_status); } &&
5307
  (exit $ac_status); } &&
5278
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
5308
	 { ac_try='test -z "$ac_c_werror_flag"
5309
			 || test ! -s conftest.err'
5279
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5310
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5280
  (eval $ac_try) 2>&5
5311
  (eval $ac_try) 2>&5
5281
  ac_status=$?
5312
  ac_status=$?
Lines 5329-5335 Link Here
5329
  cat conftest.err >&5
5360
  cat conftest.err >&5
5330
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5361
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5331
  (exit $ac_status); } &&
5362
  (exit $ac_status); } &&
5332
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
5363
	 { ac_try='test -z "$ac_c_werror_flag"
5364
			 || test ! -s conftest.err'
5333
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5365
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5334
  (eval $ac_try) 2>&5
5366
  (eval $ac_try) 2>&5
5335
  ac_status=$?
5367
  ac_status=$?
Lines 5399-5405 Link Here
5399
  cat conftest.err >&5
5431
  cat conftest.err >&5
5400
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5432
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5401
  (exit $ac_status); } &&
5433
  (exit $ac_status); } &&
5402
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
5434
	 { ac_try='test -z "$ac_c_werror_flag"
5435
			 || test ! -s conftest.err'
5403
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5436
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5404
  (eval $ac_try) 2>&5
5437
  (eval $ac_try) 2>&5
5405
  ac_status=$?
5438
  ac_status=$?
Lines 5453-5459 Link Here
5453
  cat conftest.err >&5
5486
  cat conftest.err >&5
5454
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5487
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5455
  (exit $ac_status); } &&
5488
  (exit $ac_status); } &&
5456
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
5489
	 { ac_try='test -z "$ac_c_werror_flag"
5490
			 || test ! -s conftest.err'
5457
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5491
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5458
  (eval $ac_try) 2>&5
5492
  (eval $ac_try) 2>&5
5459
  ac_status=$?
5493
  ac_status=$?
Lines 5523-5529 Link Here
5523
  cat conftest.err >&5
5557
  cat conftest.err >&5
5524
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5558
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5525
  (exit $ac_status); } &&
5559
  (exit $ac_status); } &&
5526
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
5560
	 { ac_try='test -z "$ac_c_werror_flag"
5561
			 || test ! -s conftest.err'
5527
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5562
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5528
  (eval $ac_try) 2>&5
5563
  (eval $ac_try) 2>&5
5529
  ac_status=$?
5564
  ac_status=$?
Lines 5577-5583 Link Here
5577
  cat conftest.err >&5
5612
  cat conftest.err >&5
5578
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5613
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5579
  (exit $ac_status); } &&
5614
  (exit $ac_status); } &&
5580
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
5615
	 { ac_try='test -z "$ac_c_werror_flag"
5616
			 || test ! -s conftest.err'
5581
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5617
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5582
  (eval $ac_try) 2>&5
5618
  (eval $ac_try) 2>&5
5583
  ac_status=$?
5619
  ac_status=$?
Lines 5645-5651 Link Here
5645
  cat conftest.err >&5
5681
  cat conftest.err >&5
5646
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5682
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5647
  (exit $ac_status); } &&
5683
  (exit $ac_status); } &&
5648
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
5684
	 { ac_try='test -z "$ac_c_werror_flag"
5685
			 || test ! -s conftest.err'
5649
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5686
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5650
  (eval $ac_try) 2>&5
5687
  (eval $ac_try) 2>&5
5651
  ac_status=$?
5688
  ac_status=$?
Lines 5829-5834 Link Here
5829
echo "${ECHO_T}no" >&6
5866
echo "${ECHO_T}no" >&6
5830
fi
5867
fi
5831
5868
5869
########################################################################
5870
# Check for OpenSLP
5871
# Check whether --enable-slp or --disable-slp was given.
5872
if test "${enable_slp+set}" = set; then
5873
  enableval="$enable_slp"
5874
  with_slp=$enableval
5875
else
5876
  with_slp=no
5877
fi;
5878
if test "$with_slp" = "yes"; then
5879
echo "$as_me:$LINENO: checking for SLP support" >&5
5880
echo $ECHO_N "checking for SLP support... $ECHO_C" >&6
5881
save_slptest_LIBS="$LIBS"
5882
save_slptest_LDFLAGS="$LDFLAGS"
5883
save_slptest_CPPFLAGS="$CPPFLAGS"
5884
LDFLAGS="$all_libraries $LDFLAGS"
5885
CPPFLAGS="$CPPFLAGS $all_includes"
5886
LIBS="-lslp"
5887
cat >conftest.$ac_ext <<_ACEOF
5888
/* confdefs.h.  */
5889
_ACEOF
5890
cat confdefs.h >>conftest.$ac_ext
5891
cat >>conftest.$ac_ext <<_ACEOF
5892
/* end confdefs.h.  */
5893
5894
                       #include <slp.h>
5895
5896
int
5897
main ()
5898
{
5899
5900
                       SLPOpen(0, SLP_FALSE, (SLPHandle*) 0);
5901
5902
  ;
5903
  return 0;
5904
}
5905
_ACEOF
5906
rm -f conftest.$ac_objext conftest$ac_exeext
5907
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5908
  (eval $ac_link) 2>conftest.er1
5909
  ac_status=$?
5910
  grep -v '^ *+' conftest.er1 >conftest.err
5911
  rm -f conftest.er1
5912
  cat conftest.err >&5
5913
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5914
  (exit $ac_status); } &&
5915
	 { ac_try='test -z "$ac_c_werror_flag"
5916
			 || test ! -s conftest.err'
5917
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5918
  (eval $ac_try) 2>&5
5919
  ac_status=$?
5920
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5921
  (exit $ac_status); }; } &&
5922
	 { ac_try='test -s conftest$ac_exeext'
5923
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5924
  (eval $ac_try) 2>&5
5925
  ac_status=$?
5926
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5927
  (exit $ac_status); }; }; then
5928
5929
5930
cat >>confdefs.h <<\_ACEOF
5931
#define WITH_SLP 1
5932
_ACEOF
5933
5934
                       LIB_SLP="-lslp"
5935
		       SLP_BIN=distccenv
5936
                       BUILD_SLP='$(slp_OBJS)'
5937
                       echo "$as_me:$LINENO: result: yes" >&5
5938
echo "${ECHO_T}yes" >&6
5939
5940
else
5941
  echo "$as_me: failed program was:" >&5
5942
sed 's/^/| /' conftest.$ac_ext >&5
5943
5944
5945
                       { { echo "$as_me:$LINENO: error: no" >&5
5946
echo "$as_me: error: no" >&2;}
5947
   { (exit 1); exit 1; }; }
5948
5949
fi
5950
rm -f conftest.err conftest.$ac_objext \
5951
      conftest$ac_exeext conftest.$ac_ext
5952
CPPFLAGS=$save_slptest_CPPFLAGS
5953
LDFLAGS=$save_slptest_LDFLAGS
5954
LIBS=$save_slptest_LIBS
5955
fi
5956
5957
5832
5958
5833
5959
5834
########################################################################
5960
########################################################################
Lines 5872-5878 Link Here
5872
  cat conftest.err >&5
5998
  cat conftest.err >&5
5873
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5999
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5874
  (exit $ac_status); } &&
6000
  (exit $ac_status); } &&
5875
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
6001
	 { ac_try='test -z "$ac_c_werror_flag"
6002
			 || test ! -s conftest.err'
5876
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6003
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5877
  (eval $ac_try) 2>&5
6004
  (eval $ac_try) 2>&5
5878
  ac_status=$?
6005
  ac_status=$?
Lines 5902-5908 Link Here
5902
6029
5903
6030
5904
6031
5905
5906
########################################################################
6032
########################################################################
5907
# Checks for library functions, using libraries discovered above
6033
# Checks for library functions, using libraries discovered above
5908
CPPFLAGS="$CPPFLAGS -I$srcdir/src"
6034
CPPFLAGS="$CPPFLAGS -I$srcdir/src"
Lines 5983-5989 Link Here
5983
  cat conftest.err >&5
6109
  cat conftest.err >&5
5984
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6110
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5985
  (exit $ac_status); } &&
6111
  (exit $ac_status); } &&
5986
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
6112
	 { ac_try='test -z "$ac_c_werror_flag"
6113
			 || test ! -s conftest.err'
5987
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6114
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5988
  (eval $ac_try) 2>&5
6115
  (eval $ac_try) 2>&5
5989
  ac_status=$?
6116
  ac_status=$?
Lines 6091-6097 Link Here
6091
  cat conftest.err >&5
6218
  cat conftest.err >&5
6092
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6219
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6093
  (exit $ac_status); } &&
6220
  (exit $ac_status); } &&
6094
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
6221
	 { ac_try='test -z "$ac_c_werror_flag"
6222
			 || test ! -s conftest.err'
6095
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6223
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6096
  (eval $ac_try) 2>&5
6224
  (eval $ac_try) 2>&5
6097
  ac_status=$?
6225
  ac_status=$?
Lines 6197-6203 Link Here
6197
  cat conftest.err >&5
6325
  cat conftest.err >&5
6198
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6326
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6199
  (exit $ac_status); } &&
6327
  (exit $ac_status); } &&
6200
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
6328
	 { ac_try='test -z "$ac_c_werror_flag"
6329
			 || test ! -s conftest.err'
6201
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6330
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6202
  (eval $ac_try) 2>&5
6331
  (eval $ac_try) 2>&5
6203
  ac_status=$?
6332
  ac_status=$?
Lines 6300-6306 Link Here
6300
  cat conftest.err >&5
6429
  cat conftest.err >&5
6301
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6430
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6302
  (exit $ac_status); } &&
6431
  (exit $ac_status); } &&
6303
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
6432
	 { ac_try='test -z "$ac_c_werror_flag"
6433
			 || test ! -s conftest.err'
6304
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6434
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6305
  (eval $ac_try) 2>&5
6435
  (eval $ac_try) 2>&5
6306
  ac_status=$?
6436
  ac_status=$?
Lines 6404-6410 Link Here
6404
  cat conftest.err >&5
6534
  cat conftest.err >&5
6405
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6535
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6406
  (exit $ac_status); } &&
6536
  (exit $ac_status); } &&
6407
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
6537
	 { ac_try='test -z "$ac_c_werror_flag"
6538
			 || test ! -s conftest.err'
6408
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6539
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6409
  (eval $ac_try) 2>&5
6540
  (eval $ac_try) 2>&5
6410
  ac_status=$?
6541
  ac_status=$?
Lines 6507-6513 Link Here
6507
  cat conftest.err >&5
6638
  cat conftest.err >&5
6508
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6639
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6509
  (exit $ac_status); } &&
6640
  (exit $ac_status); } &&
6510
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
6641
	 { ac_try='test -z "$ac_c_werror_flag"
6642
			 || test ! -s conftest.err'
6511
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6643
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6512
  (eval $ac_try) 2>&5
6644
  (eval $ac_try) 2>&5
6513
  ac_status=$?
6645
  ac_status=$?
Lines 6572-6578 Link Here
6572
  cat conftest.err >&5
6704
  cat conftest.err >&5
6573
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6705
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6574
  (exit $ac_status); } &&
6706
  (exit $ac_status); } &&
6575
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
6707
	 { ac_try='test -z "$ac_c_werror_flag"
6708
			 || test ! -s conftest.err'
6576
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6709
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6577
  (eval $ac_try) 2>&5
6710
  (eval $ac_try) 2>&5
6578
  ac_status=$?
6711
  ac_status=$?
Lines 6641-6647 Link Here
6641
  cat conftest.err >&5
6774
  cat conftest.err >&5
6642
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6775
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6643
  (exit $ac_status); } &&
6776
  (exit $ac_status); } &&
6644
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
6777
	 { ac_try='test -z "$ac_c_werror_flag"
6778
			 || test ! -s conftest.err'
6645
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6779
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6646
  (eval $ac_try) 2>&5
6780
  (eval $ac_try) 2>&5
6647
  ac_status=$?
6781
  ac_status=$?
Lines 6710-6716 Link Here
6710
  cat conftest.err >&5
6844
  cat conftest.err >&5
6711
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6845
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6712
  (exit $ac_status); } &&
6846
  (exit $ac_status); } &&
6713
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
6847
	 { ac_try='test -z "$ac_c_werror_flag"
6848
			 || test ! -s conftest.err'
6714
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6849
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6715
  (eval $ac_try) 2>&5
6850
  (eval $ac_try) 2>&5
6716
  ac_status=$?
6851
  ac_status=$?
Lines 6779-6785 Link Here
6779
  cat conftest.err >&5
6914
  cat conftest.err >&5
6780
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6915
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6781
  (exit $ac_status); } &&
6916
  (exit $ac_status); } &&
6782
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
6917
	 { ac_try='test -z "$ac_c_werror_flag"
6918
			 || test ! -s conftest.err'
6783
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6919
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6784
  (eval $ac_try) 2>&5
6920
  (eval $ac_try) 2>&5
6785
  ac_status=$?
6921
  ac_status=$?
Lines 6848-6854 Link Here
6848
  cat conftest.err >&5
6984
  cat conftest.err >&5
6849
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6985
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6850
  (exit $ac_status); } &&
6986
  (exit $ac_status); } &&
6851
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
6987
	 { ac_try='test -z "$ac_c_werror_flag"
6988
			 || test ! -s conftest.err'
6852
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6989
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6853
  (eval $ac_try) 2>&5
6990
  (eval $ac_try) 2>&5
6854
  ac_status=$?
6991
  ac_status=$?
Lines 6923-6929 Link Here
6923
  cat conftest.err >&5
7060
  cat conftest.err >&5
6924
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7061
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6925
  (exit $ac_status); } &&
7062
  (exit $ac_status); } &&
6926
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
7063
	 { ac_try='test -z "$ac_c_werror_flag"
7064
			 || test ! -s conftest.err'
6927
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7065
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6928
  (eval $ac_try) 2>&5
7066
  (eval $ac_try) 2>&5
6929
  ac_status=$?
7067
  ac_status=$?
Lines 6979-6985 Link Here
6979
  cat conftest.err >&5
7117
  cat conftest.err >&5
6980
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7118
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6981
  (exit $ac_status); } &&
7119
  (exit $ac_status); } &&
6982
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
7120
	 { ac_try='test -z "$ac_c_werror_flag"
7121
			 || test ! -s conftest.err'
6983
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7122
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6984
  (eval $ac_try) 2>&5
7123
  (eval $ac_try) 2>&5
6985
  ac_status=$?
7124
  ac_status=$?
Lines 7038-7044 Link Here
7038
  cat conftest.err >&5
7177
  cat conftest.err >&5
7039
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7178
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7040
  (exit $ac_status); } &&
7179
  (exit $ac_status); } &&
7041
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
7180
	 { ac_try='test -z "$ac_c_werror_flag"
7181
			 || test ! -s conftest.err'
7042
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7182
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7043
  (eval $ac_try) 2>&5
7183
  (eval $ac_try) 2>&5
7044
  ac_status=$?
7184
  ac_status=$?
Lines 7228-7234 Link Here
7228
  cat conftest.err >&5
7368
  cat conftest.err >&5
7229
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7369
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7230
  (exit $ac_status); } &&
7370
  (exit $ac_status); } &&
7231
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
7371
	 { ac_try='test -z "$ac_c_werror_flag"
7372
			 || test ! -s conftest.err'
7232
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7373
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7233
  (eval $ac_try) 2>&5
7374
  (eval $ac_try) 2>&5
7234
  ac_status=$?
7375
  ac_status=$?
Lines 7272-7278 Link Here
7272
  cat conftest.err >&5
7413
  cat conftest.err >&5
7273
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7414
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7274
  (exit $ac_status); } &&
7415
  (exit $ac_status); } &&
7275
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
7416
	 { ac_try='test -z "$ac_c_werror_flag"
7417
			 || test ! -s conftest.err'
7276
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7418
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7277
  (eval $ac_try) 2>&5
7419
  (eval $ac_try) 2>&5
7278
  ac_status=$?
7420
  ac_status=$?
Lines 7313-7318 Link Here
7313
7455
7314
7456
7315
7457
7458
7459
7316
cat >>confdefs.h <<_ACEOF
7460
cat >>confdefs.h <<_ACEOF
7317
#define GNU_HOST "$host"
7461
#define GNU_HOST "$host"
7318
_ACEOF
7462
_ACEOF
Lines 7958-7965 Link Here
7958
s,@PYTHON@,$PYTHON,;t t
8102
s,@PYTHON@,$PYTHON,;t t
7959
s,@CPP@,$CPP,;t t
8103
s,@CPP@,$CPP,;t t
7960
s,@EGREP@,$EGREP,;t t
8104
s,@EGREP@,$EGREP,;t t
8105
s,@LIB_SLP@,$LIB_SLP,;t t
7961
s,@BUILD_POPT@,$BUILD_POPT,;t t
8106
s,@BUILD_POPT@,$BUILD_POPT,;t t
7962
s,@GNOME_BIN@,$GNOME_BIN,;t t
8107
s,@GNOME_BIN@,$GNOME_BIN,;t t
8108
s,@SLP_BIN@,$SLP_BIN,;t t
8109
s,@BUILD_SLP@,$BUILD_SLP,;t t
7963
s,@LIBOBJS@,$LIBOBJS,;t t
8110
s,@LIBOBJS@,$LIBOBJS,;t t
7964
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
8111
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
7965
CEOF
8112
CEOF
Lines 8128-8133 Link Here
8128
  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
8275
  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
8129
  esac
8276
  esac
8130
8277
8278
  if test x"$ac_file" != x-; then
8279
    { echo "$as_me:$LINENO: creating $ac_file" >&5
8280
echo "$as_me: creating $ac_file" >&6;}
8281
    rm -f "$ac_file"
8282
  fi
8131
  # Let's still pretend it is `configure' which instantiates (i.e., don't
8283
  # Let's still pretend it is `configure' which instantiates (i.e., don't
8132
  # use $as_me), people would be surprised to read:
8284
  # use $as_me), people would be surprised to read:
8133
  #    /* config.h.  Generated by config.status.  */
8285
  #    /* config.h.  Generated by config.status.  */
Lines 8166-8177 Link Here
8166
	 fi;;
8318
	 fi;;
8167
      esac
8319
      esac
8168
    done` || { (exit 1); exit 1; }
8320
    done` || { (exit 1); exit 1; }
8169
8170
  if test x"$ac_file" != x-; then
8171
    { echo "$as_me:$LINENO: creating $ac_file" >&5
8172
echo "$as_me: creating $ac_file" >&6;}
8173
    rm -f "$ac_file"
8174
  fi
8175
_ACEOF
8321
_ACEOF
8176
cat >>$CONFIG_STATUS <<_ACEOF
8322
cat >>$CONFIG_STATUS <<_ACEOF
8177
  sed "$ac_vpsub
8323
  sed "$ac_vpsub
(-)distcc-2.16/configure.ac (-2 / +32 lines)
Lines 89-95 Link Here
89
	AC_HELP_STRING([--enable-rfc2553], [use getaddrinfo, getnameinfo, etc]),
89
	AC_HELP_STRING([--enable-rfc2553], [use getaddrinfo, getnameinfo, etc]),
90
        AC_DEFINE(ENABLE_RFC2553,1,[Use getaddrinfo(), getnameinfo(), etc]))
90
        AC_DEFINE(ENABLE_RFC2553,1,[Use getaddrinfo(), getnameinfo(), etc]))
91
91
92
93
AC_ARG_WITH(gnome,
92
AC_ARG_WITH(gnome,
94
        AC_HELP_STRING([--with-gnome], [build GNOME-based monitor]))
93
        AC_HELP_STRING([--with-gnome], [build GNOME-based monitor]))
95
94
Lines 283-295 Link Here
283
    AC_MSG_RESULT(no)
282
    AC_MSG_RESULT(no)
284
fi
283
fi
285
284
285
########################################################################
286
# Check for OpenSLP
287
AC_ARG_ENABLE(slp, [  --enable-slp            find hosts via slp],  with_slp=$enableval, with_slp=no)
288
if test "$with_slp" = "yes"; then
289
AC_MSG_CHECKING(for SLP support)
290
save_slptest_LIBS="$LIBS"
291
save_slptest_LDFLAGS="$LDFLAGS"
292
save_slptest_CPPFLAGS="$CPPFLAGS"
293
LDFLAGS="$all_libraries $LDFLAGS"
294
CPPFLAGS="$CPPFLAGS $all_includes"
295
LIBS="-lslp"
296
AC_TRY_LINK(   [
297
                       #include <slp.h>
298
               ],[
299
                       SLPOpen(0, SLP_FALSE, (SLPHandle*) 0);
300
               ],[
301
                       AC_DEFINE(WITH_SLP,1,[Define if SLP is avaible and enabled])
302
                       LIB_SLP="-lslp"
303
		       SLP_BIN=distccenv
304
                       BUILD_SLP='$(slp_OBJS)'
305
                       AC_MSG_RESULT(yes)
306
               ],[
307
                       AC_MSG_ERROR(no)
308
])
309
CPPFLAGS=$save_slptest_CPPFLAGS
310
LDFLAGS=$save_slptest_LDFLAGS
311
LIBS=$save_slptest_LIBS
312
fi
313
AC_SUBST(LIB_SLP)
314
286
315
287
316
288
########################################################################
317
########################################################################
289
# Check for types
318
# Check for types
290
AC_TYPE_SIGNAL
319
AC_TYPE_SIGNAL
291
320
292
293
########################################################################
321
########################################################################
294
# Checks for library functions, using libraries discovered above
322
# Checks for library functions, using libraries discovered above
295
CPPFLAGS="$CPPFLAGS -I$srcdir/src"
323
CPPFLAGS="$CPPFLAGS -I$srcdir/src"
Lines 390-395 Link Here
390
AC_SUBST(CPPFLAGS)
418
AC_SUBST(CPPFLAGS)
391
AC_SUBST(BUILD_POPT)
419
AC_SUBST(BUILD_POPT)
392
AC_SUBST(GNOME_BIN)
420
AC_SUBST(GNOME_BIN)
421
AC_SUBST(SLP_BIN)
422
AC_SUBST(BUILD_SLP)
393
dnl AC_DEFINE_UNQUOTED(PACKAGE, $PACKAGE, [Package name])
423
dnl AC_DEFINE_UNQUOTED(PACKAGE, $PACKAGE, [Package name])
394
dnl AC_DEFINE_UNQUOTED(VERSION, $VERSION, [Package version])
424
dnl AC_DEFINE_UNQUOTED(VERSION, $VERSION, [Package version])
395
AC_DEFINE_UNQUOTED(GNU_HOST, ["$host"], [Your gnu-style host triple])
425
AC_DEFINE_UNQUOTED(GNU_HOST, ["$host"], [Your gnu-style host triple])
(-)distcc-2.16/src/cc_version.c (+93 lines)
Line 0 Link Here
1
/* -*- c-file-style: "java"; indent-tabs-mode: nil -*-
2
 *
3
 * distcc -- A simple distributed compiler system
4
 *
5
 * Copyright (C) 2003 by Adrian Schroeter <adrian@suse.de>
6
 *
7
 * This program is free software; you can redistribute it and/or
8
 * modify it under the terms of the GNU General Public License as
9
 * published by the Free Software Foundation; either version 2 of the
10
 * License, or (at your option) any later version.
11
 *
12
 * This program is distributed in the hope that it will be useful, but
13
 * WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
 * General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU General Public License
18
 * along with this program; if not, write to the Free Software
19
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20
 * USA
21
 */
22
23
#include <stdlib.h>
24
#include <string.h>
25
#include <stdio.h>
26
#include <sys/utsname.h>
27
#include "cc_version.h"
28
#include "config.h"
29
30
char *used_compiler_version(void)
31
{
32
    char *compiler     = NULL;
33
    char *architecture = NULL;
34
    char *ret;
35
    int len;
36
37
    /* The enviroment is always right ... */
38
    if ( getenv("DISTCC_IDENTIFY") )
39
	return getenv("DISTCC_IDENTIFY"); 
40
41
    /* do we really want a runtime check here ? */
42
    /* it would be worse performance wise for the distcc frontend ... */
43
44
    /* default compiler based on distcc build time */
45
#ifdef __GNUC__
46
#ifdef __GNUC_MINOR__
47
#ifdef __GNUC_PATCHLEVEL__
48
    compiler = (char*) malloc( 33 );
49
    snprintf( compiler, 32, "gcc-%d.%d.%d", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__ );
50
#endif
51
#endif
52
#endif
53
54
#ifdef GNU_HOST
55
    architecture = strdup(GNU_HOST);
56
    {
57
       char *p;
58
       p = strstr( architecture, "-" );
59
       if (p){
60
         *p = '\0';
61
         /* unify all different ia32 systems */
62
         p = architecture;
63
         if ( p[0] == 'i' && p[2] == '8' && p[3] == '6' && p[4] == '\0' )
64
           p[1] = '3';
65
       }
66
    }
67
#endif
68
69
    if ( compiler == NULL ){
70
       /* we use the system release, this is unreleated to the compiler
71
          version, but better than default ... */
72
       struct utsname t;
73
       if ( !uname( &t ) )
74
          compiler = t.release;
75
    }
76
    if ( architecture == NULL ){
77
       struct utsname t;
78
       if ( !uname( &t ) )
79
          architecture = t.machine;
80
    }
81
82
    /* fallback values */
83
    if ( compiler == NULL )
84
       compiler = strdup("default");
85
    if ( architecture == NULL )
86
       architecture = strdup("default");
87
88
    len = strlen(compiler) + 1 + strlen(architecture) + 1;
89
    ret = (char*) malloc(len + 1);
90
    snprintf( ret, len, "%s-%s", compiler, architecture );
91
    return ret;
92
}
93
(-)distcc-2.16/src/cc_version.h (+3 lines)
Line 0 Link Here
1
2
char *used_compiler_version(void);
3
(-)distcc-2.16/src/config.h.in (+3 lines)
Lines 242-247 Link Here
242
/* Use GTK+ */
242
/* Use GTK+ */
243
#undef WITH_GTK
243
#undef WITH_GTK
244
244
245
/* Use SLP */
246
#undef WITH_SLP
247
245
/* Define to `__inline__' or `__inline' if that's what the C compiler
248
/* Define to `__inline__' or `__inline' if that's what the C compiler
246
   calls it, or to nothing if 'inline' is not supported under any name.  */
249
   calls it, or to nothing if 'inline' is not supported under any name.  */
247
#ifndef __cplusplus
250
#ifndef __cplusplus
(-)distcc-2.16/src/distccenv.c (+205 lines)
Line 0 Link Here
1
2
#include "config.h"
3
4
#ifndef WITH_SLP
5
#error distccenv needs SLP atm. 
6
#endif
7
8
#include <stdlib.h>
9
#include <stdio.h>
10
#include <string.h>
11
12
#include "register_slp.h"
13
14
#define BUFFER 1024
15
16
char compiler[BUFFER + 1];
17
FILE *out;
18
19
#define MAX_HOSTS 256
20
struct dcc_host{
21
  char *url;
22
  int  jobs;
23
  float speed;
24
  float load;
25
  long value;
26
};
27
struct dcc_host hosts[MAX_HOSTS];
28
int host_count = 0;
29
30
int slp_calls = 0;
31
int load_balancing = 0;
32
33
void dump_result(void);
34
SLPBoolean myAttrCallback(SLPHandle phslp, char* attrlist,
35
                          SLPError errcode, void* cookie );
36
SLPBoolean MySLPSrvURLCallback( SLPHandle phslp, const char* srvurl,
37
                              unsigned short lifetime, SLPError errcode,
38
                              void* cookie );
39
40
void dump_result(void)
41
{
42
  int h, j, max_jobs = 0;
43
  float avg_speed = 0, avg_load = 0;
44
45
  if ( host_count == 0 )
46
     exit(-1);
47
48
  if ( !out )
49
     printf( "DISTCC_HOSTS=\"" );
50
51
  if ( load_balancing )
52
  {
53
     for ( h = 0; h<host_count; h++ ){
54
        avg_speed += hosts[h].speed;
55
        avg_load  += hosts[h].load;
56
     }
57
     avg_speed /= host_count;
58
     avg_load /= host_count;
59
     
60
     for ( h = 0; h<host_count; h++ ){
61
        hosts[h].value = hosts[h].jobs
62
                         * ( hosts[h].speed / avg_speed );
63
#if 0
64
// load might be misleading, so we only care about bogomips atm
65
// beside of architectures with random bogomips values (like s390) 
66
// this should work so far now.
67
                         * ( avg_load / hosts[h].load );
68
#endif
69
        if ( max_jobs < hosts[h].value )
70
           max_jobs = hosts[h].value;
71
     }
72
  }
73
74
  for ( j = 0; j<(load_balancing?max_jobs:1); j++ ){
75
     for ( h = 0; h<host_count; h++ ){
76
        if ( !load_balancing || j < hosts[h].value ){
77
           if ( out ){
78
              fputs( hosts[h].url, out );
79
              fputs( "\n", out );
80
           }else{
81
              printf( "%s ", hosts[h].url );
82
           }
83
        }
84
     }
85
  }
86
87
  if ( out )
88
    fclose( out );
89
  else
90
    printf( "\"\n" );
91
  exit(0);
92
}
93
94
SLPBoolean myAttrCallback(SLPHandle phslp,
95
                        char* attrlist,
96
                        SLPError errcode,
97
                        void* cookie )
98
{
99
    phslp = phslp;
100
    struct dcc_host *_host = &(hosts[(long)cookie]);
101
102
    if(attrlist && errcode == SLP_OK)
103
    {
104
	char *p;
105
106
        p = strstr( attrlist, "(maxjobs=" );
107
	if ( p )
108
	   _host->jobs  = atoi( p + strlen("(maxjobs=") );
109
110
        p = strstr( attrlist, "(bogomips=" );
111
	if ( p )
112
	   _host->speed = atol( p + strlen("(bogomips=") );
113
114
        p = strstr( attrlist, "(load=" );
115
	if ( p )
116
	   _host->load  = atol( p + strlen("(load=") );
117
    }
118
119
    return SLP_FALSE;
120
}
121
122
SLPBoolean MySLPSrvURLCallback( SLPHandle phslp,
123
                              const char* srvurl,
124
                              unsigned short lifetime,
125
                              SLPError errcode,
126
                              void* cookie )
127
{
128
  phslp = phslp; lifetime = lifetime; cookie = cookie;
129
130
  if ( host_count >= MAX_HOSTS || !srvurl
131
       || strncmp( compiler, srvurl, strlen(compiler) ) ) 
132
     return SLP_TRUE;
133
134
  if(errcode == SLP_OK || errcode == SLP_LAST_CALL) 
135
  {
136
     hosts[host_count].url   = strdup((char*)(strlen(compiler) + srvurl + 3));
137
     hosts[host_count].jobs  = -1;
138
     hosts[host_count].speed = -1;
139
     host_count++;
140
  }
141
142
  return SLP_TRUE;
143
}
144
145
int main( int argc, char *argv[] )
146
{
147
  long h;
148
  SLPHandle phslp;
149
  SLPError result;
150
  char *p;
151
152
  out = 0;
153
154
  p = getenv("DISTCC_LOAD_BALANCE");
155
  if ( p && (!strcmp( "1", p)||!strncmp( "y", p, 1)) )
156
     load_balancing = 1;
157
 
158
  if ( argc > 2 && !strcmp(argv[1], "--file" ) )
159
     out = fopen( argv[2], "w" );
160
161
  snprintf( compiler, BUFFER, "service:distccd.%s", used_compiler_version() );
162
163
  result = SLPOpen( NULL, SLP_FALSE, &phslp);
164
  if (result != SLP_OK) {
165
     fprintf( stderr, "SLPOpen failed !   Aborting ... " );
166
     exit( -1 );
167
  } else {
168
     result = SLPFindSrvs( phslp,
169
                           compiler,
170
                           "", // TODO: Scope selector
171
                           "", // all services
172
                           MySLPSrvURLCallback,
173
                           0 );
174
     if (result != SLP_OK){
175
        fprintf( stderr, "unable to query for services !  Aborting .." );
176
        exit(-1);
177
     }
178
179
     if ( load_balancing )
180
     {
181
        for ( h = 0; h < host_count; h++ )
182
        {
183
           char buf[BUFFER+1];
184
           snprintf( buf, BUFFER, "%s://%s", compiler, hosts[h].url );
185
           result = SLPFindAttrs(phslp,
186
                                buf,
187
                                "",
188
                                "maxjobs,bogomips,load",
189
                                myAttrCallback,
190
                                (void*)h);
191
           if(result != SLP_OK)
192
           {
193
               printf("unable to request SLP attributes: %i\n",result);
194
               exit(-1);
195
           }
196
        }
197
     }else
198
        dump_result();
199
200
     SLPClose( phslp );
201
  }
202
203
  dump_result();
204
  return 0;
205
}
(-)distcc-2.16/src/dopt.c (+17 lines)
Lines 50-55 Link Here
50
#include "setuid.h"
50
#include "setuid.h"
51
#include "access.h"
51
#include "access.h"
52
52
53
#ifdef WITH_SLP
54
#include "register_slp.h"
55
#endif
56
53
int opt_niceness = 5;           /* default */
57
int opt_niceness = 5;           /* default */
54
58
55
/**
59
/**
Lines 90-95 Link Here
90
94
91
const char *arg_pid_file = NULL;
95
const char *arg_pid_file = NULL;
92
const char *arg_log_file = NULL;
96
const char *arg_log_file = NULL;
97
const char *compiler_version = NULL;
93
98
94
/* Enumeration values for options that don't have single-letter name.  These
99
/* Enumeration values for options that don't have single-letter name.  These
95
 * must be numerically above all the ascii letters. */
100
 * must be numerically above all the ascii letters. */
Lines 120-125 Link Here
120
    { "verbose", 0,      POPT_ARG_NONE, 0, 'v', 0, 0 },
125
    { "verbose", 0,      POPT_ARG_NONE, 0, 'v', 0, 0 },
121
    { "version", 0,      POPT_ARG_NONE, 0, 'V', 0, 0 },
126
    { "version", 0,      POPT_ARG_NONE, 0, 'V', 0, 0 },
122
    { "wizard", 'W',     POPT_ARG_NONE, 0, 'W', 0, 0 },
127
    { "wizard", 'W',     POPT_ARG_NONE, 0, 'W', 0, 0 },
128
#ifdef WITH_SLP
129
    { "slp-identy", 0,   POPT_ARG_STRING, &compiler_version, 0, 0, 0 },
130
#endif
123
    { 0, 0, 0, 0, 0, 0, 0 }
131
    { 0, 0, 0, 0, 0, 0, 0 }
124
};
132
};
125
133
Lines 153-158 Link Here
153
"  Mode of operation:\n"
161
"  Mode of operation:\n"
154
"    --inetd                    serve client connected to stdin\n"
162
"    --inetd                    serve client connected to stdin\n"
155
"    --daemon                   bind and listen on socket\n"
163
"    --daemon                   bind and listen on socket\n"
164
#ifdef WITH_SLP
165
"  SLP Identification:\n"
166
"    --slp-identy=STRING        to identify the provided compiler\n"
167
#endif
156
"\n"
168
"\n"
157
"distccd runs either from inetd or as a standalone daemon to compile\n"
169
"distccd runs either from inetd or as a standalone daemon to compile\n"
158
"files submitted by the distcc client.\n"
170
"files submitted by the distcc client.\n"
Lines 249-254 Link Here
249
        }
261
        }
250
    }
262
    }
251
263
264
#ifdef WITH_SLP
265
    if ( compiler_version == NULL )
266
       compiler_version = used_compiler_version();
267
#endif
268
252
    poptFreeContext(po);
269
    poptFreeContext(po);
253
    return 0;
270
    return 0;
254
271
(-)distcc-2.16/src/dopt.h (+4 lines)
Lines 20-25 Link Here
20
 * USA
20
 * USA
21
 */
21
 */
22
22
23
#include "config.h"
23
24
24
/* dopt.c */
25
/* dopt.c */
25
extern struct dcc_allow_list *opt_allowed;
26
extern struct dcc_allow_list *opt_allowed;
Lines 38-40 Link Here
38
extern int opt_lifetime;
39
extern int opt_lifetime;
39
extern char *opt_listen_addr;
40
extern char *opt_listen_addr;
40
extern int opt_niceness;
41
extern int opt_niceness;
42
#ifdef WITH_SLP
43
extern const char *compiler_version;
44
#endif
(-)distcc-2.16/src/dparent.c (+7 lines)
Lines 71-76 Link Here
71
#include "types.h"
71
#include "types.h"
72
#include "daemon.h"
72
#include "daemon.h"
73
#include "netutil.h"
73
#include "netutil.h"
74
#if WITH_SLP
75
#include "register_slp.h"
76
#endif
74
77
75
static void dcc_nofork_parent(int listen_fd) NORETURN;
78
static void dcc_nofork_parent(int listen_fd) NORETURN;
76
static void dcc_detach(void);
79
static void dcc_detach(void);
Lines 136-141 Link Here
136
     * not.  */
139
     * not.  */
137
    dcc_master_pid = getpid();
140
    dcc_master_pid = getpid();
138
141
142
#ifdef WITH_SLP
143
    register_slp();
144
#endif
145
139
    if (opt_no_fork) {
146
    if (opt_no_fork) {
140
        dcc_log_daemon_started("non-forking daemon");   
147
        dcc_log_daemon_started("non-forking daemon");   
141
        dcc_nofork_parent(listen_fd);
148
        dcc_nofork_parent(listen_fd);
(-)distcc-2.16/src/hosts.c (+28 lines)
Lines 85-90 Link Here
85
#include <stdio.h>
85
#include <stdio.h>
86
#include <stdlib.h>
86
#include <stdlib.h>
87
#include <unistd.h>
87
#include <unistd.h>
88
#include <sys/types.h>
89
#include <sys/stat.h>
88
#include <string.h>
90
#include <string.h>
89
#include <errno.h>
91
#include <errno.h>
90
#include <time.h>
92
#include <time.h>
Lines 163-169 Link Here
163
        rs_trace("not reading %s: %s", path, strerror(errno));
165
        rs_trace("not reading %s: %s", path, strerror(errno));
164
        free(path);
166
        free(path);
165
    }
167
    }
168
169
#ifdef WITH_SLP  
166
    
170
    
171
    char *home;
172
    
173
    if ((home = getenv("HOME")) != NULL) {
174
        struct stat fst;
175
        
176
        asprintf(&path, "%s/.distcc.slp.cache", home);
177
        /* the refresh rate of SLP cache is hardcoded to 5 minutes for now */
178
        if ( stat (path, &fst) || fst.st_mtime < time (0) - 60*5 ) { 
179
	    unlink( path );
180
	    /* sure, we could implement the SLP query also via a function
181
               call, but we would need to wait here anyway ... */
182
	    execlp("distccenv", "distccenv", "--file", path, 0 );
183
        }
184
        if (access(path, R_OK) == 0) {
185
            ret = dcc_parse_hosts_file(path, ret_list, ret_nhosts);
186
            free(path);
187
            return ret;
188
        } else {
189
            rs_trace("not reading %s: %s", path, strerror(errno));
190
            free(path);
191
        }
192
    }
193
#endif
194
167
    /* FIXME: Clearer message? */
195
    /* FIXME: Clearer message? */
168
    rs_log_warning("no hostlist is set; can't distribute work");
196
    rs_log_warning("no hostlist is set; can't distribute work");
169
197
(-)distcc-2.16/src/register_slp.c (+127 lines)
Line 0 Link Here
1
/* -*- c-file-style: "java"; indent-tabs-mode: nil -*-
2
 *
3
 * distcc -- A simple distributed compiler system
4
 *
5
 * Copyright (C) 2003 by Adrian Schroeter <adrian@suse.de>
6
 *
7
 * This program is free software; you can redistribute it and/or
8
 * modify it under the terms of the GNU General Public License as
9
 * published by the Free Software Foundation; either version 2 of the
10
 * License, or (at your option) any later version.
11
 *
12
 * This program is distributed in the hope that it will be useful, but
13
 * WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
 * General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU General Public License
18
 * along with this program; if not, write to the Free Software
19
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20
 * USA
21
 */
22
23
#include "register_slp.h"
24
25
#ifdef WITH_SLP
26
#include <stdlib.h>
27
#include <string.h>
28
#include <signal.h>
29
#include <unistd.h>
30
#include <stdio.h>
31
#include <sys/utsname.h>
32
#include "dopt.h"
33
#include "trace.h"
34
#include "cc_version.h"
35
36
extern int dcc_max_kids;
37
38
void mySLPRegReport(SLPHandle hslp, SLPError errcode, void *cookie)
39
{
40
    hslp = hslp; cookie = cookie;
41
    if (errcode)
42
       rs_log_warning( "SLP (de)registration error" );
43
}
44
45
void refresh_slp(void)
46
{
47
      register_slp();
48
}
49
50
void register_slp(void)
51
{
52
      SLPHandle phslp;
53
      SLPError result;
54
      struct sigaction act, oact;
55
      /* TODO: make it a config option */
56
      /* hardcode it to 5 minutes now, because we use also the load
57
         from last 5 minutes */
58
      int slp_timeout = 60 * 3;
59
60
      /* do not bomb the slp server with wrong configuration */
61
      if ( slp_timeout < 120 )
62
        slp_timeout = 120 ;
63
      if ( slp_timeout > SLP_LIFETIME_MAXIMUM )
64
         slp_timeout = SLP_LIFETIME_MAXIMUM;
65
66
      result = SLPOpen( 0, SLP_FALSE, &phslp);
67
      if (result != SLP_OK)
68
         rs_log_warning( "SLPOpen failed" );
69
      else {
70
         char hostname[1024];
71
         char SLPServiceUrl[2048];
72
         char SLPattributes[2048];
73
         long load = -1, bogomips = 0;
74
         FILE *proc;
75
76
         gethostname( hostname, 1023 );
77
         /* Linux specific part, no idea how to do this in general */
78
         proc = fopen( "/proc/cpuinfo", "r" );
79
         if ( proc ){
80
           while( !feof(proc) ) {
81
               long b = 0;
82
               int ret;
83
               ret = fscanf( proc, "bogomips        : %ld", &b );
84
               if ( ret < 0 )
85
                  break;
86
               if ( ret )
87
                  bogomips += b;
88
               fseek( proc, 1L, SEEK_CUR );
89
           }
90
           fclose( proc );
91
         }
92
93
         proc = fopen( "/proc/loadavg", "r" );
94
         if ( proc ){
95
           fscanf( proc, "%*d.%*d %ld.%*d %*s %*s %*s", &load );
96
           fclose( proc );
97
         }
98
	 if ( !bogomips ) bogomips = 1;
99
	 load += 1;
100
101
         snprintf( SLPServiceUrl, 1023, "service:distccd.%s://%s:%i", compiler_version, hostname, arg_port );
102
         snprintf( SLPattributes, 1023, "(maxjobs=%d),(bogomips=%ld),(load=%ld)", dcc_max_kids, bogomips, load );
103
104
         result = SLPReg( phslp,
105
                          SLPServiceUrl,
106
                          slp_timeout,
107
                          0,
108
                          SLPattributes,
109
                          SLP_TRUE,
110
                          mySLPRegReport,
111
                          0 );
112
113
         if (result != SLP_OK)
114
            rs_log_warning( "unable to register SLP service" );
115
         SLPClose( phslp );
116
117
         /* sigalarm is also used in inetd mode, but we should never
118
            use SLP in inetd mode anyway ...                         */
119
         act.sa_handler = refresh_slp;
120
         if (0 != sigaction(SIGALRM, &act, &oact))
121
             rs_log_warning("Error establishing signal handler for SLP");
122
         alarm(slp_timeout - 15);
123
      }
124
}
125
#endif
126
127
(-)distcc-2.16/src/register_slp.h (+15 lines)
Line 0 Link Here
1
2
#include "config.h"
3
4
#ifdef WITH_SLP
5
6
#include <slp.h>
7
8
void  register_slp(void);
9
char* used_compiler_version(void);
10
11
void refresh_slp(void);
12
void mySLPRegReport(SLPHandle hslp, SLPError errcode, void *cookie);
13
14
#endif
15

Return to bug 80219