Skip to content

Commit f114691

Browse files
author
Colum Paget
committed
fix compile if no system libUseful
1 parent e6a7cc8 commit f114691

File tree

4 files changed

+26
-96
lines changed

4 files changed

+26
-96
lines changed

Makefile

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
OBJ=parse.o stats.o settings.o help.o
2-
FLAGS=-g -O2 -DPACKAGE_NAME=\"timediff\" -DPACKAGE_TARNAME=\"timediff\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"timediff\ 1.0\" -DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -D_FILE_OFFSET_BITS=64 -DHAVE_LIBZ=1 -DHAVE_LIBCRYPTO=1 -DHAVE_LIBSSL=1 -DHAVE_LIBCAP=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBUSEFUL_5_LIBUSEFUL_H=1 -DHAVE_LIBUSEFUL_5=1
3-
LIBS=-lUseful-5 -lcap -lssl -lcrypto -lz
4-
STATIC_LIBS=
1+
OBJ=parse.o stats.o settings.o help.o libUseful-5/libUseful.a
2+
FLAGS=-g -O2 -DPACKAGE_NAME=\"timediff\" -DPACKAGE_TARNAME=\"timediff\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"timediff\ 1.0\" -DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -D_FILE_OFFSET_BITS=64 -DHAVE_LIBZ=1 -DHAVE_LIBCRYPTO=1 -DHAVE_LIBSSL=1 -DHAVE_LIBCAP=1
3+
LIBS=-lcap -lssl -lcrypto -lz
4+
STATIC_LIBS=libUseful-5/libUseful.a
55
PREFIX=/usr/local
66

77
all: $(OBJ)
@@ -19,10 +19,12 @@ settings.o: settings.h settings.c
1919
help.o: help.h help.c
2020
gcc $(FLAGS) -c help.c
2121

22+
libUseful-5/libUseful.a:
23+
make -C libUseful-5
2224

2325

2426
clean:
25-
rm -rf timediff *.o *.orig
27+
rm -rf timediff *.o */*.o */*.so */*.a *.orig
2628

2729

2830
install:

Makefile.in

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
OBJ=parse.o stats.o settings.o help.o
1+
OBJ=parse.o stats.o settings.o help.o @LIBUSEFUL_BUNDLED@
22
FLAGS=@CFLAGS@ @DEFS@
33
LIBS=@LIBS@
44
STATIC_LIBS=@LIBUSEFUL_BUNDLED@
@@ -19,10 +19,12 @@ settings.o: settings.h settings.c
1919
help.o: help.h help.c
2020
gcc $(FLAGS) -c help.c
2121

22+
libUseful-5/libUseful.a:
23+
make -C libUseful-5
2224

2325

2426
clean:
25-
rm -rf timediff *.o *.orig
27+
rm -rf timediff *.o */*.o */*.so */*.a *.orig
2628

2729

2830
install:

config.log

+8-80
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ running configure, to aid debugging if configure makes a mistake.
44
It was created by timediff configure 1.0, which was
55
generated by GNU Autoconf 2.69. Invocation command line was
66

7-
$ ./configure
7+
$ ./configure --with-libuseful=no
88

99
## --------- ##
1010
## Platform. ##
@@ -266,58 +266,6 @@ configure:3587: checking for cap_init in -lcap
266266
configure:3612: gcc -o conftest -g -O2 conftest.c -lcap -lssl -lcrypto -lz >&5
267267
configure:3612: $? = 0
268268
configure:3621: result: yes
269-
configure:3636: checking for GetToken in -lUseful-5
270-
configure:3661: gcc -o conftest -g -O2 conftest.c -lUseful-5 -lcap -lssl -lcrypto -lz >&5
271-
configure:3661: $? = 0
272-
configure:3670: result: yes
273-
configure:3685: checking for sys/types.h
274-
configure:3685: gcc -c -g -O2 conftest.c >&5
275-
configure:3685: $? = 0
276-
configure:3685: result: yes
277-
configure:3685: checking for sys/stat.h
278-
configure:3685: gcc -c -g -O2 conftest.c >&5
279-
configure:3685: $? = 0
280-
configure:3685: result: yes
281-
configure:3685: checking for stdlib.h
282-
configure:3685: gcc -c -g -O2 conftest.c >&5
283-
configure:3685: $? = 0
284-
configure:3685: result: yes
285-
configure:3685: checking for string.h
286-
configure:3685: gcc -c -g -O2 conftest.c >&5
287-
configure:3685: $? = 0
288-
configure:3685: result: yes
289-
configure:3685: checking for memory.h
290-
configure:3685: gcc -c -g -O2 conftest.c >&5
291-
configure:3685: $? = 0
292-
configure:3685: result: yes
293-
configure:3685: checking for strings.h
294-
configure:3685: gcc -c -g -O2 conftest.c >&5
295-
configure:3685: $? = 0
296-
configure:3685: result: yes
297-
configure:3685: checking for inttypes.h
298-
configure:3685: gcc -c -g -O2 conftest.c >&5
299-
configure:3685: $? = 0
300-
configure:3685: result: yes
301-
configure:3685: checking for stdint.h
302-
configure:3685: gcc -c -g -O2 conftest.c >&5
303-
configure:3685: $? = 0
304-
configure:3685: result: yes
305-
configure:3685: checking for unistd.h
306-
configure:3685: gcc -c -g -O2 conftest.c >&5
307-
configure:3685: $? = 0
308-
configure:3685: result: yes
309-
configure:3699: checking libUseful-5/libUseful.h usability
310-
configure:3699: gcc -c -g -O2 conftest.c >&5
311-
configure:3699: $? = 0
312-
configure:3699: result: yes
313-
configure:3699: checking libUseful-5/libUseful.h presence
314-
configure:3699: gcc -E conftest.c
315-
configure:3699: $? = 0
316-
configure:3699: result: yes
317-
configure:3699: checking for libUseful-5/libUseful.h
318-
configure:3699: result: yes
319-
configure:3773: checking for GetToken in -lUseful-5
320-
configure:3807: result: yes
321269
configure:4059: creating ./config.status
322270

