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.18.3/Makefile.in (-4 / +16 lines)
Lines 56-62 Link Here
56
GNOME_CFLAGS = @GNOME_CFLAGS@
56
GNOME_CFLAGS = @GNOME_CFLAGS@
57
GNOME_LIBS = @GNOME_LIBS@
57
GNOME_LIBS = @GNOME_LIBS@
58
58
59
LIBS = @LIBS@
59
LIBS = @LIBS@ @LIB_SLP@
60
60
61
DESTDIR =
61
DESTDIR =
62
62
Lines 78-83 Link Here
78
	$(MEN)							\
78
	$(MEN)							\
79
	$(pkgdoc_DOCS)						\
79
	$(pkgdoc_DOCS)						\
80
	$(example_DOCS)						\
80
	$(example_DOCS)						\
81
	$(slp_EXTRA) $(slp_SRC) $(slp_HEADERS)				\
81
	$(popt_EXTRA) $(popt_SRC) $(popt_HEADERS)		\
82
	$(popt_EXTRA) $(popt_SRC) $(popt_HEADERS)		\
82
	$(SRC) $(HEADERS)					\
83
	$(SRC) $(HEADERS)					\
83
	$(test_SOURCE)						\
84
	$(test_SOURCE)						\
Lines 170-175 Link Here
170
	src/safeguard.o src/snprintf.o src/timeval.o			\
171
	src/safeguard.o src/snprintf.o src/timeval.o			\
171
	lzo/minilzo.o
172
	lzo/minilzo.o
172
173
174
distccenv_obj = src/distccenv.o src/cc_version.o
175
173
distcc_obj = src/backoff.o						\
176
distcc_obj = src/backoff.o						\
174
	src/climasq.o src/clinet.o src/clirpc.o				\
177
	src/climasq.o src/clinet.o src/clirpc.o				\
175
	src/compile.o src/cpp.o						\
178
	src/compile.o src/cpp.o						\
Lines 187-193 Link Here
187
	src/ncpus.o							\
190
	src/ncpus.o							\
188
	src/prefork.o							\
191
	src/prefork.o							\
189
	src/serve.o src/setuid.o src/srvnet.o src/srvrpc.o src/state.o	\
192
	src/serve.o src/setuid.o src/srvnet.o src/srvrpc.o src/state.o	\
190
	$(common_obj) @BUILD_POPT@
193
	$(common_obj) @BUILD_POPT@ @BUILD_SLP@
191
194
192
# Objects that need to be linked in to build monitors
195
# Objects that need to be linked in to build monitors
193
mon_obj =								\
196
mon_obj =								\
Lines 221-227 Link Here
221
	src/cleanup.c							\
224
	src/cleanup.c							\
222
	src/climasq.c src/clinet.c src/clirpc.c src/compile.c		\
225
	src/climasq.c src/clinet.c src/clirpc.c src/compile.c		\
223
	src/compress.c src/cpp.c					\
226
	src/compress.c src/cpp.c					\
224
	src/daemon.c src/distcc.c src/dsignal.c				\
227
	src/daemon.c src/distcc.c src/dsignal.c src/register_slp.c	\
225
	src/dopt.c src/dparent.c src/exec.c src/filename.c		\
228
	src/dopt.c src/dparent.c src/exec.c src/filename.c		\
226
	src/h_argvtostr.c						\
229
	src/h_argvtostr.c						\
227
	src/h_exten.c src/h_hosts.c src/h_issource.c src/h_parsemask.c	\
230
	src/h_exten.c src/h_hosts.c src/h_issource.c src/h_parsemask.c	\
Lines 264-269 Link Here
264
gnome_data = gnome/distccmon-gnome-icon.png	\
267
gnome_data = gnome/distccmon-gnome-icon.png	\
265
	gnome/distccmon-gnome.desktop
268
	gnome/distccmon-gnome.desktop
266
269
270
slp_OBJS=src/register_slp.o src/cc_version.o
271
slp_SRC=src/register_slp.c src/cc_version.c
272
slp_HEADERS = src/register_slp.h src/cc_version.h
273
slp_EXTRA = README.slp
274
267
popt_OBJS=popt/findme.o  popt/popt.o  popt/poptconfig.o \
275
popt_OBJS=popt/findme.o  popt/popt.o  popt/poptconfig.o \
268
	popt/popthelp.o popt/poptparse.o
276
	popt/popthelp.o popt/poptparse.o
269
277
Lines 291-297 Link Here
291
	distcc@EXEEXT@ \
299
	distcc@EXEEXT@ \
292
	distccd@EXEEXT@ \
300
	distccd@EXEEXT@ \
293
	distccmon-text@EXEEXT@ \
301
	distccmon-text@EXEEXT@ \
294
	@GNOME_BIN@ 
302
	@GNOME_BIN@ \
303
	@SLP_BIN@ 
295
304
296
check_PROGRAMS = \
305
check_PROGRAMS = \
297
	h_argvtostr@EXEEXT@ \
306
	h_argvtostr@EXEEXT@ \
