~m-grant-prg/libmgesysutils/focal-trunk

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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
#########################################################################
#									#
# Script ID: ./configure.ac						#
# Author: Copyright (C) 2015-2019  Mark Grant				#
#									#
# Released under the GPLv3 only.					#
# SPDX-License-Identifier: GPL-3.0					#
#									#
# Purpose:								#
#	AutoConf script file to configure libmgesysutils project.	#
#									#
# cmd line syntax:							#
# ./configure	[--enable-debug=<yes|no> [default: no]]			#
#		[--enable-distcheckfake=<yes|no> [default: no]]		#
#		[--enable-headercheck=<yes|no> [default: no]]		#
#		[--enable-sparse=<yes|no> [default: no]]		#
#									#
# Parameters generic description. For specifics to this configure.ac	#
# please see inline comments at the point of definition:-		#
# --enable-debug							#
#	Used to set things like compiler debug flags.			#
# --enable-distcheckfake						#
#	Enables the replacement of an absolute directory path specified	#
#	in a variable, with a value based on AutoTools standard		#
#	directories. This enables the Makefile.am to use the AT		#
#	variable based value when running distcheck and the absolute	#
#	path for all else. Hence distcheck can now succeed when it	#
#	would normally fail.						#
# --enable-headercheck							#
#	Used to set a flag to output the header file nesting.		#
# --enable-sparse							#
#	Used to compile with the sparse static analyser.		#
#									#
# Layout: (Only relevant sections will exist).				#
# ChangeLog : High level ChangeLog					#
# SECTION  1: Initialisation & Setup					#
# SECTION  2: Architecture, target and host checks			#
# SECTION  3: Command line arguments					#
# SECTION  4: Compiler setup						#
# SECTION  5: Check for programs					#
# SECTION  6: Check for libraries					#
# SECTION  7: Check for header files					#
# SECTION  8: Check for types						#
# SECTION  9: Check for structures					#
# SECTION 10: Check for compiler characteristics			#
# SECTION 11: Check for library functions				#
# SECTION 12: Check for pkg-config files				#
# SECTION 13: Check for system services					#
# SECTION 14: Additional checks & variables				#
# SECTION 15: Specify the output files					#
#									#
#########################################################################

#########################################################################
#									#
# Changelog								#
#									#
# Date		Author	Version	Description				#
#									#
# 12/07/2015	MG	1.0.1	First release.				#
# 25/10/2015	MG	1.0.2	Restructure and change to conform to	#
#				AutoTools General Template v1.0.6.	#
# 13/01/2017	MG	1.0.3	Change to empty CFLAGS here and leave	#
#				setting to the Makefile.am's.		#
# 03/02/2017	MG	1.0.4	Add check for mge-errno.h and libmgec.	#
# 23/04/2017	MG	1.0.5	Make AC_INIT and pkgversion AC_SUBST	#
#				multi-line.				#
#				Fully populate sed substitution		#
#				variables.				#
#				Add support for temporary header	#
#				directory.				#
# 09/06/2017	MG	1.0.6	Add support for temporary libraries.	#
# 18/10/2017	MG	1.0.7	Add search for temporary libraries and	#
#				store result in a variable for AutoMake	#
#				consumption.				#
# 01/01/2018	MG	1.0.8	Add SPDX license tags to source files.	#
# 02/01/2018	MG	1.0.9	Move to new source directory structure.	#
# 05/01/2018	MG	1.0.10	Correct use of config.h - remove the	#
#				Makefile.am and processing.		#
#				Update minimum required Autoconf	#
#				version.				#
# 11/02/2018	MG	1.0.11	Make AutoMake use posix format for tar.	#
# 26/03/2018	MG	1.0.12	Add support for an enable-sparse CLA	#
#				and passing a suitable variable to the	#
#				Makefile.am's.				#
# 21/06/2018	MG	1.0.13	Use better source file for		#
#				AC_CONFIG_SRCDIR check.			#
#				AC_DEFINE SOURCE_VERSION for use in	#
#				version.c via config.h			#
#				Remove no longer needed AC_SUBST	#
#				variable pkgversion.			#
#				AC_SUBST the lib_version_info so that	#
#				all top level versioning can be done	#
#				from configure.ac			#
# 11/08/2018	MG	1.0.14	Add support for an enable-headercheck	#
#				CLA and passing a suitable variable to	#
#				the Makefile.am's.			#
#				Build suitable CFLAGS based on compiler	#
#				version.				#
# 04/10/2018	MG	1.0.15	Add program check for pkg-config.	#
# 18/05/2019	MG	1.1.1	Collapse AT sub-projects into one.	#
#				Remove leading v from package version.	#
#				Use new m4 macro to build CFLAGS.	#
#				Revamp to new standard layout.		#
# 31/05/2019	MG	1.1.2	Add Section 8 and check for (s)size_t.	#
# 29/10/2019	MG	1.1.3	Add enable-distcheckfake option.	#
#				Add enable option descriptions in this	#
#				file's header.				#
#				Correct ARG_ENABLE help text.		#
#									#
#########################################################################


