mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
updated libopts
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
dnl -*- buffer-read-only: t -*- vi: set ro:
|
||||
dnl
|
||||
dnl
|
||||
dnl DO NOT EDIT THIS FILE (libopts.m4)
|
||||
dnl
|
||||
dnl It has been AutoGen-ed May 6, 2012 at 04:20:55 PM by AutoGen 5.16pre36
|
||||
dnl
|
||||
dnl It has been AutoGen-ed March 31, 2013 at 10:41:19 AM by AutoGen 5.17.3
|
||||
dnl From the definitions libopts.def
|
||||
dnl and the template file conftest.tpl
|
||||
dnl
|
||||
@@ -11,7 +11,7 @@ dnl
|
||||
AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[
|
||||
AC_REQUIRE([AC_HEADER_STDC])
|
||||
AC_HEADER_DIRENT
|
||||
|
||||
|
||||
# =================
|
||||
# AC_CHECK_HEADERS
|
||||
# =================
|
||||
@@ -19,26 +19,26 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[
|
||||
sys/mman.h sys/param.h sys/poll.h sys/procset.h \
|
||||
sys/select.h sys/socket.h sys/stropts.h sys/time.h \
|
||||
sys/un.h sys/wait.h dlfcn.h errno.h \
|
||||
fcntl.h libgen.h memory.h netinet/in.h \
|
||||
setjmp.h stdbool.h sysexits.h unistd.h \
|
||||
utime.h])
|
||||
|
||||
fcntl.h libgen.h libintl.h memory.h \
|
||||
netinet/in.h setjmp.h stdbool.h sysexits.h \
|
||||
unistd.h utime.h])
|
||||
|
||||
AC_CHECK_HEADERS([stdarg.h varargs.h],
|
||||
[lo_have_arg_hdr=true;break],
|
||||
[lo_have_arg_hdr=false])
|
||||
|
||||
|
||||
AC_CHECK_HEADERS([string.h strings.h],
|
||||
[lo_have_str_hdr=true;break],
|
||||
[lo_have_str_hdr=false])
|
||||
|
||||
|
||||
AC_CHECK_HEADERS([limits.h sys/limits.h values.h],
|
||||
[lo_have_lim_hdr=true;break],
|
||||
[lo_have_lim_hdr=false])
|
||||
|
||||
|
||||
AC_CHECK_HEADERS([inttypes.h stdint.h],
|
||||
[lo_have_typ_hdr=true;break],
|
||||
[lo_have_typ_hdr=false])
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# check for various programs used during the build.
|
||||
# On OS/X, "wchar.h" needs "runetype.h" to work properly.
|
||||
@@ -49,31 +49,39 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[
|
||||
# include <runetype.h>
|
||||
#endif
|
||||
])
|
||||
|
||||
|
||||
AC_ARG_ENABLE([nls],
|
||||
AS_HELP_STRING([--disable-nls],[disable nls support in libopts]))
|
||||
AS_IF([test "x$enable_nls" != "xno" && \
|
||||
test "X${ac_cv_header_libintl_h}" = Xyes], [
|
||||
AC_DEFINE([ENABLE_NLS],[1],[nls support in libopts])])
|
||||
|
||||
# --------------------------------------------
|
||||
# Verify certain entries from AC_CHECK_HEADERS
|
||||
# --------------------------------------------
|
||||
[for f in sys_types sys_mman sys_param sys_stat sys_wait \
|
||||
string errno stdlib memory setjmp
|
||||
do eval as_ac_var=\${ac_cv_header_${f}_h+set}
|
||||
test "${as_ac_var}" = set || {
|
||||
]AC_MSG_ERROR([You must have ${f}.h on your system])[
|
||||
}
|
||||
done
|
||||
|
||||
${lo_have_arg_hdr} || \
|
||||
]AC_MSG_ERROR([You must have stdarg.h or varargs.h on your system])[
|
||||
|
||||
[${lo_have_arg_hdr} || \
|
||||
]AC_MSG_ERROR([you must have stdarg.h or varargs.h on your system])[
|
||||
|
||||
${lo_have_str_hdr} || \
|
||||
]AC_MSG_ERROR([You must have string.h or strings.h on your system])[
|
||||
|
||||
]AC_MSG_ERROR([you must have string.h or strings.h on your system])[
|
||||
|
||||
${lo_have_lim_hdr} || \
|
||||
]AC_MSG_ERROR(
|
||||
[You must have one of limits.h, sys/limits.h or values.h])[
|
||||
|
||||
[you must have one of limits.h, sys/limits.h or values.h])[
|
||||
|
||||
${lo_have_typ_hdr} || \
|
||||
]AC_MSG_ERROR([You must have inttypes.h or stdint.h on your system])
|
||||
|
||||
]AC_MSG_ERROR([you must have inttypes.h or stdint.h on your system])[
|
||||
|
||||
for f in sys_types sys_mman sys_param sys_stat sys_wait \
|
||||
string errno stdlib memory setjmp
|
||||
do eval as_ac_var=\${ac_cv_header_${f}_h}
|
||||
test "X${as_ac_var}" = Xyes || {
|
||||
]AC_MSG_ERROR([you must have ${f}.h on your system])[
|
||||
}
|
||||
done
|
||||
test "X${ac_cv_header_inttypes_h-no}" = Xyes || \
|
||||
echo '#include <stdint.h>' > inttypes.h]
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Checks for typedefs
|
||||
# ----------------------------------------------------------------------
|
||||
@@ -93,7 +101,7 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[
|
||||
AC_CHECK_SIZEOF(int, 4)
|
||||
AC_CHECK_SIZEOF(long, 8)
|
||||
AC_CHECK_SIZEOF(short, 2)
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# AC_CHECK_LIB for SVR4 libgen, and use it if it defines pathfind.
|
||||
# ----------------------------------------------------------------------
|
||||
@@ -116,7 +124,7 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[
|
||||
if ! true ; then exit 1 ; fi
|
||||
echo /bin/sh'`
|
||||
test -x "$POSIX_SHELL" && break
|
||||
]AC_ERROR([Cannot locate a working POSIX shell])[
|
||||
]AC_MSG_ERROR([cannot locate a working POSIX shell])[
|
||||
done]
|
||||
AC_DEFINE_UNQUOTED([POSIX_SHELL], ["${POSIX_SHELL}"],
|
||||
[define to a working POSIX compliant shell])
|
||||
@@ -142,7 +150,7 @@ AC_DEFUN([LIBOPTS_WITH_REGEX_HEADER],[
|
||||
else
|
||||
AC_DEFINE([REGEX_HEADER],[<regex.h>],[name of regex header file])
|
||||
fi
|
||||
|
||||
|
||||
]) # end of AC_DEFUN of LIBOPTS_WITH_REGEX_HEADER
|
||||
|
||||
|
||||
@@ -209,7 +217,7 @@ AC_DEFUN([LIBOPTS_WITHLIB_REGEX],[
|
||||
LIBREGEX_LIBS=""
|
||||
AC_MSG_CHECKING([whether libregex functions properly])
|
||||
AC_CACHE_VAL([libopts_cv_with_libregex],[
|
||||
AC_TRY_RUN([@%:@include <stdio.h>
|
||||
AC_RUN_IFELSE([@%:@include <stdio.h>
|
||||
@%:@include <stdlib.h>
|
||||
@%:@include <sys/types.h>
|
||||
@%:@include REGEX_HEADER
|
||||
@@ -230,7 +238,7 @@ int main() {
|
||||
}
|
||||
return 0; }],
|
||||
[libopts_cv_with_libregex=yes], [libopts_cv_with_libregex=no],
|
||||
[libopts_cv_with_libregex=no]) # end of AC_TRY_RUN
|
||||
[libopts_cv_with_libregex=no]) # end of AC_RUN_IFELSE
|
||||
]) # end of AC_CACHE_VAL for libopts_cv_with_libregex
|
||||
AC_MSG_RESULT([${libopts_cv_with_libregex}])
|
||||
if test "X${libopts_cv_with_libregex}" != Xno
|
||||
@@ -240,22 +248,23 @@ int main() {
|
||||
else
|
||||
CPPFLAGS="${libopts_save_CPPFLAGS}"
|
||||
LIBS="${libopts_save_LIBS}"
|
||||
AC_MSG_ERROR([the regex library does not work])
|
||||
fi
|
||||
|
||||
|
||||
]) # end of AC_DEFUN of LIBOPTS_WITHLIB_REGEX
|
||||
|
||||
|
||||
AC_DEFUN([LIBOPTS_RUN_PATHFIND],[
|
||||
AC_MSG_CHECKING([whether pathfind(3) works])
|
||||
AC_CACHE_VAL([libopts_cv_run_pathfind],[
|
||||
AC_TRY_RUN([@%:@include <string.h>
|
||||
AC_RUN_IFELSE([@%:@include <string.h>
|
||||
@%:@include <stdlib.h>
|
||||
int main (int argc, char** argv) {
|
||||
char* pz = pathfind( getenv( "PATH" ), "sh", "x" );
|
||||
return (pz == 0) ? 1 : 0;
|
||||
}],
|
||||
[libopts_cv_run_pathfind=yes],[libopts_cv_run_pathfind=no],[libopts_cv_run_pathfind=no]
|
||||
) # end of TRY_RUN
|
||||
) # end of RUN_IFELSE
|
||||
]) # end of AC_CACHE_VAL for libopts_cv_run_pathfind
|
||||
AC_MSG_RESULT([${libopts_cv_run_pathfind}])
|
||||
if test "X${libopts_cv_run_pathfind}" != Xno
|
||||
@@ -263,7 +272,7 @@ int main (int argc, char** argv) {
|
||||
AC_DEFINE([HAVE_PATHFIND],[1],
|
||||
[Define this if pathfind(3) works])
|
||||
fi
|
||||
|
||||
|
||||
]) # end of AC_DEFUN of LIBOPTS_RUN_PATHFIND
|
||||
|
||||
|
||||
@@ -284,14 +293,14 @@ echo ${dzero}`
|
||||
AC_DEFINE([HAVE_DEV_ZERO],[1],
|
||||
[Define this if /dev/zero is readable device])
|
||||
fi
|
||||
|
||||
|
||||
]) # end of AC_DEFUN of LIBOPTS_TEST_DEV_ZERO
|
||||
|
||||
|
||||
AC_DEFUN([LIBOPTS_RUN_REALPATH],[
|
||||
AC_MSG_CHECKING([whether we have a functional realpath(3C)])
|
||||
AC_CACHE_VAL([libopts_cv_run_realpath],[
|
||||
AC_TRY_RUN([@%:@include <limits.h>
|
||||
AC_RUN_IFELSE([@%:@include <limits.h>
|
||||
@%:@include <stdlib.h>
|
||||
int main (int argc, char** argv) {
|
||||
@%:@ifndef PATH_MAX
|
||||
@@ -303,7 +312,7 @@ choke me!!
|
||||
return (pz == zPath) ? 0 : 1;
|
||||
}],
|
||||
[libopts_cv_run_realpath=yes],[libopts_cv_run_realpath=no],[libopts_cv_run_realpath=no]
|
||||
) # end of TRY_RUN
|
||||
) # end of RUN_IFELSE
|
||||
]) # end of AC_CACHE_VAL for libopts_cv_run_realpath
|
||||
AC_MSG_RESULT([${libopts_cv_run_realpath}])
|
||||
if test "X${libopts_cv_run_realpath}" != Xno
|
||||
@@ -311,14 +320,14 @@ choke me!!
|
||||
AC_DEFINE([HAVE_REALPATH],[1],
|
||||
[Define this if we have a functional realpath(3C)])
|
||||
fi
|
||||
|
||||
|
||||
]) # end of AC_DEFUN of LIBOPTS_RUN_REALPATH
|
||||
|
||||
|
||||
AC_DEFUN([LIBOPTS_RUN_STRFTIME],[
|
||||
AC_MSG_CHECKING([whether strftime() works])
|
||||
AC_CACHE_VAL([libopts_cv_run_strftime],[
|
||||
AC_TRY_RUN([@%:@include <time.h>
|
||||
AC_RUN_IFELSE([@%:@include <time.h>
|
||||
@%:@include <string.h>
|
||||
char t_buf@<:@ 64 @:>@;
|
||||
int main() {
|
||||
@@ -336,7 +345,7 @@ int main() {
|
||||
strftime( t_buf, sizeof( t_buf ), "%A %b %d %j", &tm );
|
||||
return (strcmp( t_buf, z ) != 0); }],
|
||||
[libopts_cv_run_strftime=yes],[libopts_cv_run_strftime=no],[libopts_cv_run_strftime=no]
|
||||
) # end of TRY_RUN
|
||||
) # end of RUN_IFELSE
|
||||
]) # end of AC_CACHE_VAL for libopts_cv_run_strftime
|
||||
AC_MSG_RESULT([${libopts_cv_run_strftime}])
|
||||
if test "X${libopts_cv_run_strftime}" != Xno
|
||||
@@ -344,19 +353,19 @@ int main() {
|
||||
AC_DEFINE([HAVE_STRFTIME],[1],
|
||||
[Define this if strftime() works])
|
||||
fi
|
||||
|
||||
|
||||
]) # end of AC_DEFUN of LIBOPTS_RUN_STRFTIME
|
||||
|
||||
|
||||
AC_DEFUN([LIBOPTS_RUN_FOPEN_BINARY],[
|
||||
AC_MSG_CHECKING([whether fopen accepts "b" mode])
|
||||
AC_CACHE_VAL([libopts_cv_run_fopen_binary],[
|
||||
AC_TRY_RUN([@%:@include <stdio.h>
|
||||
AC_RUN_IFELSE([@%:@include <stdio.h>
|
||||
int main (int argc, char** argv) {
|
||||
FILE* fp = fopen("conftest.@S|@ac_ext", "rb");
|
||||
return (fp == NULL) ? 1 : fclose(fp); }],
|
||||
[libopts_cv_run_fopen_binary=yes],[libopts_cv_run_fopen_binary=no],[libopts_cv_run_fopen_binary=no]
|
||||
) # end of TRY_RUN
|
||||
) # end of RUN_IFELSE
|
||||
]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary
|
||||
AC_MSG_RESULT([${libopts_cv_run_fopen_binary}])
|
||||
if test "X${libopts_cv_run_fopen_binary}" != Xno
|
||||
@@ -367,19 +376,19 @@ return (fp == NULL) ? 1 : fclose(fp); }],
|
||||
AC_DEFINE([FOPEN_BINARY_FLAG],"",
|
||||
[fopen(3) accepts a 'b' in the mode flag])
|
||||
fi
|
||||
|
||||
|
||||
]) # end of AC_DEFUN of LIBOPTS_RUN_FOPEN_BINARY
|
||||
|
||||
|
||||
AC_DEFUN([LIBOPTS_RUN_FOPEN_TEXT],[
|
||||
AC_MSG_CHECKING([whether fopen accepts "t" mode])
|
||||
AC_CACHE_VAL([libopts_cv_run_fopen_text],[
|
||||
AC_TRY_RUN([@%:@include <stdio.h>
|
||||
AC_RUN_IFELSE([@%:@include <stdio.h>
|
||||
int main (int argc, char** argv) {
|
||||
FILE* fp = fopen("conftest.@S|@ac_ext", "rt");
|
||||
return (fp == NULL) ? 1 : fclose(fp); }],
|
||||
[libopts_cv_run_fopen_text=yes],[libopts_cv_run_fopen_text=no],[libopts_cv_run_fopen_text=no]
|
||||
) # end of TRY_RUN
|
||||
) # end of RUN_IFELSE
|
||||
]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_text
|
||||
AC_MSG_RESULT([${libopts_cv_run_fopen_text}])
|
||||
if test "X${libopts_cv_run_fopen_text}" != Xno
|
||||
@@ -390,7 +399,7 @@ return (fp == NULL) ? 1 : fclose(fp); }],
|
||||
AC_DEFINE([FOPEN_TEXT_FLAG],"",
|
||||
[fopen(3) accepts a 't' in the mode flag])
|
||||
fi
|
||||
|
||||
|
||||
]) # end of AC_DEFUN of LIBOPTS_RUN_FOPEN_TEXT
|
||||
|
||||
|
||||
@@ -406,7 +415,7 @@ AC_DEFUN([LIBOPTS_DISABLE_OPTIONAL_ARGS],[
|
||||
AC_DEFINE([NO_OPTIONAL_OPT_ARGS], [1],
|
||||
[Define this if optional arguments are disallowed])
|
||||
fi
|
||||
|
||||
|
||||
]) # end of AC_DEFUN of LIBOPTS_DISABLE_OPTIONAL_ARGS
|
||||
|
||||
|
||||
@@ -443,15 +452,13 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS],[
|
||||
|
||||
dnl @synopsis LIBOPTS_CHECK
|
||||
dnl
|
||||
dnl Time-stamp: "2012-02-25 12:54:32 bkorb"
|
||||
dnl
|
||||
dnl If autoopts-config works, add the linking information to LIBS.
|
||||
dnl Otherwise, add ``libopts-${ao_rev}'' to SUBDIRS and run all
|
||||
dnl the config tests that the library needs. Invoke the
|
||||
dnl "INVOKE_LIBOPTS_MACROS" macro iff we are building libopts.
|
||||
dnl
|
||||
dnl This file is part of AutoGen.
|
||||
dnl AutoGen Copyright (c) 1992-2012 by Bruce Korb - all rights reserved
|
||||
dnl AutoGen Copyright (C) 1992-2013 by Bruce Korb - all rights reserved
|
||||
dnl
|
||||
dnl AutoGen is free software: you can redistribute it and/or modify it
|
||||
dnl under the terms of the GNU General Public License as published by the
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
# liboptschk.m4 serial 2 (autogen - 5.11.4)
|
||||
dnl Copyright (c) 2005-2012 by Bruce Korb - all rights reserved
|
||||
dnl Copyright (C) 2005-2013 by Bruce Korb - all rights reserved
|
||||
dnl
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
dnl
|
||||
dnl Time-stamp: "2010-12-07 12:57:56 bkorb"
|
||||
dnl
|
||||
AC_DEFUN([ag_FIND_LIBOPTS],
|
||||
[if test "X${ac_cv_header_autoopts_options_h}" = Xno
|
||||
then :
|
||||
|
||||
Reference in New Issue
Block a user