Lines 333-338 Link Here
333
distcc@EXEEXT@: $(distcc_obj)
342
distcc@EXEEXT@: $(distcc_obj)
334
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(distcc_obj) $(LIBS)
343
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(distcc_obj) $(LIBS)
335
344
345
distccenv@EXEEXT@: $(distccenv_obj)
346
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(distccenv_obj) $(LIBS)
347
336
distccd@EXEEXT@: $(distccd_obj)
348
distccd@EXEEXT@: $(distccd_obj)
337
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(distccd_obj) $(LIBS)	
349
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(distccd_obj) $(LIBS)	
338
350
(-)distcc-2.18.3/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.18.3/configure (-63 / +208 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 3683-3689 Link Here
3683
  cat conftest.err >&5
3699
  cat conftest.err >&5
3684
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3700
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3685
  (exit $ac_status); } &&
3701
  (exit $ac_status); } &&
3686
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
3702
	 { ac_try='test -z "$ac_c_werror_flag"
3703
			 || test ! -s conftest.err'
3687
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3704
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3688
  (eval $ac_try) 2>&5
3705
  (eval $ac_try) 2>&5
3689
  ac_status=$?
3706
  ac_status=$?
Lines 4013-4019 Link Here
4013
  cat conftest.err >&5
4030
  cat conftest.err >&5
4014
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4031
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4015
  (exit $ac_status); } &&
4032
  (exit $ac_status); } &&
4016
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
4033
	 { ac_try='test -z "$ac_c_werror_flag"
4034
			 || test ! -s conftest.err'
4017
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4035
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4018
  (eval $ac_try) 2>&5
4036
  (eval $ac_try) 2>&5
4019
  ac_status=$?
4037
  ac_status=$?
Lines 4183-4189 Link Here
4183
  cat conftest.err >&5
4201
  cat conftest.err >&5
4184
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4202
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4185
  (exit $ac_status); } &&
4203
  (exit $ac_status); } &&
4186
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
4204
	 { ac_try='test -z "$ac_c_werror_flag"
4205
			 || test ! -s conftest.err'
4187
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4206
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4188
  (eval $ac_try) 2>&5
4207
  (eval $ac_try) 2>&5
4189
  ac_status=$?
4208
  ac_status=$?
Lines 4253-4259 Link Here
4253
  cat conftest.err >&5
4272
  cat conftest.err >&5
4254
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4273
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4255
  (exit $ac_status); } &&
4274
  (exit $ac_status); } &&
4256
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
4275
	 { ac_try='test -z "$ac_c_werror_flag"
4276
			 || test ! -s conftest.err'
4257
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4277
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4258
  (eval $ac_try) 2>&5
4278
  (eval $ac_try) 2>&5
4259
  ac_status=$?
4279
  ac_status=$?
Lines 4405-4411 Link Here
4405
  cat conftest.err >&5
4425
  cat conftest.err >&5
4406
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4426
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4407
  (exit $ac_status); } &&
4427
  (exit $ac_status); } &&
4408
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
4428
	 { ac_try='test -z "$ac_c_werror_flag"
4429
			 || test ! -s conftest.err'
4409
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4430
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4410
  (eval $ac_try) 2>&5
4431
  (eval $ac_try) 2>&5
4411
  ac_status=$?
4432
  ac_status=$?
Lines 4551-4557 Link Here
4551
  cat conftest.err >&5
4572
  cat conftest.err >&5
4552
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4573
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4553
  (exit $ac_status); } &&
4574
  (exit $ac_status); } &&
4554
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
4575
	 { ac_try='test -z "$ac_c_werror_flag"
4576
			 || test ! -s conftest.err'
4555
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4577
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4556
  (eval $ac_try) 2>&5
4578
  (eval $ac_try) 2>&5
4557
  ac_status=$?
4579
  ac_status=$?
Lines 4614-4620 Link Here
4614
  cat conftest.err >&5
4636
  cat conftest.err >&5
4615
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4637
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4616
  (exit $ac_status); } &&
4638
  (exit $ac_status); } &&
4617
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
4639
	 { ac_try='test -z "$ac_c_werror_flag"
4640
			 || test ! -s conftest.err'
4618
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4641
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4619
  (eval $ac_try) 2>&5
4642
  (eval $ac_try) 2>&5
4620
  ac_status=$?
4643
  ac_status=$?
Lines 4683-4689 Link Here
4683
  cat conftest.err >&5
4706
  cat conftest.err >&5
4684
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4707
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4685
  (exit $ac_status); } &&
4708
  (exit $ac_status); } &&
4686
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
4709
	 { ac_try='test -z "$ac_c_werror_flag"
4710
			 || test ! -s conftest.err'
4687
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4711
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4688
  (eval $ac_try) 2>&5
4712
  (eval $ac_try) 2>&5
4689
  ac_status=$?
4713
  ac_status=$?
Lines 4754-4760 Link Here
4754
  cat conftest.err >&5
4778
  cat conftest.err >&5
4755
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4779
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4756
  (exit $ac_status); } &&
4780
  (exit $ac_status); } &&