#########################################
#					#
# SECTION  1: Initialisation & Setup	#
#					#
#########################################

AC_REVISION($Revision: 1.1.3 $)

AC_PREREQ(2.69)

#
# The following macros set all top level versioning for this project. All
# information can be propagated via AC_CONFIG_HEADERS and AC_CONFIG_FILES.
#
AC_INIT(MGE system utilities library, 1.1.1,
	m.grant.prg@gmail.com, libmgesysutils)

AC_MSG_NOTICE(initialisation and setup)

AC_DEFINE(SOURCE_VERSION, "1.0.11", \
	Define to the version of source code in this package.)

AC_SUBST(lib_version_info, "1:1:0")

#
# Passes the options to all am files. Puts objects in the sub-directory
# containing the source. Forces tar to use --format=posix in make dist.
# This also checks :-	BSD install	make variable set	mkdir -p
#			gawk
#
AM_INIT_AUTOMAKE([-Wall -Werror subdir-objects tar-pax])

#
# Standard macros will be automatically placed in m4.
# Programmer defined macros should be placed in, say, m4extra which allows us
# to exclude the standard macros from being git tracked. This other directory
# must be specified as an include option in the Makefile.am ACLOCAL_AMFLAGS
# e.g.
# ACLOCAL_AMFLAGS = -I m4 -I m4extra
#
AC_CONFIG_MACRO_DIR([m4])


#########################################
#					#
# SECTION  3: Command line arguments	#
#					#
#########################################

AC_MSG_NOTICE(checking command line arguments)

#
# The following allows for an enable-debug=yes/no command line option. The
# conditional DEBUG is made available to the makefiles.
#
AC_ARG_ENABLE(debug,
	AS_HELP_STRING([--enable-debug], [compile for debugging]),
	[case "${enableval}" in
		yes) debug=true ;;
		no)  debug=false ;;
		*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
	esac],debug=false)
AM_CONDITIONAL(DEBUG, test x$debug = xtrue)

# CFLAGS is usually set to -g -O2, but for debugging we will probably
# want -g -Og and for production we will probably want -O2. So empty CFLAGS here
# and leave the selection to the Makefile.am's.
: ${CFLAGS=""}

if test "x${debug}" = xtrue; then
	AC_MSG_NOTICE(build in debug mode)
fi

#
# If a file location has to be fixed, e.g. /etc/foo.conf and never
# /usr/local/etc/foo.conf, then make distcheck will fail. Setting this flag
# allows make distcheck to locate the file in an AT standard directory-based
# location.
# eg /usr/local/etc/foo.conf.
# and hence succeed.
#
AC_ARG_ENABLE([distcheckfake],
	AS_HELP_STRING([--enable-distcheckfake], [enable running of distcheck]),
	[case "${enableval}" in
		yes) distcheckfake=true ;;
		no)  distcheckfake=false ;;
		*) AC_MSG_ERROR([bad value ${enableval} for \
			--enable-distcheckfake]) ;;
	esac],[distcheckfake=false])
