Skip to content

Commit 9a573cf

Browse files
author
nixnodes
committed
removed glconf.h dependancy when building the find utility
1 parent 3ba818f commit 9a573cf

File tree

5 files changed

+108
-88
lines changed

5 files changed

+108
-88
lines changed

configure

+75-74
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.69 for glutil 2.6.6.
3+
# Generated by GNU Autoconf 2.69 for glutil 2.6.7.
44
#
55
# Report bugs to <[email protected]>.
66
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
580580
# Identity of this package.
581581
PACKAGE_NAME='glutil'
582582
PACKAGE_TARNAME='glutil'
583-
PACKAGE_VERSION='2.6.6'
584-
PACKAGE_STRING='glutil 2.6.6'
583+
PACKAGE_VERSION='2.6.7'
584+
PACKAGE_STRING='glutil 2.6.7'
585585
PACKAGE_BUGREPORT='[email protected]'
586586
PACKAGE_URL='http://glutil.nixnodes.net/'
587587

@@ -1295,7 +1295,7 @@ if test "$ac_init_help" = "long"; then
12951295
# Omit some internal or obsolete options to make the list less imposing.
12961296
# This message is too long to be a string in the A/UX 3.1 sh.
12971297
cat <<_ACEOF
1298-
\`configure' configures glutil 2.6.6 to adapt to many kinds of systems.
1298+
\`configure' configures glutil 2.6.7 to adapt to many kinds of systems.
12991299
13001300
Usage: $0 [OPTION]... [VAR=VALUE]...
13011301
@@ -1361,7 +1361,7 @@ fi
13611361

13621362
if test -n "$ac_init_help"; then
13631363
case $ac_init_help in
1364-
short | recursive ) echo "Configuration of glutil 2.6.6:";;
1364+
short | recursive ) echo "Configuration of glutil 2.6.7:";;
13651365
esac
13661366
cat <<\_ACEOF
13671367
@@ -1464,7 +1464,7 @@ fi
14641464
test -n "$ac_init_help" && exit $ac_status
14651465
if $ac_init_version; then
14661466
cat <<\_ACEOF
1467-
glutil configure 2.6.6
1467+
glutil configure 2.6.7
14681468
generated by GNU Autoconf 2.69
14691469
14701470
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2074,7 +2074,7 @@ cat >config.log <<_ACEOF
20742074
This file contains any messages produced by compilers while
20752075
running configure, to aid debugging if configure makes a mistake.
20762076
2077-
It was created by glutil $as_me 2.6.6, which was
2077+
It was created by glutil $as_me 2.6.7, which was
20782078
generated by GNU Autoconf 2.69. Invocation command line was
20792079
20802080
$ $0 $@
@@ -2939,7 +2939,7 @@ fi
29392939
29402940
# Define the identity of the package.
29412941
PACKAGE='glutil'
2942-
VERSION='2.6.6'
2942+
VERSION='2.6.7'
29432943
29442944
29452945
cat >>confdefs.h <<_ACEOF
@@ -5214,6 +5214,11 @@ else
52145214
{ $as_echo "$as_me:${as_lineno-$LINENO}: compiling for chrooted environment.." >&5
52155215
$as_echo "$as_me: compiling for chrooted environment.." >&6;}
52165216
fi
5217+
fi
5218+
5219+
if test "$glutil_enable_sbin" = "yes" ; then
5220+
$as_echo "#define _G_MODE_GFIND 1" >>confdefs.h
5221+
52175222
fi
52185223
52195224
if test "$glutil_chroot_ownbin" = "yes"; then
@@ -5225,69 +5230,6 @@ else
52255230
fi
52265231
52275232
5228-
if ! test "$host" ; then
5229-
5230-
as_ac_File=`$as_echo "ac_cv_file_\\
5231-
"$PWD/src/glconf.h"" | $as_tr_sh`
5232-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \
5233-
\"$PWD/src/glconf.h\"" >&5
5234-
$as_echo_n "checking for \
5235-
\"$PWD/src/glconf.h\"... " >&6; }
5236-
if eval \${$as_ac_File+:} false; then :
5237-
$as_echo_n "(cached) " >&6
5238-
else
5239-
test "$cross_compiling" = yes &&
5240-
as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
5241-
if test -r "\
5242-
"$PWD/src/glconf.h""; then
5243-
eval "$as_ac_File=yes"
5244-
else
5245-
eval "$as_ac_File=no"
5246-
fi
5247-
fi
5248-
eval ac_res=\$$as_ac_File
5249-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5250-
$as_echo "$ac_res" >&6; }
5251-
if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
5252-
5253-
else
5254-
\
5255-
as_ac_File=`$as_echo "ac_cv_file_"$prefix/bin/sources/glconf.h"" | $as_tr_sh`
5256-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"$prefix/bin/sources/glconf.h\"" >&5
5257-
$as_echo_n "checking for \"$prefix/bin/sources/glconf.h\"... " >&6; }
5258-
if eval \${$as_ac_File+:} false; then :
5259-
$as_echo_n "(cached) " >&6
5260-
else
5261-
test "$cross_compiling" = yes &&
5262-
as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
5263-
if test -r ""$prefix/bin/sources/glconf.h""; then
5264-
eval "$as_ac_File=yes"
5265-
else
5266-
eval "$as_ac_File=no"
5267-
fi
5268-
fi
5269-
eval ac_res=\$$as_ac_File
5270-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5271-
$as_echo "$ac_res" >&6; }
5272-
if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
5273-
\
5274-
{ $as_echo "$as_me:${as_lineno-$LINENO}: copying '$prefix/bin/sources/glconf.h' to 'src/' folder.." >&5
5275-
$as_echo "$as_me: copying '$prefix/bin/sources/glconf.h' to 'src/' folder.." >&6;}; \
5276-
if cp "$prefix/bin/sources/glconf.h" "$PWD/src/glconf.h"; then :
5277-
5278-
else
5279-
\
5280-
as_fn_error $? "could not copy \"$prefix/bin/sources/glconf.h\" to \"$PWD/src/glconf.h\"" "$LINENO" 5
5281-
fi \
5282-
5283-
fi
5284-
\
5285-
5286-
fi
5287-
5288-
fi
5289-
5290-
52915233
datadir="$prefix/scripts"
52925234
52935235
if echo $host | egrep -q "arm|eabi"; then
@@ -5486,7 +5428,64 @@ else
54865428
fi
54875429
54885430
5489-
as_ac_Header=`$as_echo "ac_cv_header_$PWD/src/glconf.h" | $as_tr_sh`
5431+
5432+
if ! test "$host" && test "$glutil_enable_sbin" = "no" ; then
5433+
as_ac_File=`$as_echo "ac_cv_file_"$PWD/src/glconf.h"" | $as_tr_sh`
5434+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"$PWD/src/glconf.h\"" >&5
5435+
$as_echo_n "checking for \"$PWD/src/glconf.h\"... " >&6; }
5436+
if eval \${$as_ac_File+:} false; then :
5437+
$as_echo_n "(cached) " >&6
5438+
else
5439+
test "$cross_compiling" = yes &&
5440+
as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
5441+
if test -r ""$PWD/src/glconf.h""; then
5442+
eval "$as_ac_File=yes"
5443+
else
5444+
eval "$as_ac_File=no"
5445+
fi
5446+
fi
5447+
eval ac_res=\$$as_ac_File
5448+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5449+
$as_echo "$ac_res" >&6; }
5450+
if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
5451+
5452+
else
5453+
\
5454+
as_ac_File=`$as_echo "ac_cv_file_"$prefix/bin/sources/glconf.h"" | $as_tr_sh`
5455+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"$prefix/bin/sources/glconf.h\"" >&5
5456+
$as_echo_n "checking for \"$prefix/bin/sources/glconf.h\"... " >&6; }
5457+
if eval \${$as_ac_File+:} false; then :
5458+
$as_echo_n "(cached) " >&6
5459+
else
5460+
test "$cross_compiling" = yes &&
5461+
as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
5462+
if test -r ""$prefix/bin/sources/glconf.h""; then
5463+
eval "$as_ac_File=yes"
5464+
else
5465+
eval "$as_ac_File=no"
5466+
fi
5467+
fi
5468+
eval ac_res=\$$as_ac_File
5469+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5470+
$as_echo "$ac_res" >&6; }
5471+
if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
5472+
\
5473+
{ $as_echo "$as_me:${as_lineno-$LINENO}: copying '$prefix/bin/sources/glconf.h' to 'src/' folder.." >&5
5474+
$as_echo "$as_me: copying '$prefix/bin/sources/glconf.h' to 'src/' folder.." >&6;}; \
5475+
if cp "$prefix/bin/sources/glconf.h" "$PWD/src/glconf.h"; then :
5476+
5477+
else
5478+
\
5479+
as_fn_error $? "could not copy \"$prefix/bin/sources/glconf.h\" to \"$PWD/src/glconf.h\"" "$LINENO" 5
5480+
fi \
5481+
5482+
fi
5483+
\
5484+
5485+
fi
5486+
5487+
5488+
as_ac_Header=`$as_echo "ac_cv_header_$PWD/src/glconf.h" | $as_tr_sh`
54905489
ac_fn_c_check_header_mongrel "$LINENO" "$PWD/src/glconf.h" "$as_ac_Header" "$ac_includes_default"
54915490
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
54925491
@@ -5495,6 +5494,8 @@ else
54955494
fi
54965495
54975496
5497+
fi
5498+
54985499
54995500
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
55005501
$as_echo_n "checking for ANSI C header files... " >&6; }
@@ -7154,7 +7155,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
71547155
# report actual input values of CONFIG_FILES etc. instead of their
71557156
# values after options handling.
71567157
ac_log="
7157-
This file was extended by glutil $as_me 2.6.6, which was
7158+
This file was extended by glutil $as_me 2.6.7, which was
71587159
generated by GNU Autoconf 2.69. Invocation command line was
71597160
71607161
CONFIG_FILES = $CONFIG_FILES
@@ -7212,7 +7213,7 @@ _ACEOF
72127213
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
72137214
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
72147215
ac_cs_version="\\
7215-
glutil config.status 2.6.6
7216+
glutil config.status 2.6.7
72167217
configured by $0, generated by GNU Autoconf 2.69,
72177218
with options \\"\$ac_cs_config\\"
72187219