4757
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
4781
	 { ac_try='test -z "$ac_c_werror_flag"
4782
			 || test ! -s conftest.err'
4758
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4783
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4759
  (eval $ac_try) 2>&5
4784
  (eval $ac_try) 2>&5
4760
  ac_status=$?
4785
  ac_status=$?
Lines 4918-4924 Link Here
4918
  cat conftest.err >&5
4943
  cat conftest.err >&5
4919
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4944
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4920
  (exit $ac_status); } &&
4945
  (exit $ac_status); } &&
4921
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
4946
	 { ac_try='test -z "$ac_c_werror_flag"
4947
			 || test ! -s conftest.err'
4922
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4948
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4923
  (eval $ac_try) 2>&5
4949
  (eval $ac_try) 2>&5
4924
  ac_status=$?
4950
  ac_status=$?
Lines 4995-5001 Link Here
4995
  cat conftest.err >&5
5021
  cat conftest.err >&5
4996
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5022
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4997
  (exit $ac_status); } &&
5023
  (exit $ac_status); } &&
4998
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
5024
	 { ac_try='test -z "$ac_c_werror_flag"
5025
			 || test ! -s conftest.err'
4999
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5026
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5000
  (eval $ac_try) 2>&5
5027
  (eval $ac_try) 2>&5
5001
  ac_status=$?
5028
  ac_status=$?
Lines 5077-5083 Link Here
5077
  cat conftest.err >&5
5104
  cat conftest.err >&5
5078
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5105
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5079
  (exit $ac_status); } &&
5106
  (exit $ac_status); } &&
5080
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
5107
	 { ac_try='test -z "$ac_c_werror_flag"
5108
			 || test ! -s conftest.err'
5081
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5109
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5082
  (eval $ac_try) 2>&5
5110
  (eval $ac_try) 2>&5
5083
  ac_status=$?
5111
  ac_status=$?
Lines 5131-5137 Link Here
5131
  cat conftest.err >&5
5159
  cat conftest.err >&5
5132
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5160
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5133
  (exit $ac_status); } &&
5161
  (exit $ac_status); } &&
5134
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
5162
	 { ac_try='test -z "$ac_c_werror_flag"
5163
			 || test ! -s conftest.err'
5135
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5164
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5136
  (eval $ac_try) 2>&5
5165
  (eval $ac_try) 2>&5
5137
  ac_status=$?
5166
  ac_status=$?
Lines 5201-5207 Link Here
5201
  cat conftest.err >&5
5230
  cat conftest.err >&5
5202
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5231
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5203
  (exit $ac_status); } &&
5232
  (exit $ac_status); } &&
5204
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
5233
	 { ac_try='test -z "$ac_c_werror_flag"
5234
			 || test ! -s conftest.err'
5205
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5235
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5206
  (eval $ac_try) 2>&5
5236
  (eval $ac_try) 2>&5
5207
  ac_status=$?
5237
  ac_status=$?
Lines 5255-5261 Link Here
5255
  cat conftest.err >&5
5285
  cat conftest.err >&5
5256
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5286
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5257
  (exit $ac_status); } &&
5287
  (exit $ac_status); } &&
5258
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
5288
	 { ac_try='test -z "$ac_c_werror_flag"
5289
			 || test ! -s conftest.err'
5259
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5290
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5260
  (eval $ac_try) 2>&5
5291
  (eval $ac_try) 2>&5
5261
  ac_status=$?
5292
  ac_status=$?
Lines 5325-5331 Link Here
5325
  cat conftest.err >&5
5356
  cat conftest.err >&5
5326
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5357
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5327
  (exit $ac_status); } &&
5358
  (exit $ac_status); } &&
5328
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
5359
	 { ac_try='test -z "$ac_c_werror_flag"
5360
			 || test ! -s conftest.err'
5329
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5361
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5330
  (eval $ac_try) 2>&5
5362
  (eval $ac_try) 2>&5
5331
  ac_status=$?
5363
  ac_status=$?
Lines 5379-5385 Link Here
5379
  cat conftest.err >&5
5411
  cat conftest.err >&5
5380
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5412
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5381
  (exit $ac_status); } &&
5413
  (exit $ac_status); } &&
5382
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
5414
	 { ac_try='test -z "$ac_c_werror_flag"
5415
			 || test ! -s conftest.err'
5383
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5416
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5384
  (eval $ac_try) 2>&5
5417
  (eval $ac_try) 2>&5
5385
  ac_status=$?
5418
  ac_status=$?
Lines 5449-5455 Link Here
5449
  cat conftest.err >&5
5482
  cat conftest.err >&5
5450
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5483
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5451
  (exit $ac_status); } &&
5484
  (exit $ac_status); } &&
5452
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
5485
	 { ac_try='test -z "$ac_c_werror_flag"
5486
			 || test ! -s conftest.err'
5453
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5487
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5454
  (eval $ac_try) 2>&5
5488
  (eval $ac_try) 2>&5
5455
  ac_status=$?
5489
  ac_status=$?
Lines 5503-5509 Link Here
5503
  cat conftest.err >&5
5537
  cat conftest.err >&5
5504
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5538
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5505
  (exit $ac_status); } &&