AM_CONDITIONAL([DISTCHECKFAKE], [test x$distcheckfake = xtrue])

if test "x${distcheckfake}" = xtrue; then
	AC_MSG_NOTICE([using workarounds to facilitate distcheck])
else
	AC_MSG_NOTICE([using distcheck incompatible setup])
fi

#
# The following allows for an enable-headercheck=yes/no command line option.
# The conditional HEADERCHECK is made available to the makefiles.
#
AC_ARG_ENABLE(headercheck,
	AS_HELP_STRING([--enable-headercheck], [build to display header stack]),
	[case "${enableval}" in
		yes) headercheck=true ;;
		no)  headercheck=false ;;
		*) AC_MSG_ERROR(bad value ${enableval} in enable-headercheck);;
	esac],headercheck=false)
AM_CONDITIONAL(HEADERCHECK, test x$headercheck = xtrue)

if test "x${headercheck}" = xtrue; then
	AC_MSG_NOTICE(building to display include stack depth)
fi

#
# The following allows for an enable-sparse=yes/no command line option. The
# conditional SPARSE is made available to the makefiles.
#
AC_ARG_ENABLE(sparse,
	AS_HELP_STRING([--enable-sparse], [build with sparse]),
	[case "${enableval}" in
		yes) sparse=true ;;
		no)  sparse=false ;;
		*) AC_MSG_ERROR(bad value ${enableval} for --enable-sparse);;
	esac],sparse=false)
AM_CONDITIONAL(SPARSE, test x$sparse = xtrue)

if test "x${sparse}" = xtrue; then
	AC_MSG_NOTICE(building using sparse)
fi


#################################
#				#
# SECTION  4: Compiler setup	#
#				#
#################################

AC_MSG_NOTICE([checking compiler setup])

# Set language for compilation tests.
AC_LANG(C)

# Checks the compiler to use from either a standard list or one to use for
# sparse, stores it in the CC variable and checks its capabilities.
if test "x$sparse" = "xtrue" ; then
	compiler_list="cgcc gcc cc"
else
	compiler_list="gcc cc"
fi
AC_PROG_CC($compiler_list)

# GNULIB gl_EARLY macro. Place just after AC_PROG_CC.
# Also checks for ar, grep, egrep, ranlib and how to run the cpp.
gl_EARLY

# Checks the c pre-processor to use, stores it in the cpp variable and checks
# its capabilities.
AC_PROG_CPP

# Checks the c++ compiler to use, stores it in the cxx variable and checks its
# capabilities. (Required by ltmain.sh).
AC_PROG_CXX

# GNULIB gl_INIT macro. Must appear after other checks which may affect the
# compiler invocation.
gl_INIT

# Must use this macro if the ar archiver is used. ar is mostly now used for
# static libraries.
AM_PROG_AR

# Check for libtool minimum version.
LT_PREREQ(2.4.6)

# Turn on shared libraries.
# Also checks for fgrep, linker capabilities, ranlib, sed.
# Also checks for:-	ANSI C header files	sys/types.h	sys/stat.h
#			stdlib.h	string.h	memory.h
#			strings.h	inttypes.h	stdint.h
#			unistd.h	dlfcn.h
LT_INIT


#########################################
#					#
# SECTION  5: Check for programs	#
#					#
#########################################

AC_MSG_NOTICE(checking for basic programs that have AutoConf checks)

#
# The small set of tools you can expect to find on any machine.
#
# awk		date		grep		od
# basename	diff		join		rm
# cat		dirname		ln		rmdir
# cc		egrep		ls		sed
# chgrp		expr		mkdir		sleep
# chown		expr (‘|’)	mkfifo		sort
# chmod		expr (‘:’)	mknod		tar
# cmp		fgrep		mktemp		touch
# cp		find		mv		tr
#
# (For further information including limitations to the above, see Section 11.15
# in the GNU AutoConf Manual).
#
# If using am init automake, gl early or lt init the following programs are
# automatically checked:-
#
# am init automake
#	BSD install	mkdir -p	gawk
#
# gl early
#	ar	grep	egrep	ranlib
#
# lt init
#	fgrep	ranlib	sed
#
# Basic and AutoTools program checks.
#
AC_PROG_AWK
AC_PROG_EGREP
AC_PROG_FGREP
AC_PROG_GREP
AC_PROG_LN_S
AC_PROG_MKDIR_P
AC_PROG_SED