configure.ac

+17-14
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
AC_PREREQ(2.63)
22

33

4-
AC_INIT([glutil], [2.6.6], [[email protected]],,[http://glutil.nixnodes.net/])
4+
AC_INIT([glutil], [2.6.7], [[email protected]],,[http://glutil.nixnodes.net/])
55
AC_CONFIG_SRCDIR([src/main.c])
66

77
AM_INIT_AUTOMAKE([subdir-objects silent-rules])
@@ -101,20 +101,11 @@ else
101101
[AC_MSG_NOTICE(compiling for chrooted environment..)])
102102
fi
103103

104-
AM_CONDITIONAL(ENABLE_CHROOT_OWNBIN, test "$glutil_chroot_ownbin" = "yes")
105-
106-
if [ ! test "$host" ]; then
107-
108-
AC_CHECK_FILE( \
109-
["$PWD/src/glconf.h"],, \
110-
AC_CHECK_FILE(["$prefix/bin/sources/glconf.h"], \
111-
[AC_MSG_NOTICE(copying '$prefix/bin/sources/glconf.h' to 'src/' folder..); \
112-
AS_IF([cp "$prefix/bin/sources/glconf.h" "$PWD/src/glconf.h"],, \
113-
[AC_MSG_ERROR([could not copy "$prefix/bin/sources/glconf.h" to "$PWD/src/glconf.h"])]) \
114-
]) \
115-
)
104+
if [ test "$glutil_enable_sbin" = "yes" ]; then
105+
AC_DEFINE([_G_MODE_GFIND])
116106
fi
117107

108+
AM_CONDITIONAL(ENABLE_CHROOT_OWNBIN, test "$glutil_chroot_ownbin" = "yes")
118109

119110
AS_VAR_SET(datadir, ["$prefix/scripts"])
120111

@@ -149,7 +140,19 @@ AC_CHECK_HEADER([fcntl.h],,[AC_MSG_ERROR([$GLUTIL_MSG_REQH (fnctl.h)])])
149140
AC_CHECK_HEADER([limits.h],,[AC_MSG_ERROR([$GLUTIL_MSG_REQH (limits.h)])])
150141
AC_CHECK_HEADER([utime.h],,[AC_MSG_ERROR([$GLUTIL_MSG_REQH (utime.h)])])
151142
AC_CHECK_HEADER([errno.h],,[AC_MSG_ERROR([$GLUTIL_MSG_REQH (errno.h)])])
152-
AC_CHECK_HEADER([$PWD/src/glconf.h],,[AC_MSG_ERROR([$GLUTIL_MSG_REQH (src/glconf.h)])])
143+
144+
if [ ! test "$host" ] && [ test "$glutil_enable_sbin" = "no" ]; then
145+
AC_CHECK_FILE(["$PWD/src/glconf.h"],, \
146+
AC_CHECK_FILE(["$prefix/bin/sources/glconf.h"], \
147+
[AC_MSG_NOTICE(copying '$prefix/bin/sources/glconf.h' to 'src/' folder..); \
148+
AS_IF([cp "$prefix/bin/sources/glconf.h" "$PWD/src/glconf.h"],, \
149+
[AC_MSG_ERROR([could not copy "$prefix/bin/sources/glconf.h" to "$PWD/src/glconf.h"])]) \
150+
]) \
151+
)
152+
153+
AC_CHECK_HEADER([$PWD/src/glconf.h],,[AC_MSG_ERROR([$GLUTIL_MSG_REQH (src/glconf.h)])])
154+
fi
155+
153156

154157
AC_HEADER_STDC
155158

src/glc.h

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
#ifndef GLC_H_
99
#define GLC_H_
1010

11+
#ifndef _G_MODE_GFIND
12+
1113
#include <glconf.h>
1214

15+
#endif
16+
1317
#endif /* GLC_H_ */

src/glutil.h

+4
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@
1010

1111
#include <glc.h>
1212

13+
#ifndef _G_MODE_GFIND
14+
1315
#define DL_SZ sizeof(struct dirlog)
1416
#define NL_SZ sizeof(struct nukelog)
1517
#define DF_SZ sizeof(struct dupefile)
1618
#define LO_SZ sizeof(struct lastonlog)
1719
#define OL_SZ sizeof(struct oneliner)
1820
#define ON_SZ sizeof(struct ONLINE)
1921

22+
#endif
23+
2024
#include <stdint.h>
2125
#include <inttypes.h>
2226

src/misc.c

+8
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,8 @@ build_data_path (char *file, char *path, char *sd)
441441
return ret;
442442
}
443443

444+
#ifndef _G_MODE_GFIND
445+
444446
#include <lref_imdb.h>
445447
#include <lref_tvrage.h>
446448
#include <lref_game.h>
@@ -453,11 +455,15 @@ build_data_path (char *file, char *path, char *sd)
453455
#include <lref_sconf.h>
454456
#include "lref_imdb_old.h"
455457

458+
#endif
459+
456460
int
457461
g_print_info (void)
458462
{
459463
print_version_long (NULL, 0, NULL);
460464
print_str (MSG_NL);
465+
466+
#ifndef _G_MODE_GFIND
461467
print_str (" DATA SRC BLOCK SIZE(B) \n"
462468
"--------------------------\n");
463469
print_str (" DIRLOG %d\t\n", DL_SZ);
@@ -478,6 +484,8 @@ g_print_info (void)
478484
print_str (" GCONF %d\t\n", GC_SZ);
479485
print_str (" SCONF %d\t\n", SC_SZ);
480486
print_str (MSG_NL);
487+
#endif
488+
481489
if (gfl & F_OPT_VERBOSE)
482490
{
483491
print_str (" TYPE SIZE(B) \n"

0 commit comments

Comments
 (0)