5539
  (exit $ac_status); } &&
5506
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
5540
	 { ac_try='test -z "$ac_c_werror_flag"
5541
			 || test ! -s conftest.err'
5507
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5542
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5508
  (eval $ac_try) 2>&5
5543
  (eval $ac_try) 2>&5
5509
  ac_status=$?
5544
  ac_status=$?
Lines 5571-5577 Link Here
5571
  cat conftest.err >&5
5606
  cat conftest.err >&5
5572
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5607
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5573
  (exit $ac_status); } &&
5608
  (exit $ac_status); } &&
5574
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
5609
	 { ac_try='test -z "$ac_c_werror_flag"
5610
			 || test ! -s conftest.err'
5575
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5611
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5576
  (eval $ac_try) 2>&5
5612
  (eval $ac_try) 2>&5
5577
  ac_status=$?
5613
  ac_status=$?
Lines 5755-5760 Link Here
5755
echo "${ECHO_T}no" >&6
5791
echo "${ECHO_T}no" >&6
5756
fi
5792
fi
5757
5793
5794
########################################################################
5795
# Check for OpenSLP
5796
# Check whether --enable-slp or --disable-slp was given.
5797
if test "${enable_slp+set}" = set; then
5798
  enableval="$enable_slp"
5799
  with_slp=$enableval
5800
else
5801
  with_slp=no
5802
fi;
5803
if test "$with_slp" = "yes"; then
5804
echo "$as_me:$LINENO: checking for SLP support" >&5
5805
echo $ECHO_N "checking for SLP support... $ECHO_C" >&6
5806
save_slptest_LIBS="$LIBS"
5807
save_slptest_LDFLAGS="$LDFLAGS"
5808
save_slptest_CPPFLAGS="$CPPFLAGS"
5809
LDFLAGS="$all_libraries $LDFLAGS"
5810
CPPFLAGS="$CPPFLAGS $all_includes"
5811
LIBS="-lslp"
5812
cat >conftest.$ac_ext <<_ACEOF
5813
/* confdefs.h.  */
5814
_ACEOF
5815
cat confdefs.h >>conftest.$ac_ext
5816
cat >>conftest.$ac_ext <<_ACEOF
5817
/* end confdefs.h.  */
5818
5819
                       #include <slp.h>
5820
5821
int
5822
main ()
5823
{
5824
5825
                       SLPOpen(0, SLP_FALSE, (SLPHandle*) 0);
5826
5827
  ;
5828
  return 0;
5829
}
5830
_ACEOF
5831
rm -f conftest.$ac_objext conftest$ac_exeext
5832
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5833
  (eval $ac_link) 2>conftest.er1
5834
  ac_status=$?
5835
  grep -v '^ *+' conftest.er1 >conftest.err
5836
  rm -f conftest.er1
5837
  cat conftest.err >&5
5838
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5839
  (exit $ac_status); } &&
5840
	 { ac_try='test -z "$ac_c_werror_flag"
5841
			 || test ! -s conftest.err'
5842
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5843
  (eval $ac_try) 2>&5
5844
  ac_status=$?
5845
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5846
  (exit $ac_status); }; } &&
5847
	 { ac_try='test -s conftest$ac_exeext'
5848
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5849
  (eval $ac_try) 2>&5
5850
  ac_status=$?
5851
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5852
  (exit $ac_status); }; }; then
5853
5854
5855
cat >>confdefs.h <<\_ACEOF
5856
#define WITH_SLP 1
5857
_ACEOF
5858
5859
                       LIB_SLP="-lslp"
5860
		       SLP_BIN=distccenv
5861
                       BUILD_SLP='$(slp_OBJS)'
5862
                       echo "$as_me:$LINENO: result: yes" >&5
5863
echo "${ECHO_T}yes" >&6
5864
5865
else
5866
  echo "$as_me: failed program was:" >&5
5867
sed 's/^/| /' conftest.$ac_ext >&5
5868
5869
5870
                       { { echo "$as_me:$LINENO: error: no" >&5
5871
echo "$as_me: error: no" >&2;}
5872
   { (exit 1); exit 1; }; }
5873
5874
fi
5875
rm -f conftest.err conftest.$ac_objext \
5876
      conftest$ac_exeext conftest.$ac_ext
5877
CPPFLAGS=$save_slptest_CPPFLAGS
5878
LDFLAGS=$save_slptest_LDFLAGS
5879
LIBS=$save_slptest_LIBS
5880
fi
5881
5882
5758
5883
5759
5884
5760
########################################################################
5885
########################################################################
Lines 5798-5804 Link Here
5798
  cat conftest.err >&5
5923
  cat conftest.err >&5
5799
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5924
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5800
  (exit $ac_status); } &&
5925
  (exit $ac_status); } &&