AC_MSG_NOTICE(checking for some standard AutoTools required programs)
AC_PROG_INSTALL

AC_MSG_NOTICE(checking for particular programs required by this build)
AC_CHECK_PROG(DIA, dia, yes, no)
if test "x$DIA" = "xno" ; then
	AC_MSG_ERROR(dia not found)
fi

AC_CHECK_PROG(DOT, dot, yes, no)
if test "x$DOT" = "xno" ; then
	AC_MSG_ERROR(dot not found)
fi

AC_CHECK_PROG(DOXYGEN, doxygen, yes, no)
if test "x$DOXYGEN" = "xno" ; then
	AC_MSG_ERROR(doxygen not found)
fi

AC_CHECK_PROG([TAR], [tar], [yes], [no])
if test "x$TAR" = "xno" ; then
	AC_MSG_ERROR([tar not found])
fi

AC_CHECK_PROG([TXT2MAN], [txt2man], [yes], [no])
if test "x$TXT2MAN" = "xno" ; then
	AC_MSG_ERROR([txt2man not found])
fi

AC_CHECK_PROG([TXT2MANWRAP], [txt2manwrap], [yes], [no])
if test "x$TXT2MANWRAP" = "xno" ; then
	AC_MSG_ERROR([txt2manwrap not found])
fi

AC_CHECK_PROG(PKGCONFIG, pkg-config, yes, no)
if test "x$PKGCONFIG" = "xno" ; then
	AC_MSG_ERROR(pkg-config not found)
fi

AC_MSG_NOTICE(checking for particular programs required at build and run time)

AC_MSG_NOTICE(checking for particular programs required at run time)


#########################################
#					#
# SECTION  6: Check for libraries	#
#					#
#########################################

AC_MSG_NOTICE(checking for libraries required by this application)

AC_SEARCH_LIBS(pull_msg, mgec, , \
	AC_MSG_ERROR(function pull_msg not found in libmgec))


#########################################
#					#
# SECTION  7: Check for header files	#
#					#
#########################################

AC_MSG_NOTICE(checking for header files required by this application)

AC_CHECK_HEADERS(stdio.h, [], AC_MSG_ERROR(header not found))
AC_CHECK_HEADERS(stdlib.h, [], AC_MSG_ERROR(header not found))
AC_CHECK_HEADERS(string.h, [], AC_MSG_ERROR(header not found))
AC_CHECK_HEADERS(ctype.h, [], AC_MSG_ERROR(header not found))
AC_CHECK_HEADERS(unistd.h, [], AC_MSG_ERROR(header not found))
AC_CHECK_HEADERS(errno.h, [], AC_MSG_ERROR(header not found))
AC_CHECK_HEADERS(sys/socket.h, [], AC_MSG_ERROR(header not found))
AC_CHECK_HEADERS(netinet/in.h, [], AC_MSG_ERROR(header not found))
AC_CHECK_HEADERS(netdb.h, [], AC_MSG_ERROR(header not found))
AC_CHECK_HEADERS(syslog.h, [], AC_MSG_ERROR(header not found))
AC_CHECK_HEADERS(portability.h, [], AC_MSG_ERROR(header not found))
AC_CHECK_HEADERS(mge-errno.h, [], AC_MSG_ERROR(header not found))


#################################
#				#
# SECTION  8: Check for types	#
#				#
#################################

AC_MSG_NOTICE(checking for typedefs required by this application)
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T


#########################################################
#							#
# SECTION 10: Check for compiler characteristics	#
#							#
#########################################################

AC_MSG_NOTICE(checking for compiler characteristics)