323271
## ---------------------- ##
@@ -335,7 +283,9 @@ generated by GNU Autoconf 2.69. Invocation command line was
335283

336284
on columPC
337285

338-
config.status:727: creating Makefile
286+
config.status:725: creating Makefile
287+
configure:5130: === configuring in libUseful-5 (/tmp/timediff/libUseful-5)
288+
configure:5193: running /bin/sh ./configure --disable-option-checking '--prefix=/usr/local' '--with-libuseful=no' --cache-file=/dev/null --srcdir=.
339289

340290
## ---------------- ##
341291
## Cache variables. ##
@@ -360,18 +310,7 @@ ac_cv_env_host_alias_set=
360310
ac_cv_env_host_alias_value=
361311
ac_cv_env_target_alias_set=
362312
ac_cv_env_target_alias_value=
363-
ac_cv_header_inttypes_h=yes
364-
ac_cv_header_libUseful_5_libUseful_h=yes
365-
ac_cv_header_memory_h=yes
366313
ac_cv_header_stdc=yes
367-
ac_cv_header_stdint_h=yes
368-
ac_cv_header_stdlib_h=yes
369-
ac_cv_header_string_h=yes
370-
ac_cv_header_strings_h=yes
371-
ac_cv_header_sys_stat_h=yes
372-
ac_cv_header_sys_types_h=yes
373-
ac_cv_header_unistd_h=yes
374-
ac_cv_lib_Useful_5_GetToken=yes
375314
ac_cv_lib_cap_cap_init=yes
376315
ac_cv_lib_crypto_EVP_CIPHER_CTX_init=yes
377316
ac_cv_lib_ssl_SSL_library_init=yes
@@ -395,7 +334,7 @@ CC='gcc'
395334
CFLAGS='-g -O2'
396335
CPP='gcc -E'
397336
CPPFLAGS=''
398-
DEFS='-DPACKAGE_NAME=\"timediff\" -DPACKAGE_TARNAME=\"timediff\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"timediff\ 1.0\" -DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -D_FILE_OFFSET_BITS=64 -DHAVE_LIBZ=1 -DHAVE_LIBCRYPTO=1 -DHAVE_LIBSSL=1 -DHAVE_LIBCAP=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBUSEFUL_5_LIBUSEFUL_H=1 -DHAVE_LIBUSEFUL_5=1'
337+
DEFS='-DPACKAGE_NAME=\"timediff\" -DPACKAGE_TARNAME=\"timediff\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"timediff\ 1.0\" -DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -D_FILE_OFFSET_BITS=64 -DHAVE_LIBZ=1 -DHAVE_LIBCRYPTO=1 -DHAVE_LIBSSL=1 -DHAVE_LIBCAP=1'
399338
ECHO_C=''
400339
ECHO_N='-n'
401340
ECHO_T=''
@@ -404,8 +343,8 @@ EXEEXT=''
404343
GREP='/bin/grep'
405344
LDFLAGS=''
406345
LIBOBJS=''
407-
LIBS='-lUseful-5 -lcap -lssl -lcrypto -lz '
408-
LIBUSEFUL_BUNDLED=''
346+
LIBS='-lcap -lssl -lcrypto -lz '
347+
LIBUSEFUL_BUNDLED='libUseful-5/libUseful.a'
409348
LTLIBOBJS=''
410349
OBJEXT='o'
411350
PACKAGE_BUGREPORT='[email protected]'
@@ -441,7 +380,7 @@ program_transform_name='s,x,x,'
441380
psdir='${docdir}'
442381
sbindir='${exec_prefix}/sbin'
443382
sharedstatedir='${prefix}/com'
444-
subdirs=''
383+
subdirs=' libUseful-5'
445384
sysconfdir='${prefix}/etc'
446385
target_alias=''
447386