5801
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
5926
	 { ac_try='test -z "$ac_c_werror_flag"
5927
			 || test ! -s conftest.err'
5802
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5928
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5803
  (eval $ac_try) 2>&5
5929
  (eval $ac_try) 2>&5
5804
  ac_status=$?
5930
  ac_status=$?
Lines 5828-5834 Link Here
5828
5954
5829
5955
5830
5956
5831
5832
########################################################################
5957
########################################################################
5833
# Checks for library functions, using libraries discovered above
5958
# Checks for library functions, using libraries discovered above
5834
CPPFLAGS="$CPPFLAGS -I$srcdir/src"
5959
CPPFLAGS="$CPPFLAGS -I$srcdir/src"
Lines 5909-5915 Link Here
5909
  cat conftest.err >&5
6034
  cat conftest.err >&5
5910
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6035
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5911
  (exit $ac_status); } &&
6036
  (exit $ac_status); } &&
5912
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
6037
	 { ac_try='test -z "$ac_c_werror_flag"
6038
			 || test ! -s conftest.err'
5913
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6039
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5914
  (eval $ac_try) 2>&5
6040
  (eval $ac_try) 2>&5
5915
  ac_status=$?
6041
  ac_status=$?
Lines 6017-6023 Link Here
6017
  cat conftest.err >&5
6143
  cat conftest.err >&5
6018
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6144
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6019
  (exit $ac_status); } &&
6145
  (exit $ac_status); } &&
6020
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
6146
	 { ac_try='test -z "$ac_c_werror_flag"
6147
			 || test ! -s conftest.err'
6021
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6148
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6022
  (eval $ac_try) 2>&5
6149
  (eval $ac_try) 2>&5
6023
  ac_status=$?
6150
  ac_status=$?
Lines 6123-6129 Link Here
6123
  cat conftest.err >&5
6250
  cat conftest.err >&5
6124
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6251
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6125
  (exit $ac_status); } &&
6252
  (exit $ac_status); } &&
6126
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
6253
	 { ac_try='test -z "$ac_c_werror_flag"
6254
			 || test ! -s conftest.err'
6127
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6255
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6128
  (eval $ac_try) 2>&5
6256
  (eval $ac_try) 2>&5
6129
  ac_status=$?
6257
  ac_status=$?
Lines 6226-6232 Link Here
6226
  cat conftest.err >&5
6354
  cat conftest.err >&5
6227
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6355
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6228
  (exit $ac_status); } &&
6356
  (exit $ac_status); } &&
6229
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
6357
	 { ac_try='test -z "$ac_c_werror_flag"
6358
			 || test ! -s conftest.err'
6230
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6359
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6231
  (eval $ac_try) 2>&5
6360
  (eval $ac_try) 2>&5
6232
  ac_status=$?
6361
  ac_status=$?
Lines 6330-6336 Link Here
6330
  cat conftest.err >&5
6459
  cat conftest.err >&5
6331
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6460
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6332
  (exit $ac_status); } &&
6461
  (exit $ac_status); } &&
6333
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
6462
	 { ac_try='test -z "$ac_c_werror_flag"
6463
			 || test ! -s conftest.err'
6334
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6464
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6335
  (eval $ac_try) 2>&5
6465
  (eval $ac_try) 2>&5
6336
  ac_status=$?
6466
  ac_status=$?
Lines 6433-6439 Link Here
6433
  cat conftest.err >&5
6563
  cat conftest.err >&5
6434
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6564
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6435
  (exit $ac_status); } &&
6565
  (exit $ac_status); } &&
6436
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
6566
	 { ac_try='test -z "$ac_c_werror_flag"
6567
			 || test ! -s conftest.err'
6437
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6568
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6438
  (eval $ac_try) 2>&5
6569
  (eval $ac_try) 2>&5
6439
  ac_status=$?
6570
  ac_status=$?
Lines 6498-6504 Link Here
6498
  cat conftest.err >&5
6629
  cat conftest.err >&5
6499
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6630
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6500
  (exit $ac_status); } &&
6631
  (exit $ac_status); } &&
6501
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
6632
	 { ac_try='test -z "$ac_c_werror_flag"
6633
			 || test ! -s conftest.err'
6502
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6634
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6503
  (eval $ac_try) 2>&5
6635
  (eval $ac_try) 2>&5
6504
  ac_status=$?
6636
  ac_status=$?
Lines 6567-6573 Link Here
6567
  cat conftest.err >&5
6699
  cat conftest.err >&5
6568
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6700
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6569
  (exit $ac_status); } &&
6701
  (exit $ac_status); } &&
6570
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
6702
	 { ac_try='test -z "$ac_c_werror_flag"
6703
			 || test ! -s conftest.err'
6571
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6704
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6572
  (eval $ac_try) 2>&5
6705
  (eval $ac_try) 2>&5
6573
  ac_status=$?
6706
  ac_status=$?
Lines 6636-6642 Link Here
6636
  cat conftest.err >&5
6769
  cat conftest.err >&5
6637
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6770
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6638
  (exit $ac_status); } &&
6771
  (exit $ac_status); } &&