# Build a suitable CFLAGS list depending on compiler version.
BUILD_COMPILER_VERSION_CFLAGS(mg_cflags)


#################################################
#						#
# SECTION 11: Check for library functions	#
#						#
#################################################

AC_MSG_NOTICE(checking for GNU compatible library functions)

AC_CHECK_FUNCS(gethostname memset socket strchr)


#################################################
#						#
# SECTION 12: Check for pkg-config files	#
#						#
#################################################

PKG_CHECK_MODULES(LIBMGEC, libmgec, [], \
		AC_MSG_ERROR(pkg-config file not found))


#################################################
#						#
# SECTION 14: Additional checks & variables	#
#						#
#################################################

AC_MSG_NOTICE(processing additional checks and variables)

#
# Now set up a sed sequence to substitute bookmarks in script files with either
# standard GNU Directory Variables, or with programmer-defined variables set up
# using an AC_SUBST macro above. This sed sequence will be invoked at programmer
# discretion at sub-directory Makefile.am level.
# ----------------------
#
# prefix	/usr/local (typically)
#	exec_prefix	${prefix}
#		bindir	${exec_prefix}/bin	user executables
#		sbindir	${exec_prefix}/sbin	system admin executables
#		libexecdir	${exec_prefix}/libexec	program executables
#		libdir	${exec_prefix}/lib	object code libraries
#	sysconfdir	 ${prefix}/etc	read-only single-machine data
#	sharedstatedir	${prefix}/com	modifiable architecture-independent data
#	localstatedir	${prefix}/var	modifiable single-machine data
#	runstatedir	${localstatedir}/run
#	includedir	${prefix}/include	C header files
#	oldincludedir	$usr/include	C header files
#	datarootdir	${prefix}/share	read-only arch.-independent data root
#		localedir	${datarootdir}/locale	locale-dependent data
#		datadir	${datarootdir}	read-only architecture-independent data
#		mandir	${datarootdir}/man	man documentation
#		infodir	${datarootdir}/info	info documentation
#		docdir	${datarootdir}/doc/${PACKAGE}	documentation root
#			htmldir	${docdir}	html documentation
#			dvidir	${docdir}	dvi documentation
#			pdfdir	${docdir}	pdf documentation
#			psdir	${docdir}	ps documentation
#		lispdir	${datarootdir}/emacs/site-lisp
#	pkgdatadir	${datarootdir}/${PACKAGE}
#	pkgincludedir	${includedir}/${PACKAGE}
#	pkglibdir	${libdir}/${PACKAGE}
#	pkglibexecdir	${libexecdir}/${PACKAGE}
#
AC_SUBST([edit], ["sed \
		-e 's|@prefix[@]|\$(prefix)|g' \
		-e 's|@exec_prefix[@]|\$(exec_prefix)|g' \
		-e 's|@bindir[@]|\$(bindir)|g' \
		-e 's|@sbindir[@]|\$(sbindir)|g' \
		-e 's|@libexecdir[@]|\$(libexecdir)|g' \
		-e 's|@libdir[@]|\$(libdir)|g' \
		-e 's|@sysconfdir[@]|\$(sysconfdir)|g' \
		-e 's|@sharedstatedir[@]|\$(sharedstatedir)|g' \
		-e 's|@localstatedir[@]|\$(localstatedir)|g' \
		-e 's|@runstatedir[@]|\$(runstatedir)|g' \
		-e 's|@includedir[@]|\$(includedir)|g' \
		-e 's|@oldincludedir[@]|\$(oldincludedir)|g' \
		-e 's|@datarootdir[@]|\$(datarootdir)|g' \
		-e 's|@localedir[@]|\$(localedir)|g' \
		-e 's|@datadir[@]|\$(datadir)|g' \
		-e 's|@mandir[@]|\$(mandir)|g' \
		-e 's|@infodir[@]|\$(infodir)|g' \
		-e 's|@docdir[@]|\$(docdir)|g' \
		-e 's|@htmldir[@]|\$(htmldir)|g' \
		-e 's|@dvidir[@]|\$(dvidir)|g' \
		-e 's|@pdfdir[@]|\$(pdfdir)|g' \
		-e 's|@psdir[@]|\$(psdir)|g' \
		-e 's|@lispdir[@]|\$(lispdir)|g' \
		-e 's|@pkgdatadir[@]|\$(pkgdatadir)|g' \
		-e 's|@pkgincludedir[@]|\$(pkgincludedir)|g' \
		-e 's|@pkglibdir[@]|\$(pkglibdir)|g' \
		-e 's|@pkglibexecdir[@]|\$(pkglibexecdir)|g'"])