@@ -462,16 +401,5 @@ target_alias=''
462401
#define HAVE_LIBCRYPTO 1
463402
#define HAVE_LIBSSL 1
464403
#define HAVE_LIBCAP 1
465-
#define HAVE_SYS_TYPES_H 1
466-
#define HAVE_SYS_STAT_H 1
467-
#define HAVE_STDLIB_H 1
468-
#define HAVE_STRING_H 1
469-
#define HAVE_MEMORY_H 1
470-
#define HAVE_STRINGS_H 1
471-
#define HAVE_INTTYPES_H 1
472-
#define HAVE_STDINT_H 1
473-
#define HAVE_UNISTD_H 1
474-
#define HAVE_LIBUSEFUL_5_LIBUSEFUL_H 1
475-
#define HAVE_LIBUSEFUL_5 1
476404

477405
configure: exit 0

config.status

+7-9
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ $config_files
417417
418418
Report bugs to <[email protected]>."
419419

420-
ac_cs_config=""
420+
ac_cs_config="'--with-libuseful=no'"
421421
ac_cs_version="\
422422
timediff config.status 1.0
423423
configured by ./configure, generated by GNU Autoconf 2.69,
@@ -427,7 +427,7 @@ Copyright (C) 2012 Free Software Foundation, Inc.
427427
This config.status script is free software; the Free Software Foundation
428428
gives unlimited permission to copy, distribute and modify it."
429429

430-
ac_pwd='/home/colum/work/timediff'
430+
ac_pwd='/tmp/timediff'
431431
srcdir='.'
432432
test -n "$AWK" || AWK=awk
433433
# The default lists apply if the user does not specify any file.
@@ -495,7 +495,7 @@ if $ac_cs_silent; then
495495
fi
496496

497497
if $ac_cs_recheck; then
498-
set X /bin/sh './configure' $ac_configure_extra_args --no-create --no-recursion
498+
set X /bin/sh './configure' '--with-libuseful=no' $ac_configure_extra_args --no-create --no-recursion
499499
shift
500500
$as_echo "running CONFIG_SHELL=/bin/sh $*" >&6
501501
CONFIG_SHELL='/bin/sh'
@@ -583,8 +583,8 @@ echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
583583
cat >>"$ac_tmp/subs1.awk" <<\_ACAWK &&
584584
S["LTLIBOBJS"]=""
585585
S["LIBOBJS"]=""
586-
S["subdirs"]=""
587-
S["LIBUSEFUL_BUNDLED"]=""
586+
S["subdirs"]=" libUseful-5"
587+
S["LIBUSEFUL_BUNDLED"]="libUseful-5/libUseful.a"
588588
S["EGREP"]="/bin/grep -E"
589589
S["GREP"]="/bin/grep"
590590
S["CPP"]="gcc -E"
@@ -599,14 +599,12 @@ S["CC"]="gcc"
599599
S["target_alias"]=""
600600
S["host_alias"]=""
601601
S["build_alias"]=""
602-
S["LIBS"]="-lUseful-5 -lcap -lssl -lcrypto -lz "
602+
S["LIBS"]="-lcap -lssl -lcrypto -lz "
603603
S["ECHO_T"]=""
604604
S["ECHO_N"]="-n"
605605
S["ECHO_C"]=""
606606
S["DEFS"]="-DPACKAGE_NAME=\\\"timediff\\\" -DPACKAGE_TARNAME=\\\"timediff\\\" -DPACKAGE_VERSION=\\\"1.0\\\" -DPACKAGE_STRING=\\\"timediff\\ 1.0\\\" -DPACKAGE_BUGREPORT=\\\"colums"\
607-
"[email protected]\\\" -DPACKAGE_URL=\\\"\\\" -DSTDC_HEADERS=1 -D_FILE_OFFSET_BITS=64 -DHAVE_LIBZ=1 -DHAVE_LIBCRYPTO=1 -DHAVE_LIBSSL=1 -DHAVE_LIBCAP=1 -D"\
608-
"HAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H="\
609-
"1 -DHAVE_UNISTD_H=1 -DHAVE_LIBUSEFUL_5_LIBUSEFUL_H=1 -DHAVE_LIBUSEFUL_5=1"
607+
"[email protected]\\\" -DPACKAGE_URL=\\\"\\\" -DSTDC_HEADERS=1 -D_FILE_OFFSET_BITS=64 -DHAVE_LIBZ=1 -DHAVE_LIBCRYPTO=1 -DHAVE_LIBSSL=1 -DHAVE_LIBCAP=1"
610608
S["mandir"]="${datarootdir}/man"
611609
S["localedir"]="${datarootdir}/locale"
612610
S["libdir"]="${exec_prefix}/lib"

0 commit comments

Comments
 (0)