6639
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
6772
	 { ac_try='test -z "$ac_c_werror_flag"
6773
			 || test ! -s conftest.err'
6640
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6774
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6641
  (eval $ac_try) 2>&5
6775
  (eval $ac_try) 2>&5
6642
  ac_status=$?
6776
  ac_status=$?
Lines 6705-6711 Link Here
6705
  cat conftest.err >&5
6839
  cat conftest.err >&5
6706
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6840
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6707
  (exit $ac_status); } &&
6841
  (exit $ac_status); } &&
6708
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
6842
	 { ac_try='test -z "$ac_c_werror_flag"
6843
			 || test ! -s conftest.err'
6709
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6844
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6710
  (eval $ac_try) 2>&5
6845
  (eval $ac_try) 2>&5
6711
  ac_status=$?
6846
  ac_status=$?
Lines 6774-6780 Link Here
6774
  cat conftest.err >&5
6909
  cat conftest.err >&5
6775
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6910
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6776
  (exit $ac_status); } &&
6911
  (exit $ac_status); } &&
6777
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
6912
	 { ac_try='test -z "$ac_c_werror_flag"
6913
			 || test ! -s conftest.err'
6778
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6914
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6779
  (eval $ac_try) 2>&5
6915
  (eval $ac_try) 2>&5
6780
  ac_status=$?
6916
  ac_status=$?
Lines 6849-6855 Link Here
6849
  cat conftest.err >&5
6985
  cat conftest.err >&5
6850
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6986
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6851
  (exit $ac_status); } &&
6987
  (exit $ac_status); } &&
6852
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
6988
	 { ac_try='test -z "$ac_c_werror_flag"
6989
			 || test ! -s conftest.err'
6853
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6990
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6854
  (eval $ac_try) 2>&5
6991
  (eval $ac_try) 2>&5
6855
  ac_status=$?
6992
  ac_status=$?
Lines 6905-6911 Link Here
6905
  cat conftest.err >&5
7042
  cat conftest.err >&5
6906
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7043
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6907
  (exit $ac_status); } &&
7044
  (exit $ac_status); } &&
6908
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
7045
	 { ac_try='test -z "$ac_c_werror_flag"
7046
			 || test ! -s conftest.err'
6909
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7047
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6910
  (eval $ac_try) 2>&5
7048
  (eval $ac_try) 2>&5
6911
  ac_status=$?
7049
  ac_status=$?
Lines 6964-6970 Link Here
6964
  cat conftest.err >&5
7102
  cat conftest.err >&5
6965
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7103
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6966
  (exit $ac_status); } &&
7104
  (exit $ac_status); } &&
6967
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
7105
	 { ac_try='test -z "$ac_c_werror_flag"
7106
			 || test ! -s conftest.err'
6968
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7107
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6969
  (eval $ac_try) 2>&5
7108
  (eval $ac_try) 2>&5
6970
  ac_status=$?
7109
  ac_status=$?
Lines 7154-7160 Link Here
7154
  cat conftest.err >&5
7293
  cat conftest.err >&5
7155
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7294
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7156
  (exit $ac_status); } &&
7295
  (exit $ac_status); } &&
7157
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
7296
	 { ac_try='test -z "$ac_c_werror_flag"
7297
			 || test ! -s conftest.err'
7158
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7298
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7159
  (eval $ac_try) 2>&5
7299
  (eval $ac_try) 2>&5
7160
  ac_status=$?
7300
  ac_status=$?
Lines 7198-7204 Link Here
7198
  cat conftest.err >&5
7338
  cat conftest.err >&5
7199
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7339
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7200
  (exit $ac_status); } &&
7340
  (exit $ac_status); } &&
