gcc/libgm2/config.h.in
Gaius Mulley e5f6a5ad7c PR modula2/111530: Build failure on BSD due to getopt_long_only GNU extension dependency
This patch uses the libiberty getopt long functions (wrapped up inside
libgm2/libm2pim/cgetopt.cc) and only enables this implementation if
libgm2/configure.ac detects no getopt_long and friends on the target.

gcc/m2/ChangeLog:

	PR modula2/111530
	* gm2-libs-ch/cgetopt.c (cgetopt_cgetopt_long): Re-format.
	(cgetopt_cgetopt_long_only): Re-format.
	(cgetopt_SetOption):  Re-format and assign flag to NULL
	if name is also NULL.
	* gm2-libs/GetOpt.def (AddLongOption): Add index parameter
	and change flag to be a VAR parameter rather than a pointer.
	(GetOptLong): Re-format.
	(GetOpt): Correct comment.
	* gm2-libs/GetOpt.mod: Re-write to rely on cgetopt rather
	than implement long option creation in GetOpt.
	* gm2-libs/cgetopt.def (SetOption): has_arg type is INTEGER.

libgm2/ChangeLog:

	PR modula2/111530
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* configure.ac (AC_CHECK_HEADERS): Include getopt.h.
	(GM2_CHECK_LIB): getopt_long check.
	(GM2_CHECK_LIB): getopt_long_only check.
	* libm2cor/Makefile.in: Regenerate.
	* libm2iso/Makefile.in: Regenerate.
	* libm2log/Makefile.in: Regenerate.
	* libm2min/Makefile.in: Regenerate.
	* libm2pim/Makefile.in: Regenerate.
	* libm2pim/cgetopt.cc: Re-write using conditional on configure
	and long function code from libiberty/getopt.c.

gcc/testsuite/ChangeLog:

	PR modula2/111530
	* gm2/pimlib/run/pass/testgetopt.mod: New test.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-10-27 15:54:48 +01:00

346 lines
7.6 KiB
C

/* config.h.in. Generated from configure.ac by autoheader. */
/* function access exists */
#undef HAVE_ACCESS
/* function brk exists */
#undef HAVE_BRK
/* function cfmakeraw exists */
#undef HAVE_CFMAKERAW
/* function clock_gettime exists */
#undef HAVE_CLOCK_GETTIME
/* function clock_settime exists */
#undef HAVE_CLOCK_SETTIME
/* function close exists */
#undef HAVE_CLOSE
/* function creat exists */
#undef HAVE_CREAT
/* function ctime exists */
#undef HAVE_CTIME
/* function daylight exists */
#undef HAVE_DAYLIGHT
/* Define to 1 if you have the <direct.h> header file. */
#undef HAVE_DIRECT_H
/* Define to 1 if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* function dup exists */
#undef HAVE_DUP
/* Define to 1 if you have the <errno.h> header file. */
#undef HAVE_ERRNO_H
/* function execve exists */
#undef HAVE_EXECVE
/* function exit exists */
#undef HAVE_EXIT
/* function fcntl exists */
#undef HAVE_FCNTL
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* function fstat exists */
#undef HAVE_FSTAT
/* function getdents exists */
#undef HAVE_GETDENTS
/* function getgid exists */
#undef HAVE_GETGID
/* Define to 1 if you have the <getopt.h> header file. */
#undef HAVE_GETOPT_H
/* function getopt_long exists */
#undef HAVE_GETOPT_LONG
/* function getopt_long_only exists */
#undef HAVE_GETOPT_LONG_ONLY
/* function getpid exists */
#undef HAVE_GETPID
/* function gettimeofday exists */
#undef HAVE_GETTIMEOFD
/* function getuid exists */
#undef HAVE_GETUID
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* function ioctl exists */
#undef HAVE_IOCTL
/* function kill exists */
#undef HAVE_KILL
/* Define to 1 if you have the <langinfo.h> header file. */
#undef HAVE_LANGINFO_H
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* function link exists */
#undef HAVE_LINK
/* function lseek exists */
#undef HAVE_LSEEK
/* Define to 1 if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
/* have math.h */
#undef HAVE_MATH_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <netdb.h> header file. */
#undef HAVE_NETDB_H
/* Define to 1 if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H
/* function open exists */
#undef HAVE_OPEN
/* function pause exists */
#undef HAVE_PAUSE
/* function pipe exists */
#undef HAVE_PIPE
/* Define to 1 if you have the <pthread.h> header file. */
#undef HAVE_PTHREAD_H
/* Define to 1 if you have the <pwd.h> header file. */
#undef HAVE_PWD_H
/* function rand exists */
#undef HAVE_RAND
/* function read exists */
#undef HAVE_READ
/* function select exists */
#undef HAVE_SELECT
/* function setgid exists */
#undef HAVE_SETGID
/* function setitimer exists */
#undef HAVE_SETITIMER
/* function setuid exists */
#undef HAVE_SETUID
/* Define to 1 if you have the <signal.h> header file. */
#undef HAVE_SIGNAL_H
/* function signbit exists */
#undef HAVE_SIGNBIT
/* function signbitf exists */
#undef HAVE_SIGNBITF
/* function signbitl exists */
#undef HAVE_SIGNBITL
/* function stat exists */
#undef HAVE_STAT
/* Define to 1 if you have the <stdarg.h> header file. */
#undef HAVE_STDARG_H
/* Define to 1 if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* function strsignal exists */
#undef HAVE_STRSIGNAL
/* function strtod exists */
#undef HAVE_STRTOD
/* function strtold exists */
#undef HAVE_STRTOLD
/* Define to 1 if the system has the type `struct stat'. */
#undef HAVE_STRUCT_STAT
/* Define to 1 if the system has the type `struct timespec'. */
#undef HAVE_STRUCT_TIMESPEC
/* Define to 1 if the system has the type `struct timeval'. */
#undef HAVE_STRUCT_TIMEVAL
/* Define to 1 if the system has the type `struct timezone'. */
#undef HAVE_STRUCT_TIMEZONE
/* Define to 1 if the system has the type `struct tm'. */
#undef HAVE_STRUCT_TM
/* Define to 1 if you have the <sys/errno.h> header file. */
#undef HAVE_SYS_ERRNO_H
/* Define to 1 if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
/* Define to 1 if you have the <sys/mman.h> header file. */
#undef HAVE_SYS_MMAN_H
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/resource.h> header file. */
#undef HAVE_SYS_RESOURCE_H
/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/times.h> header file. */
#undef HAVE_SYS_TIMES_H
/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <sys/uio.h> header file. */
#undef HAVE_SYS_UIO_H
/* Define to 1 if you have the <sys/wait.h> header file. */
#undef HAVE_SYS_WAIT_H
/* Define to 1 if you have the <termios.h> header file. */
#undef HAVE_TERMIOS_H
/* function times exists */
#undef HAVE_TIMES
/* function timezone exists */
#undef HAVE_TIMEZONE
/* Define to 1 if you have the <time.h> header file. */
#undef HAVE_TIME_H
/* Define if struct tm has a tm_gmtoff field. */
#undef HAVE_TM_TM_GMTOFF
/* function tzname exists */
#undef HAVE_TZNAME
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* function unlink exists */
#undef HAVE_UNLINK
/* function wait exists */
#undef HAVE_WAIT
/* Define to 1 if you have the <wchar.h> header file. */
#undef HAVE_WCHAR_H
/* function write exists */
#undef HAVE_WRITE
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* Version number of package */
#undef VERSION
/* Define to 1 if on MINIX. */
#undef _MINIX
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
#undef _POSIX_1_SOURCE
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE