Check-in [cff8496e42]
Overview
Comment:Added an optional dependency to libopennet. If libopennet is used fopen_net is used instead of fopen. Made lc_process_file() a publicly callable function. Added a (blank!) man page for it. Made lc_cleanup() a publicly callable function, and removed calls to it from lc_process(). Added a (blank!) man page for it.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: cff8496e42ec2c28e49de382770fdd4faac209ed
User & Date: rkeene on 2004-11-24 23:13:23
Other Links: manifest | tags
Context
2004-11-24
23:40
Updated man pages. Updated Makefile.in to delete new man pages. Updated configure.ac to check for fopen_net() instead of open_net(). check-in: 5eff930a35 user: rkeene tags: trunk
23:13
Added an optional dependency to libopennet. If libopennet is used fopen_net is used instead of fopen. Made lc_process_file() a publicly callable function. Added a (blank!) man page for it. Made lc_cleanup() a publicly callable function, and removed calls to it from lc_process(). Added a (blank!) man page for it. check-in: cff8496e42 user: rkeene tags: trunk
2004-11-23
14:18
Updated build process to correct flags issue. check-in: 5f5c336351 user: rkeene tags: trunk
Changes

Modified INSTALL from [03680221db] to [4e6973ecc2].

1
2
3
4
5
6
7
8
9








Libconfig uses GNU autoconf configure scripts to build and should build on
almost any platform.

Building it should be as easy as:
	$ ./configure
	$ make
	$ make install

(note that `make' must not be BSD make, all other makes work fine.)

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Libconfig uses GNU autoconf configure scripts to build and should build on
almost any platform.

Building it should be as easy as:
	$ ./configure
	$ make
	$ make install

(note that `make' must not be BSD make, all other makes work fine.)


OPTIONAL DEPENDENCIES:
	* libopennet (http://www.rkeene.org/oss/libopennet/)
	  Libopennet allows URLs to be opened as easily as files, if it is
	  available (and the --without-libopennet argument isn't passed to
	  the `configure' script) libconfig will be able to process config
	  files that are passed as URLs.

Modified Makefile.in from [b2690bfed6] to [2f13fb7b2e].

66
67
68
69
70
71
72

73
74
75

76
77
78
	-$(INSTALL) -d $(mandir)/man3
	-$(INSTALL) -d $(libdir)
	-$(INSTALL) -d $(includedir)
	$(INSTALL) -m 755 libconfig.$(SHOBJEXT) $(libdir)/libconfig.$(SHOBJEXT).$(PKGVERS)
	$(INSTALL) -m 644 libconfig.$(AREXT) $(libdir)/libconfig.$(AREXT)
	$(INSTALL) -m 644 lc_register_callback.3 $(mandir)/man3/lc_register_callback.3
	$(INSTALL) -m 644 lc_register_var.3 $(mandir)/man3/lc_register_var.3

	$(INSTALL) -m 644 lc_geterrstr.3 $(mandir)/man3/lc_geterrstr.3
	$(INSTALL) -m 644 lc_geterrno.3 $(mandir)/man3/lc_geterrno.3
	$(INSTALL) -m 644 lc_process.3 $(mandir)/man3/lc_process.3

	$(INSTALL) -m 644 libconfig.h $(includedir)/libconfig.h
	-( cd $(libdir) && rm -f libconfig.$(SHOBJEXT).$(PKGVERSMAJOR) && $(LN_S) libconfig.$(SHOBJEXT).$(PKGVERS) libconfig.$(SHOBJEXT).$(PKGVERSMAJOR) )
	-( cd $(libdir) && rm -f libconfig.$(SHOBJEXT) && $(LN_S) libconfig.$(SHOBJEXT).$(PKGVERS) libconfig.$(SHOBJEXT) )







>



>



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
	-$(INSTALL) -d $(mandir)/man3
	-$(INSTALL) -d $(libdir)
	-$(INSTALL) -d $(includedir)
	$(INSTALL) -m 755 libconfig.$(SHOBJEXT) $(libdir)/libconfig.$(SHOBJEXT).$(PKGVERS)
	$(INSTALL) -m 644 libconfig.$(AREXT) $(libdir)/libconfig.$(AREXT)
	$(INSTALL) -m 644 lc_register_callback.3 $(mandir)/man3/lc_register_callback.3
	$(INSTALL) -m 644 lc_register_var.3 $(mandir)/man3/lc_register_var.3
	$(INSTALL) -m 644 lc_process_file.3 $(mandir)/man3/lc_process_file.3
	$(INSTALL) -m 644 lc_geterrstr.3 $(mandir)/man3/lc_geterrstr.3
	$(INSTALL) -m 644 lc_geterrno.3 $(mandir)/man3/lc_geterrno.3
	$(INSTALL) -m 644 lc_process.3 $(mandir)/man3/lc_process.3
	$(INSTALL) -m 644 lc_cleanup.3 $(mandir)/man3/lc_cleanup.3
	$(INSTALL) -m 644 libconfig.h $(includedir)/libconfig.h
	-( cd $(libdir) && rm -f libconfig.$(SHOBJEXT).$(PKGVERSMAJOR) && $(LN_S) libconfig.$(SHOBJEXT).$(PKGVERS) libconfig.$(SHOBJEXT).$(PKGVERSMAJOR) )
	-( cd $(libdir) && rm -f libconfig.$(SHOBJEXT) && $(LN_S) libconfig.$(SHOBJEXT).$(PKGVERS) libconfig.$(SHOBJEXT) )

Modified aclocal.m4 from [7edf533cc2] to [311881ed54].

111
112
113
114
115
116
117






























































                        SHOBJEXT="dll"
                        SHOBJFLAGS="-mno-cygwin -mms-bitfields -DPIC"
                        SHOBJLDFLAGS='-shared -Wl,--enable-auto-image-base -Wl,--output-def,$[@].def,--out-implib,$[@].a'
                        ;;
	esac
])






































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
                        SHOBJEXT="dll"
                        SHOBJFLAGS="-mno-cygwin -mms-bitfields -DPIC"
                        SHOBJLDFLAGS='-shared -Wl,--enable-auto-image-base -Wl,--output-def,$[@].def,--out-implib,$[@].a'
                        ;;
	esac
])


AC_DEFUN(DC_ASK_OPTLIB, [
  AC_ARG_WITH($5, [  --with-$5 $4], [
# Specified
    LIBSPEC=$withval
  ], [
# Not specified
    LIBSPECFLAGS=`pkg-config --libs $5 2>/dev/null`
    LIBSPECCFLAGS=`pkg-config --cflags $5 2>/dev/null`
    AC_CHECK_LIB($1, $2, [
      OLDCPPFLAGS="$CPPFLAGS"
      OLDCFLAGS="$CFLAGS"
      CPPFLAGS="$CPPFLAGS $LIBSPECCFLAGS"
      CFLAGS="$CFLAGS $LIBSPECCFLAGS"
      AC_CHECK_HEADER($3, [
        LIBSPEC=yes
      ], [
        LIBSPEC=no
      ])
      CPPFLAGS="$OLDCPPFLAGS"
      CFLAGS="$OLDCFLAGS"
    ], [
      LIBSPEC=no
      AC_MSG_WARN(Didn't find $5)
    ], $LIBSPECFLAGS)
  ])
  case $LIBSPEC in
  	no)
  		AC_MSG_WARN(Support for $5 disabled)
  		;;
  	*)
  		if test "${LIBSPEC}" = "yes"; then
			true
		else
			LIBSPECFLAGS="-L${LIBSPEC}/lib ${LIBSPECFLAGS}"
			LIBSPECCFLAGS="-I${LIBSPEC}/include ${LIBSPECCFLAGS}"
  		fi
		AC_CHECK_LIB($1, $2, [
		  OLDCFLAGS="$CFLAGS"
		  OLDCPPFLAGS="$CPPFLAGS"
		  CPPFLAGS="$CPPFLAGS ${LIBSPECCFLAGS}"
		  CFLAGS="$CFLAGS ${LIBSPECCFLAGS}"
  		  AC_CHECK_HEADER($3, [
		    if test -n "$7"; then
		      AC_DEFINE($7, [1], [Define to 1 if you have the <$3> header file.])
		    fi
		    if test -n "$6"; then
		      AC_DEFINE($6, [1], [Define to 1 if you have $2 from $5])
		    fi
		    LDFLAGS="$LDFLAGS $LIBSPECFLAGS"
		    LIBS="$LIBS -l$1"
		  ], [
		    CFLAGS="$OLDCFLAGS"
		    CPPFLAGS="$OLDCPPFLAGS"
		    AC_MSG_ERROR(Could not find $3)
		  ])
		], [
		  AC_MSG_ERROR(Could not find $5)
		], $LIBSPECFLAGS)
  		;;
  esac
])

Modified compat.h from [309b8b282c] to [cd6e5c8c4f].

75
76
77
78
79
80
81









82
83
#else
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif
#endif










#endif







>
>
>
>
>
>
>
>
>


75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#else
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif
#endif

#ifdef HAVE_OPENNET_H
#include <opennet.h>
#endif
#ifdef HAVE_LIBOPENNET
#define lc_fopen(path, mode) fopen_net(path, mode)
#else
#define lc_fopen(path, mode) fopen(path, mode)
#endif

#endif

Modified conf_apache.c from [1a96ee97b6] to [cd77d73d2e].

98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
	}

	if (configfile == NULL) {
		lc_errno = LC_ERR_INVDATA;
		return(-1);
	}

	configfp = fopen(configfile, "r");

	if (configfp == NULL) {
		lc_errno = LC_ERR_CANTOPEN;
		return(-1);
	}

	while (1) {







|







98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
	}

	if (configfile == NULL) {
		lc_errno = LC_ERR_INVDATA;
		return(-1);
	}

	configfp = lc_fopen(configfile, "r");

	if (configfp == NULL) {
		lc_errno = LC_ERR_CANTOPEN;
		return(-1);
	}

	while (1) {

Modified conf_section.c from [719f9fb6ad] to [f6fa72ff6b].

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
	lc_err_t save_lc_errno = LC_ERR_NONE;

	if (appname == NULL || configfile == NULL) {
		lc_errno = LC_ERR_INVDATA;
		return(-1);
	}

	configfp = fopen(configfile, "r");

	if (configfp == NULL) {
		lc_errno = LC_ERR_CANTOPEN;
		return(-1);
	}

	while (1) {







|







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
	lc_err_t save_lc_errno = LC_ERR_NONE;

	if (appname == NULL || configfile == NULL) {
		lc_errno = LC_ERR_INVDATA;
		return(-1);
	}

	configfp = lc_fopen(configfile, "r");

	if (configfp == NULL) {
		lc_errno = LC_ERR_CANTOPEN;
		return(-1);
	}

	while (1) {

Modified conf_space.c from [4b812787ea] to [22b1310a4a].

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
	lc_err_t save_lc_errno = LC_ERR_NONE;

	if (appname == NULL || configfile == NULL) {
		lc_errno = LC_ERR_INVDATA;
		return(-1);
	}

	configfp = fopen(configfile, "r");

	if (configfp == NULL) {
		lc_errno = LC_ERR_CANTOPEN;
		return(-1);
	}

	while (1) {







|







21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
	lc_err_t save_lc_errno = LC_ERR_NONE;

	if (appname == NULL || configfile == NULL) {
		lc_errno = LC_ERR_INVDATA;
		return(-1);
	}

	configfp = lc_fopen(configfile, "r");

	if (configfp == NULL) {
		lc_errno = LC_ERR_CANTOPEN;
		return(-1);
	}

	while (1) {

Modified config.h.in from [3d89d8d8f7] to [f405f5e957].

1
2
3
4
5
6
7
8
9
10
11
12
13



14
15
16



17
18
19
20
21
22
23
/* config.h.in.  Generated from configure.in by autoheader.  */

/* Define to 1 if you have the <ctype.h> header file. */
#undef HAVE_CTYPE_H

/* Define to 1 if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H

/* Define to 1 if you have the `getpwuid' function. */
#undef HAVE_GETPWUID

/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H




/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H




/* Define to 1 if you have the <pwd.h> header file. */
#undef HAVE_PWD_H

/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H

|












>
>
>



>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* config.h.in.  Generated from configure.ac by autoheader.  */

/* Define to 1 if you have the <ctype.h> header file. */
#undef HAVE_CTYPE_H

/* Define to 1 if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H

/* Define to 1 if you have the `getpwuid' function. */
#undef HAVE_GETPWUID

/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H

/* Define to 1 if you have open_net from libopennet */
#undef HAVE_LIBOPENNET

/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H

/* Define to 1 if you have the <opennet.h> header file. */
#undef HAVE_OPENNET_H

/* Define to 1 if you have the <pwd.h> header file. */
#undef HAVE_PWD_H

/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H

Modified configure from [ede94350f1] to [306d8f9a52].

1
2
3
4
5
6
7
8
9
10
11
#! /bin/sh
# From configure.in Revision .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for libconfig 0.1.4.
#
# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
## M4sh Initialization.  ##
## --------------------- ##

|

|







1
2
3
4
5
6
7
8
9
10
11
#! /bin/sh
# From configure.ac Revision .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for libconfig 0.1.5.
#
# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
## M4sh Initialization.  ##
## --------------------- ##
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# This variable seems obsolete.  It should probably be removed, and
# only ac_max_sed_lines should be used.
: ${ac_max_here_lines=38}

# Identity of this package.
PACKAGE_NAME='libconfig'
PACKAGE_TARNAME='libconfig'
PACKAGE_VERSION='0.1.4'
PACKAGE_STRING='libconfig 0.1.4'
PACKAGE_BUGREPORT=''

# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#if HAVE_SYS_TYPES_H
# include <sys/types.h>







|
|







264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# This variable seems obsolete.  It should probably be removed, and
# only ac_max_sed_lines should be used.
: ${ac_max_here_lines=38}

# Identity of this package.
PACKAGE_NAME='libconfig'
PACKAGE_TARNAME='libconfig'
PACKAGE_VERSION='0.1.5'
PACKAGE_STRING='libconfig 0.1.5'
PACKAGE_BUGREPORT=''

# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # Omit some internal or obsolete options to make the list less imposing.
  # This message is too long to be a string in the A/UX 3.1 sh.
  cat <<_ACEOF
\`configure' configures libconfig 0.1.4 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.







|







774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # Omit some internal or obsolete options to make the list less imposing.
  # This message is too long to be a string in the A/UX 3.1 sh.
  cat <<_ACEOF
\`configure' configures libconfig 0.1.5 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.
835
836
837
838
839
840
841
842
843
844
845





846
847
848
849
850
851
852
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
_ACEOF
fi

if test -n "$ac_init_help"; then
  case $ac_init_help in
     short | recursive ) echo "Configuration of libconfig 0.1.4:";;
   esac
  cat <<\_ACEOF






Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
              headers in a nonstandard directory <include dir>







|



>
>
>
>
>







835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
_ACEOF
fi

if test -n "$ac_init_help"; then
  case $ac_init_help in
     short | recursive ) echo "Configuration of libconfig 0.1.5:";;
   esac
  cat <<\_ACEOF

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-libopennet       Enable opennet support

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
              headers in a nonstandard directory <include dir>
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
    cd $ac_popdir
  done
fi

test -n "$ac_init_help" && exit 0
if $ac_init_version; then
  cat <<\_ACEOF
libconfig configure 0.1.4
generated by GNU Autoconf 2.59

Copyright (C) 2003 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
  exit 0
fi
exec 5>config.log
cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by libconfig $as_me 0.1.4, which was
generated by GNU Autoconf 2.59.  Invocation command line was

  $ $0 $@

_ACEOF
{
cat <<_ASUNAME







|













|







951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
    cd $ac_popdir
  done
fi

test -n "$ac_init_help" && exit 0
if $ac_init_version; then
  cat <<\_ACEOF
libconfig configure 0.1.5
generated by GNU Autoconf 2.59

Copyright (C) 2003 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
  exit 0
fi
exec 5>config.log
cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by libconfig $as_me 0.1.5, which was
generated by GNU Autoconf 2.59.  Invocation command line was

  $ $0 $@

_ACEOF
{
cat <<_ASUNAME
15650
15651
15652
15653
15654
15655
15656



























































































































































































































































































































































































































































































































15657
15658
15659
15660
15661
15662
15663

fi
done
































































































































































































































































































































































































































































































































for ac_header in windows.h windowsx.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175

fi
done




# Check whether --with-libopennet or --without-libopennet was given.
if test "${with_libopennet+set}" = set; then
  withval="$with_libopennet"

# Specified
    LIBSPEC=$withval

else

# Not specified
    LIBSPECFLAGS=`pkg-config --libs libopennet 2>/dev/null`
    LIBSPECCFLAGS=`pkg-config --cflags libopennet 2>/dev/null`
    echo "$as_me:$LINENO: checking for open_net in -lopennet" >&5
echo $ECHO_N "checking for open_net in -lopennet... $ECHO_C" >&6
if test "${ac_cv_lib_opennet_open_net+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lopennet $LIBSPECFLAGS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char open_net ();
int
main ()
{
open_net ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_opennet_open_net=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_lib_opennet_open_net=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_opennet_open_net" >&5
echo "${ECHO_T}$ac_cv_lib_opennet_open_net" >&6
if test $ac_cv_lib_opennet_open_net = yes; then

      OLDCPPFLAGS="$CPPFLAGS"
      OLDCFLAGS="$CFLAGS"
      CPPFLAGS="$CPPFLAGS $LIBSPECCFLAGS"
      CFLAGS="$CFLAGS $LIBSPECCFLAGS"
      if test "${ac_cv_header_opennet_h+set}" = set; then
  echo "$as_me:$LINENO: checking for opennet.h" >&5
echo $ECHO_N "checking for opennet.h... $ECHO_C" >&6
if test "${ac_cv_header_opennet_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
echo "$as_me:$LINENO: result: $ac_cv_header_opennet_h" >&5
echo "${ECHO_T}$ac_cv_header_opennet_h" >&6
else
  # Is the header compilable?
echo "$as_me:$LINENO: checking opennet.h usability" >&5
echo $ECHO_N "checking opennet.h usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <opennet.h>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6

# Is the header present?
echo "$as_me:$LINENO: checking opennet.h presence" >&5
echo $ECHO_N "checking opennet.h presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <opennet.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: opennet.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: opennet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: opennet.h: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: opennet.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: opennet.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: opennet.h: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: opennet.h:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: opennet.h:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: opennet.h: see the Autoconf documentation" >&5
echo "$as_me: WARNING: opennet.h: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: opennet.h:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: opennet.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: opennet.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: opennet.h: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: opennet.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: opennet.h: in the future, the compiler will take precedence" >&2;}
    (
      cat <<\_ASBOX
## ------------------------------------ ##
## Report this to the libconfig lists.  ##
## ------------------------------------ ##
_ASBOX
    ) |
      sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
echo "$as_me:$LINENO: checking for opennet.h" >&5
echo $ECHO_N "checking for opennet.h... $ECHO_C" >&6
if test "${ac_cv_header_opennet_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_opennet_h=$ac_header_preproc
fi
echo "$as_me:$LINENO: result: $ac_cv_header_opennet_h" >&5
echo "${ECHO_T}$ac_cv_header_opennet_h" >&6

fi
if test $ac_cv_header_opennet_h = yes; then

        LIBSPEC=yes

else

        LIBSPEC=no

fi


      CPPFLAGS="$OLDCPPFLAGS"
      CFLAGS="$OLDCFLAGS"

else

      LIBSPEC=no
      { echo "$as_me:$LINENO: WARNING: Didn't find libopennet" >&5
echo "$as_me: WARNING: Didn't find libopennet" >&2;}

fi


fi;
  case $LIBSPEC in
  	no)
  		{ echo "$as_me:$LINENO: WARNING: Support for libopennet disabled" >&5
echo "$as_me: WARNING: Support for libopennet disabled" >&2;}
  		;;
  	*)
  		if test "${LIBSPEC}" = "yes"; then
			true
		else
			LIBSPECFLAGS="-L${LIBSPEC}/lib ${LIBSPECFLAGS}"
			LIBSPECCFLAGS="-I${LIBSPEC}/include ${LIBSPECCFLAGS}"
  		fi
		echo "$as_me:$LINENO: checking for open_net in -lopennet" >&5
echo $ECHO_N "checking for open_net in -lopennet... $ECHO_C" >&6
if test "${ac_cv_lib_opennet_open_net+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lopennet $LIBSPECFLAGS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char open_net ();
int
main ()
{
open_net ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_opennet_open_net=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_lib_opennet_open_net=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_opennet_open_net" >&5
echo "${ECHO_T}$ac_cv_lib_opennet_open_net" >&6
if test $ac_cv_lib_opennet_open_net = yes; then

		  OLDCFLAGS="$CFLAGS"
		  OLDCPPFLAGS="$CPPFLAGS"
		  CPPFLAGS="$CPPFLAGS ${LIBSPECCFLAGS}"
		  CFLAGS="$CFLAGS ${LIBSPECCFLAGS}"
  		  if test "${ac_cv_header_opennet_h+set}" = set; then
  echo "$as_me:$LINENO: checking for opennet.h" >&5
echo $ECHO_N "checking for opennet.h... $ECHO_C" >&6
if test "${ac_cv_header_opennet_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
echo "$as_me:$LINENO: result: $ac_cv_header_opennet_h" >&5
echo "${ECHO_T}$ac_cv_header_opennet_h" >&6
else
  # Is the header compilable?
echo "$as_me:$LINENO: checking opennet.h usability" >&5
echo $ECHO_N "checking opennet.h usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <opennet.h>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6

# Is the header present?
echo "$as_me:$LINENO: checking opennet.h presence" >&5
echo $ECHO_N "checking opennet.h presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <opennet.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: opennet.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: opennet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: opennet.h: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: opennet.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: opennet.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: opennet.h: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: opennet.h:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: opennet.h:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: opennet.h: see the Autoconf documentation" >&5
echo "$as_me: WARNING: opennet.h: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: opennet.h:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: opennet.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: opennet.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: opennet.h: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: opennet.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: opennet.h: in the future, the compiler will take precedence" >&2;}
    (
      cat <<\_ASBOX
## ------------------------------------ ##
## Report this to the libconfig lists.  ##
## ------------------------------------ ##
_ASBOX
    ) |
      sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
echo "$as_me:$LINENO: checking for opennet.h" >&5
echo $ECHO_N "checking for opennet.h... $ECHO_C" >&6
if test "${ac_cv_header_opennet_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_opennet_h=$ac_header_preproc
fi
echo "$as_me:$LINENO: result: $ac_cv_header_opennet_h" >&5
echo "${ECHO_T}$ac_cv_header_opennet_h" >&6

fi
if test $ac_cv_header_opennet_h = yes; then

		    if test -n "HAVE_OPENNET_H"; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_OPENNET_H 1
_ACEOF

		    fi
		    if test -n "HAVE_LIBOPENNET"; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBOPENNET 1
_ACEOF

		    fi
		    LDFLAGS="$LDFLAGS $LIBSPECFLAGS"
		    LIBS="$LIBS -lopennet"

else

		    CFLAGS="$OLDCFLAGS"
		    CPPFLAGS="$OLDCPPFLAGS"
		    { { echo "$as_me:$LINENO: error: Could not find opennet.h" >&5
echo "$as_me: error: Could not find opennet.h" >&2;}
   { (exit 1); exit 1; }; }

fi



else

		  { { echo "$as_me:$LINENO: error: Could not find libopennet" >&5
echo "$as_me: error: Could not find libopennet" >&2;}
   { (exit 1); exit 1; }; }

fi

  		;;
  esac





for ac_header in windows.h windowsx.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
    SHLIBOBJS="$SHLIBOBJS `echo $obj | sed 's/\.o$/_shr.o/g'`"
  done

  echo "$as_me:$LINENO: result: $SHOBJLDFLAGS $SHOBJFLAGS" >&5
echo "${ECHO_T}$SHOBJLDFLAGS $SHOBJFLAGS" >&6


                                                                      ac_config_files="$ac_config_files Makefile lc_geterrno.3 lc_process.3 lc_register_var.3 lc_geterrstr.3 lc_register_callback.3 libconfig.3"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs, see configure's option --config-cache.
# It is not useful on other systems.  If it contains results you don't
# want to keep, you may remove or edit it.
#







|







16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
    SHLIBOBJS="$SHLIBOBJS `echo $obj | sed 's/\.o$/_shr.o/g'`"
  done

  echo "$as_me:$LINENO: result: $SHOBJLDFLAGS $SHOBJFLAGS" >&5
echo "${ECHO_T}$SHOBJLDFLAGS $SHOBJFLAGS" >&6


                                                                                          ac_config_files="$ac_config_files Makefile lc_geterrno.3 lc_process.3 lc_register_var.3 lc_geterrstr.3 lc_register_callback.3 lc_cleanup.3 lc_process_file.3 libconfig.3"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs, see configure's option --config-cache.
# It is not useful on other systems.  If it contains results you don't
# want to keep, you may remove or edit it.
#
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
  echo
  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
} >&5
cat >&5 <<_CSEOF

This file was extended by libconfig $as_me 0.1.4, which was
generated by GNU Autoconf 2.59.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@







|







17205
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218
17219
  echo
  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
} >&5
cat >&5 <<_CSEOF

This file was extended by libconfig $as_me 0.1.5, which was
generated by GNU Autoconf 2.59.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
$config_headers

Report bugs to <bug-autoconf@gnu.org>."
_ACEOF

cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
libconfig config.status 0.1.4
configured by $0, generated by GNU Autoconf 2.59,
  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"

Copyright (C) 2003 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
srcdir=$srcdir







|







17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
$config_headers

Report bugs to <bug-autoconf@gnu.org>."
_ACEOF

cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
libconfig config.status 0.1.5
configured by $0, generated by GNU Autoconf 2.59,
  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"

Copyright (C) 2003 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
srcdir=$srcdir
16862
16863
16864
16865
16866
16867
16868


16869
16870
16871
16872
16873
16874
16875
  # Handling of arguments.
  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
  "lc_geterrno.3" ) CONFIG_FILES="$CONFIG_FILES lc_geterrno.3" ;;
  "lc_process.3" ) CONFIG_FILES="$CONFIG_FILES lc_process.3" ;;
  "lc_register_var.3" ) CONFIG_FILES="$CONFIG_FILES lc_register_var.3" ;;
  "lc_geterrstr.3" ) CONFIG_FILES="$CONFIG_FILES lc_geterrstr.3" ;;
  "lc_register_callback.3" ) CONFIG_FILES="$CONFIG_FILES lc_register_callback.3" ;;


  "libconfig.3" ) CONFIG_FILES="$CONFIG_FILES libconfig.3" ;;
  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
   { (exit 1); exit 1; }; };;
  esac
done







>
>







17374
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
  # Handling of arguments.
  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
  "lc_geterrno.3" ) CONFIG_FILES="$CONFIG_FILES lc_geterrno.3" ;;
  "lc_process.3" ) CONFIG_FILES="$CONFIG_FILES lc_process.3" ;;
  "lc_register_var.3" ) CONFIG_FILES="$CONFIG_FILES lc_register_var.3" ;;
  "lc_geterrstr.3" ) CONFIG_FILES="$CONFIG_FILES lc_geterrstr.3" ;;
  "lc_register_callback.3" ) CONFIG_FILES="$CONFIG_FILES lc_register_callback.3" ;;
  "lc_cleanup.3" ) CONFIG_FILES="$CONFIG_FILES lc_cleanup.3" ;;
  "lc_process_file.3" ) CONFIG_FILES="$CONFIG_FILES lc_process_file.3" ;;
  "libconfig.3" ) CONFIG_FILES="$CONFIG_FILES libconfig.3" ;;
  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
   { (exit 1); exit 1; }; };;
  esac
done

Renamed and modified configure.in [62eea980f5] to configure.ac [298ad28fdd].

1
2
3
4
5
6
7
8
9
AC_REVISION($Revision $)
AC_INIT(libconfig, 0.1.4)
AC_CONFIG_HEADER(config.h)

dnl Find out about the host OS
DC_CHK_OS_INFO

dnl Checks for programs.
AC_PROG_CC

|







1
2
3
4
5
6
7
8
9
AC_REVISION($Revision $)
AC_INIT(libconfig, 0.1.5)
AC_CONFIG_HEADER(config.h)

dnl Find out about the host OS
DC_CHK_OS_INFO

dnl Checks for programs.
AC_PROG_CC
23
24
25
26
27
28
29


30
31
32
33
34
35
36
DC_DO_TYPE(int32_t, signed, 4)
DC_DO_TYPE(uint16_t, unsigned, 2)
DC_DO_TYPE(int16_t, signed, 2)

AC_REPLACE_FUNCS(strsep strtoll)
AC_CHECK_FUNCS(getpwuid)



dnl Checks for Win32 specific things.
DC_DO_WIN32

dnl This must be last.
DC_GET_SHOBJFLAGS

AC_OUTPUT(Makefile lc_geterrno.3 lc_process.3 lc_register_var.3 lc_geterrstr.3 lc_register_callback.3 libconfig.3)







>
>






|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
DC_DO_TYPE(int32_t, signed, 4)
DC_DO_TYPE(uint16_t, unsigned, 2)
DC_DO_TYPE(int16_t, signed, 2)

AC_REPLACE_FUNCS(strsep strtoll)
AC_CHECK_FUNCS(getpwuid)

DC_ASK_OPTLIB(opennet, open_net, opennet.h, [      Enable opennet support], libopennet, HAVE_LIBOPENNET, HAVE_OPENNET_H)

dnl Checks for Win32 specific things.
DC_DO_WIN32

dnl This must be last.
DC_GET_SHOBJFLAGS

AC_OUTPUT(Makefile lc_geterrno.3 lc_process.3 lc_register_var.3 lc_geterrstr.3 lc_register_callback.3 lc_cleanup.3 lc_process_file.3 libconfig.3)

Added lc_cleanup.3.in version [da39a3ee5e].

Modified lc_geterrno.3.in from [d002dd6251] to [f1a44ec899].

81
82
83
84
85
86
87


88
}
.fi

.SH "SEE ALSO"
.BR lc_register_var (3),
.BR lc_register_callback (3),
.BR lc_geterrstr (3),


.BR lc_process (3)







>
>

81
82
83
84
85
86
87
88
89
90
}
.fi

.SH "SEE ALSO"
.BR lc_register_var (3),
.BR lc_register_callback (3),
.BR lc_geterrstr (3),
.BR lc_cleanup (3),
.BR lc_process_file (3),
.BR lc_process (3)

Modified lc_geterrstr.3.in from [5494e928ad] to [1700112ee5].

49
50
51
52
53
54
55


56
}
.fi

.SH "SEE ALSO"
.BR lc_register_var (3),
.BR lc_register_callback (3),
.BR lc_geterrno (3),


.BR lc_process (3)







>
>

49
50
51
52
53
54
55
56
57
58
}
.fi

.SH "SEE ALSO"
.BR lc_register_var (3),
.BR lc_register_callback (3),
.BR lc_geterrno (3),
.BR lc_cleanup (3),
.BR lc_process_file (3),
.BR lc_process (3)

Modified lc_process.3.in from [967a4267e5] to [14e5602803].

51
52
53
54
55
56
57
58


}
.fi

.SH "SEE ALSO"
.BR lc_register_var (3),
.BR lc_register_callback (3),
.BR lc_geterrno (3),
.BR lc_geterrstr (3)









|
>
>
51
52
53
54
55
56
57
58
59
60
}
.fi

.SH "SEE ALSO"
.BR lc_register_var (3),
.BR lc_register_callback (3),
.BR lc_geterrno (3),
.BR lc_geterrstr (3),
.BR lc_cleanup (3),
.BR lc_process_file (3)

Added lc_process_file.3.in version [da39a3ee5e].

Modified lc_register_callback.3.in from [0102cb6d66] to [91e00aa66a].

221
222
223
224
225
226
227


228
.B ENOMEM
Memory could not be allocated to create the needed internal structures.

.SH "SEE ALSO"
.BR lc_register_var (3),
.BR lc_geterrno (3),
.BR lc_geterrstr (3),


.BR lc_process (3)







>
>

221
222
223
224
225
226
227
228
229
230
.B ENOMEM
Memory could not be allocated to create the needed internal structures.

.SH "SEE ALSO"
.BR lc_register_var (3),
.BR lc_geterrno (3),
.BR lc_geterrstr (3),
.BR lc_cleanup (3),
.BR lc_process_file (3),
.BR lc_process (3)

Modified lc_register_var.3.in from [ed1d29b572] to [aade6a66d6].

139
140
141
142
143
144
145


146
}
.fi

.SH "SEE ALSO"
.BR lc_register_callback (3),
.BR lc_geterrno (3),
.BR lc_geterrstr (3),


.BR lc_process (3)







>
>

139
140
141
142
143
144
145
146
147
148
}
.fi

.SH "SEE ALSO"
.BR lc_register_callback (3),
.BR lc_geterrno (3),
.BR lc_geterrstr (3),
.BR lc_cleanup (3),
.BR lc_process_file (3),
.BR lc_process (3)

Modified libconfig.3.in from [97c0ede48a] to [70716a9252].

18
19
20
21
22
23
24


25
26
27
28



29
30
31
32
33
34
35
.SH DESCRIPTION
Libconfig is a library to provide easy access to configuration data in a consistent and logical manner.  Variables (registered through
.BR lc_register_var (3)
or
.BR lc_register_callback (3))
are processed with the
.BR lc_process (3)


function.  Errors can be examined through
.BR lc_geterrno (3)
and
.BR lc_geterrstr (3).




.SH EXAMPLE
.nf
#include <libconfig.h>
#include <stdlib.h>
#include <stdio.h>








>
>
|



>
>
>







18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
.SH DESCRIPTION
Libconfig is a library to provide easy access to configuration data in a consistent and logical manner.  Variables (registered through
.BR lc_register_var (3)
or
.BR lc_register_callback (3))
are processed with the
.BR lc_process (3)
and
.BR lc_process_file (3)
functions.  Errors can be examined through
.BR lc_geterrno (3)
and
.BR lc_geterrstr (3).
Clean-up may be performed using the
.BR lc_cleanup (3)
function.

.SH EXAMPLE
.nf
#include <libconfig.h>
#include <stdlib.h>
#include <stdio.h>

44
45
46
47
48
49
50


51
52
53
54
55
56
57
		fprintf(stderr, "Error registering variable: %i.\\n",
		        lc_geterrno());
		return(EXIT_FAILURE);
	}

	lc_p_ret = lc_process(argc, argv, "example", LC_CONF_APACHE,
	                      NULL);


	if (lc_p_ret != 0) {
		fprintf(stderr, "Error processing configuration: \\
		        %s\\n", lc_geterrstr());
		return(EXIT_FAILURE);
	}

	if (filename != NULL) {







>
>







49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
		fprintf(stderr, "Error registering variable: %i.\\n",
		        lc_geterrno());
		return(EXIT_FAILURE);
	}

	lc_p_ret = lc_process(argc, argv, "example", LC_CONF_APACHE,
	                      NULL);
	lc_cleanup();

	if (lc_p_ret != 0) {
		fprintf(stderr, "Error processing configuration: \\
		        %s\\n", lc_geterrstr());
		return(EXIT_FAILURE);
	}

	if (filename != NULL) {
65
66
67
68
69
70
71

72

.fi

.SH "SEE ALSO"
.BR lc_register_var (3),
.BR lc_register_callback (3),
.BR lc_geterr (3),
.BR lc_geterrstr (3),

.BR lc_process (3)








>
|
>
72
73
74
75
76
77
78
79
80
81
.fi

.SH "SEE ALSO"
.BR lc_register_var (3),
.BR lc_register_callback (3),
.BR lc_geterr (3),
.BR lc_geterrstr (3),
.BR lc_cleanup (3),
.BR lc_process (3),
.BR lc_process_file (3)

Modified libconfig.c from [65d4398d3f] to [8802ab0d93].

757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
	newhandler->_next = varhandlers;

	varhandlers = newhandler;

	return(0);
}

static int lc_process_file(const char *appname, const char *pathname, lc_conf_type_t type) {
	int chkretval = 0;

	switch (type) {
		case LC_CONF_SECTION:
			chkretval = lc_process_conf_section(appname, pathname);
			break;
		case LC_CONF_APACHE:







|







757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
	newhandler->_next = varhandlers;

	varhandlers = newhandler;

	return(0);
}

int lc_process_file(const char *appname, const char *pathname, lc_conf_type_t type) {
	int chkretval = 0;

	switch (type) {
		case LC_CONF_SECTION:
			chkretval = lc_process_conf_section(appname, pathname);
			break;
		case LC_CONF_APACHE:
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
			}
		}
	}

	return(retval);
}

static void lc_cleanup(void) {
	struct lc_varhandler_st *handler = NULL, *next = NULL;

	handler = varhandlers;
	while (handler != NULL) {
		if (handler->var != NULL) {
			free(handler->var);
		}







|







850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
			}
		}
	}

	return(retval);
}

void lc_cleanup(void) {
	struct lc_varhandler_st *handler = NULL, *next = NULL;

	handler = varhandlers;
	while (handler != NULL) {
		if (handler->var != NULL) {
			free(handler->var);
		}
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906

	/* Handle command line arguments */
	chkretval = lc_process_cmdline(argc, argv);
	if (chkretval < 0) {
		retval = -1;
	}

	/* Free our structures. */
	lc_cleanup();

	return(retval);
}


lc_err_t lc_geterrno(void) {
	lc_err_t retval;








<
<
<







890
891
892
893
894
895
896



897
898
899
900
901
902
903

	/* Handle command line arguments */
	chkretval = lc_process_cmdline(argc, argv);
	if (chkretval < 0) {
		retval = -1;
	}




	return(retval);
}


lc_err_t lc_geterrno(void) {
	lc_err_t retval;

Modified libconfig.h.in from [f10199222d] to [1f64289873].

69
70
71
72
73
74
75


76
77
78
79
80
81
82
__BLANK_LINE__

int lc_process(int argc, char **argv, const char *appname, lc_conf_type_t type, const char *extra);
int lc_register_callback(const char *var, char opt, lc_var_type_t type, int (*callback)(const char *, const char *, const char *, const char *, lc_flags_t, void *), void *extra);
int lc_register_var(const char *var, lc_var_type_t type, void *data, char opt);
lc_err_t lc_geterrno(void);
char *lc_geterrstr(void);



__BLANK_LINE__

!define LC_CBRET_IGNORESECTION (255)
!define LC_CBRET_OKAY (0)
!define LC_CBRET_ERROR (-1)








>
>







69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
__BLANK_LINE__

int lc_process(int argc, char **argv, const char *appname, lc_conf_type_t type, const char *extra);
int lc_register_callback(const char *var, char opt, lc_var_type_t type, int (*callback)(const char *, const char *, const char *, const char *, lc_flags_t, void *), void *extra);
int lc_register_var(const char *var, lc_var_type_t type, void *data, char opt);
lc_err_t lc_geterrno(void);
char *lc_geterrstr(void);
int lc_process_file(const char *appname, const char *pathname, lc_conf_type_t type);
void lc_cleanup(void);

__BLANK_LINE__

!define LC_CBRET_IGNORESECTION (255)
!define LC_CBRET_OKAY (0)
!define LC_CBRET_ERROR (-1)

Modified test-lc.c from [0d1d1a962e] to [5bdc823df0].

44
45
46
47
48
49
50

51

52
53
54
55
56
57
58
	lc_register_var("bob", LC_VAR_SIZE_SIZE_T, &xval, 's');
	lc_register_var("Somesection.Free", LC_VAR_BOOL, &onoff, 0);
	lc_register_var("long", LC_VAR_BOOL_BY_EXISTANCE, &onoff2, 'l');
	lc_register_var("ipaddr", LC_VAR_IP, &ipaddr, 'i');
	lc_register_callback("sally", 0, LC_VAR_STRING, sally_cmd, NULL);
	lc_register_callback("HELP", 'h', LC_VAR_NONE, help_cmd, NULL);
	lc_register_callback("*.ifmodule", 0, LC_VAR_NONE, cmd_ifmodule, NULL);

	lcpret = lc_process(argc, argv, "testapp", LC_CONF_APACHE, "test.cfg");

	if (lcpret < 0) {
		fprintf(stderr, "Error processing config file: %s\n", lc_geterrstr());
		return(EXIT_FAILURE);
	}

	if (joeval != NULL) {
		fprintf(stderr, "joeval = \"%s\"\n", joeval);







>

>







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
	lc_register_var("bob", LC_VAR_SIZE_SIZE_T, &xval, 's');
	lc_register_var("Somesection.Free", LC_VAR_BOOL, &onoff, 0);
	lc_register_var("long", LC_VAR_BOOL_BY_EXISTANCE, &onoff2, 'l');
	lc_register_var("ipaddr", LC_VAR_IP, &ipaddr, 'i');
	lc_register_callback("sally", 0, LC_VAR_STRING, sally_cmd, NULL);
	lc_register_callback("HELP", 'h', LC_VAR_NONE, help_cmd, NULL);
	lc_register_callback("*.ifmodule", 0, LC_VAR_NONE, cmd_ifmodule, NULL);
	lcpret = lc_process_file("testapp", "http://10.8.0.2/test.conf", LC_CONF_APACHE);
	lcpret = lc_process(argc, argv, "testapp", LC_CONF_APACHE, "test.cfg");
	lc_cleanup();
	if (lcpret < 0) {
		fprintf(stderr, "Error processing config file: %s\n", lc_geterrstr());
		return(EXIT_FAILURE);
	}

	if (joeval != NULL) {
		fprintf(stderr, "joeval = \"%s\"\n", joeval);