7201
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
7341
	 { ac_try='test -z "$ac_c_werror_flag"
7342
			 || test ! -s conftest.err'
7202
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7343
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7203
  (eval $ac_try) 2>&5
7344
  (eval $ac_try) 2>&5
7204
  ac_status=$?
7345
  ac_status=$?
Lines 7239-7244 Link Here
7239
7380
7240
7381
7241
7382
7383
7384
7242
cat >>confdefs.h <<_ACEOF
7385
cat >>confdefs.h <<_ACEOF
7243
#define GNU_HOST "$host"
7386
#define GNU_HOST "$host"
7244
_ACEOF
7387
_ACEOF
Lines 7884-7891 Link Here
7884
s,@PYTHON@,$PYTHON,;t t
8027
s,@PYTHON@,$PYTHON,;t t
7885
s,@CPP@,$CPP,;t t
8028
s,@CPP@,$CPP,;t t
7886
s,@EGREP@,$EGREP,;t t
8029
s,@EGREP@,$EGREP,;t t
8030
s,@LIB_SLP@,$LIB_SLP,;t t
7887
s,@BUILD_POPT@,$BUILD_POPT,;t t
8031
s,@BUILD_POPT@,$BUILD_POPT,;t t
7888
s,@GNOME_BIN@,$GNOME_BIN,;t t
8032
s,@GNOME_BIN@,$GNOME_BIN,;t t
8033
s,@SLP_BIN@,$SLP_BIN,;t t
8034
s,@BUILD_SLP@,$BUILD_SLP,;t t
7889
s,@LIBOBJS@,$LIBOBJS,;t t
8035
s,@LIBOBJS@,$LIBOBJS,;t t
7890
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
8036
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
7891
CEOF
8037
CEOF
Lines 8054-8059 Link Here
8054
  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
8200
  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
8055
  esac
8201
  esac
8056
8202
8203
  if test x"$ac_file" != x-; then
8204
    { echo "$as_me:$LINENO: creating $ac_file" >&5
8205
echo "$as_me: creating $ac_file" >&6;}
8206
    rm -f "$ac_file"
8207
  fi
8057
  # Let's still pretend it is `configure' which instantiates (i.e., don't
8208
  # Let's still pretend it is `configure' which instantiates (i.e., don't
8058
  # use $as_me), people would be surprised to read:
8209
  # use $as_me), people would be surprised to read:
8059
  #    /* config.h.  Generated by config.status.  */
8210
  #    /* config.h.  Generated by config.status.  */
Lines 8092-8103 Link Here
8092
	 fi;;
8243
	 fi;;
8093
      esac
8244
      esac
8094
    done` || { (exit 1); exit 1; }
8245
    done` || { (exit 1); exit 1; }
8095
8096
  if test x"$ac_file" != x-; then
8097
    { echo "$as_me:$LINENO: creating $ac_file" >&5
8098
echo "$as_me: creating $ac_file" >&6;}
8099
    rm -f "$ac_file"
8100
  fi
8101
_ACEOF
8246
_ACEOF
8102
cat >>$CONFIG_STATUS <<_ACEOF
8247
cat >>$CONFIG_STATUS <<_ACEOF
8103
  sed "$ac_vpsub
8248
  sed "$ac_vpsub
(-)distcc-2.18.3/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 286-298 Link Here
286
    AC_MSG_RESULT(no)
285
    AC_MSG_RESULT(no)
287
fi
286
fi
288
287
288
########################################################################
289
# Check for OpenSLP
290
AC_ARG_ENABLE(slp, [  --enable-slp            find hosts via slp],  with_slp=$enableval, with_slp=no)
291
if test "$with_slp" = "yes"; then
292
AC_MSG_CHECKING(for SLP support)
293
save_slptest_LIBS="$LIBS"
294
save_slptest_LDFLAGS="$LDFLAGS"
295
save_slptest_CPPFLAGS="$CPPFLAGS"
296
LDFLAGS="$all_libraries $LDFLAGS"
297
CPPFLAGS="$CPPFLAGS $all_includes"
298
LIBS="-lslp"
299
AC_TRY_LINK(   [
300
                       #include <slp.h>
301
               ],[
302
                       SLPOpen(0, SLP_FALSE, (SLPHandle*) 0);
303
               ],[
304
                       AC_DEFINE(WITH_SLP,1,[Define if SLP is avaible and enabled])
305
                       LIB_SLP="-lslp"
306
		       SLP_BIN=distccenv
307
                       BUILD_SLP='$(slp_OBJS)'
308
                       AC_MSG_RESULT(yes)
309
               ],[
310
                       AC_MSG_ERROR(no)
311
])
312
CPPFLAGS=$save_slptest_CPPFLAGS
313
LDFLAGS=$save_slptest_LDFLAGS
314
LIBS=$save_slptest_LIBS
315
fi
316
AC_SUBST(LIB_SLP)
317
289
318
290
319
291
########################################################################
320
########################################################################
292
# Check for types
321
# Check for types
293
AC_TYPE_SIGNAL
322
AC_TYPE_SIGNAL
294
323
295
296
########################################################################
324
########################################################################
297
# Checks for library functions, using libraries discovered above
325
# Checks for library functions, using libraries discovered above
298
CPPFLAGS="$CPPFLAGS -I$srcdir/src"
326
CPPFLAGS="$CPPFLAGS -I$srcdir/src"
Lines 393-398 Link Here
393
AC_SUBST(CPPFLAGS)
421
AC_SUBST(CPPFLAGS)
394
AC_SUBST(BUILD_POPT)
422
AC_SUBST(BUILD_POPT)
395
AC_SUBST(GNOME_BIN)
423
AC_SUBST(GNOME_BIN)
424
AC_SUBST(SLP_BIN)
425
AC_SUBST(BUILD_SLP)
396
dnl AC_DEFINE_UNQUOTED(PACKAGE, $PACKAGE, [Package name])
426
dnl AC_DEFINE_UNQUOTED(PACKAGE, $PACKAGE, [Package name])
397
dnl AC_DEFINE_UNQUOTED(VERSION, $VERSION, [Package version])
427
dnl AC_DEFINE_UNQUOTED(VERSION, $VERSION, [Package version])
398
AC_DEFINE_UNQUOTED(GNU_HOST, ["$host"], [Your gnu-style host triple])
428
AC_DEFINE_UNQUOTED(GNU_HOST, ["$host"], [Your gnu-style host triple])
(-)distcc-2.18.3/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.18.3/src/cc_version.h (+3 lines)
Line 0 Link Here
1
2
char *used_compiler_version(void);
3
(-)distcc-2.18.3/src/config.h.in (+3 lines)
Lines 239-244 Link Here
239
/* Use GTK+ */
239
/* Use GTK+ */
240
#undef WITH_GTK
240
#undef WITH_GTK
241
241
242
/* Use SLP */
243
#undef WITH_SLP
244
242
/* Define to `__inline__' or `__inline' if that's what the C compiler
245
/* Define to `__inline__' or `__inline' if that's what the C compiler
243
   calls it, or to nothing if 'inline' is not supported under any name.  */
246
   calls it, or to nothing if 'inline' is not supported under any name.  */
244
#ifndef __cplusplus
247
#ifndef __cplusplus
(-)distcc-2.18.3/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.18.3/src/dopt.c (+17 lines)
Lines 45-50 Link Here
45
#include "daemon.h"
45
#include "daemon.h"
46
#include "access.h"
46
#include "access.h"
47
47
48
#ifdef WITH_SLP
49
#include "register_slp.h"
50
#endif
51
48
int opt_niceness = 5;           /* default */
52
int opt_niceness = 5;           /* default */
49
53
50
/**
54
/**
Lines 85-90 Link Here
85
89
86
const char *arg_pid_file = NULL;
90
const char *arg_pid_file = NULL;
87
const char *arg_log_file = NULL;
91
const char *arg_log_file = NULL;
92
const char *compiler_version = NULL;
88
93
89
/* Enumeration values for options that don't have single-letter name.  These
94
/* Enumeration values for options that don't have single-letter name.  These
90
 * must be numerically above all the ascii letters. */
95
 * must be numerically above all the ascii letters. */
Lines 115-120 Link Here
115
    { "verbose", 0,      POPT_ARG_NONE, 0, 'v', 0, 0 },
120
    { "verbose", 0,      POPT_ARG_NONE, 0, 'v', 0, 0 },
116
    { "version", 0,      POPT_ARG_NONE, 0, 'V', 0, 0 },
121
    { "version", 0,      POPT_ARG_NONE, 0, 'V', 0, 0 },
117
    { "wizard", 'W',     POPT_ARG_NONE, 0, 'W', 0, 0 },
122
    { "wizard", 'W',     POPT_ARG_NONE, 0, 'W', 0, 0 },
123
#ifdef WITH_SLP
124
    { "slp-identy", 0,   POPT_ARG_STRING, &compiler_version, 0, 0, 0 },
125
#endif
118
    { 0, 0, 0, 0, 0, 0, 0 }
126
    { 0, 0, 0, 0, 0, 0, 0 }
119
};
127
};
120
128
Lines 148-153 Link Here
148
"  Mode of operation:\n"
156
"  Mode of operation:\n"
149
"    --inetd                    serve client connected to stdin\n"
157
"    --inetd                    serve client connected to stdin\n"
150
"    --daemon                   bind and listen on socket\n"
158
"    --daemon                   bind and listen on socket\n"
159
#ifdef WITH_SLP
160
"  SLP Identification:\n"
161
"    --slp-identy=STRING        to identify the provided compiler\n"
162
#endif
151
"\n"
163
"\n"
152
"distccd runs either from inetd or as a standalone daemon to compile\n"
164
"distccd runs either from inetd or as a standalone daemon to compile\n"
153
"files submitted by the distcc client.\n"
165
"files submitted by the distcc client.\n"
Lines 247-252 Link Here
247
        }