#
# This creates an AutoConf substitution variable for temporary header files.
# Temporary headers might be copies of -dev package header files brought into a
# library package for development and modification. Whilst there it should be
# used. When finished it must be moved back to the -dev package for release.
# This variable and the inc-tmp/Makefile.am allow for this conditional use and
# even conditional presence in inc-tmp.
# The use of `dirname $0` to get the configure invocation directory is critical
# for parallel builds and make distcheck as the relative path always stays the
# same but configure may be invoked from different directories.
#
AC_SUBST(tmpheaders)

for entry in `dirname $0`/src/prg/c/inc-tmp/*.h
do
	if test -f "$entry" ;then
		tmpheaders=$tmpheaders" "$(basename "$entry")
	fi
done

#
# This creates an AutoConf substitution variable for temporary libraries.
# Temporary libraries are development copies of libraries from other packages
# which are being tested / modified in conjunction with this package.
# This variable can be consumed in the AutoMake XXX_LDADD line.
# The use of `dirname $0` to get the configure invocation directory is critical
# for parallel builds and make distcheck as the relative path always stays the
# same but configure may be invoked from different directories.
#
AC_SUBST(tmplibraries)

for direntry in `dirname $0`/src/prg/c/lib-tmp/*
do
	if test -d "$direntry" ;then
		for entry in `dirname $0`\
/src/prg/c/lib-tmp/$(basename "$direntry")/*.la
		do
			if test -f "$entry" ;then
				tmplibraries=$tmplibraries\
" \$(srcdir)/../../lib-tmp/"$(basename "$direntry")"/"$(basename "$entry")
			fi
		done
	fi
done

#
# Setup substitution variables for use in the pkg-config file.
#

# The Requires field.
AC_SUBST(pc_requires)
# LIBMGEC is a Requires AOT Requires.private because it exposes mge_errno.
pc_requires="libmgec"

# The Requires.private field
AC_SUBST(pc_requires_private, "")

# Check a source file to ensure no command line --srcdir typo.
AC_CONFIG_SRCDIR(src/prg/c/src/libmgesysutils/version.c)


#########################################
#					#
# SECTION 15: Specify the output files	#
#					#
#########################################

AC_MSG_NOTICE(processing output files)

#
# Non-Makefile files to generate.
# AC_CONFIG_FILES should not be used to substitute AutoConf Installation
# Directory Variables, (bindir and friends), except in Makefiles and pkg-config
# files. See GNU AutoConf manual section 4.8.2 Installation Directory Variables.
#
AC_CONFIG_FILES(doc/doxygen/Doxyfile)
AC_CONFIG_FILES(src/prg/c/pkg-config/libmgesysutils.pc)

# Causes AC_OUTPUT to create a c preprocessor file with #define statements about
# the configuration.
AC_CONFIG_HEADERS(src/prg/c/gen/inc/config.h)

# Project Makefiles to create.
AC_CONFIG_FILES(Makefile
		doc/doxygen/Makefile
		src/man/3/Makefile
		src/prg/c/gen/lib/Makefile
		src/prg/c/inc/Makefile
		src/prg/c/inc-tmp/Makefile
		src/prg/c/lib-tmp/Makefile
		src/prg/c/pkg-config/Makefile
		src/prg/c/src/libmgesysutils/Makefile
		src/prg/c/src/test-configfile/Makefile
		src/prg/c/src/test-remsyslog/Makefile)

AC_OUTPUT