259
        }
248
    }
260
    }
249
261
262
#ifdef WITH_SLP
263
    if ( compiler_version == NULL )
264
       compiler_version = used_compiler_version();
265
#endif
266
250
    poptFreeContext(po);
267
    poptFreeContext(po);
251
    return 0;
268
    return 0;
252
269
(-)distcc-2.18.3/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.18.3/src/dparent.c (+7 lines)
Lines 70-75 Link Here
70
#include "types.h"
70
#include "types.h"
71
#include "daemon.h"
71
#include "daemon.h"
72
#include "netutil.h"
72
#include "netutil.h"
73
#if WITH_SLP
74
#include "register_slp.h"
75
#endif
73
76
74
static void dcc_nofork_parent(int listen_fd) NORETURN;
77
static void dcc_nofork_parent(int listen_fd) NORETURN;
75
static void dcc_detach(void);
78
static void dcc_detach(void);
Lines 135-140 Link Here
135
     * not.  */
138
     * not.  */
136
    dcc_master_pid = getpid();
139
    dcc_master_pid = getpid();
137
140
141
#ifdef WITH_SLP
142
    register_slp();
143
#endif
144
138
    if (opt_no_fork) {
145
    if (opt_no_fork) {
139
        dcc_log_daemon_started("non-forking daemon");   
146
        dcc_log_daemon_started("non-forking daemon");   
140
        dcc_nofork_parent(listen_fd);
147
        dcc_nofork_parent(listen_fd);
(-)distcc-2.18.3/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.18.3/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.18.3/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