diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-12-16 15:16:56 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-12-16 15:16:56 (GMT) |
commit | 2031d40f819aee5bbd3c5b550228204ff2897e0c (patch) | |
tree | 17212c52fd861f90a90e09a29d2b86dad6bd9f4d /unix | |
parent | f632ecb40650fc82b537e938435e44e2c1f2fb14 (diff) | |
download | tcl-2031d40f819aee5bbd3c5b550228204ff2897e0c.zip tcl-2031d40f819aee5bbd3c5b550228204ff2897e0c.tar.gz tcl-2031d40f819aee5bbd3c5b550228204ff2897e0c.tar.bz2 |
Add checks to the configure script for mknod, tcdrain and uname, for systems (like VxWorks) which don't have it. See [aa4d088e5d]
Diffstat (limited to 'unix')
-rwxr-xr-x | unix/configure | 300 | ||||
-rw-r--r-- | unix/configure.in | 3 |
2 files changed, 303 insertions, 0 deletions
diff --git a/unix/configure b/unix/configure index 11ee9ef..8981ef8 100755 --- a/unix/configure +++ b/unix/configure @@ -10687,6 +10687,306 @@ _ACEOF fi +echo "$as_me:$LINENO: checking for fork" >&5 +echo $ECHO_N "checking for fork... $ECHO_C" >&6 +if test "${ac_cv_func_fork+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define fork to an innocuous variant, in case <limits.h> declares fork. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define fork innocuous_fork + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char fork (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef fork + +/* 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 fork (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_fork) || defined (__stub___fork) +choke me +#else +char (*f) () = fork; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != fork; + ; + 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_func_fork=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_fork=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_fork" >&5 +echo "${ECHO_T}$ac_cv_func_fork" >&6 +if test $ac_cv_func_fork = yes; then + : +else + +cat >>confdefs.h <<\_ACEOF +#define NO_FORK 1 +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for mknod" >&5 +echo $ECHO_N "checking for mknod... $ECHO_C" >&6 +if test "${ac_cv_func_mknod+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define mknod to an innocuous variant, in case <limits.h> declares mknod. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define mknod innocuous_mknod + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char mknod (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef mknod + +/* 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 mknod (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_mknod) || defined (__stub___mknod) +choke me +#else +char (*f) () = mknod; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != mknod; + ; + 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_func_mknod=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_mknod=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_mknod" >&5 +echo "${ECHO_T}$ac_cv_func_mknod" >&6 +if test $ac_cv_func_mknod = yes; then + : +else + +cat >>confdefs.h <<\_ACEOF +#define NO_MKNOD 1 +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for tcdrain" >&5 +echo $ECHO_N "checking for tcdrain... $ECHO_C" >&6 +if test "${ac_cv_func_tcdrain+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define tcdrain to an innocuous variant, in case <limits.h> declares tcdrain. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define tcdrain innocuous_tcdrain + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char tcdrain (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef tcdrain + +/* 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 tcdrain (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_tcdrain) || defined (__stub___tcdrain) +choke me +#else +char (*f) () = tcdrain; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != tcdrain; + ; + 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_func_tcdrain=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_tcdrain=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_tcdrain" >&5 +echo "${ECHO_T}$ac_cv_func_tcdrain" >&6 +if test $ac_cv_func_tcdrain = yes; then + : +else + +cat >>confdefs.h <<\_ACEOF +#define NO_TCDRAIN 1 +_ACEOF + +fi + echo "$as_me:$LINENO: checking for uname" >&5 echo $ECHO_N "checking for uname... $ECHO_C" >&6 if test "${ac_cv_func_uname+set}" = set; then diff --git a/unix/configure.in b/unix/configure.in index 62ab90e..55f09eb 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -215,6 +215,9 @@ AC_REPLACE_FUNCS(mkstemp opendir strtol waitpid) AC_CHECK_FUNC(strerror, , [AC_DEFINE(NO_STRERROR, 1, [Do we have strerror()])]) AC_CHECK_FUNC(getwd, , [AC_DEFINE(NO_GETWD, 1, [Do we have getwd()])]) AC_CHECK_FUNC(wait3, , [AC_DEFINE(NO_WAIT3, 1, [Do we have wait3()])]) +AC_CHECK_FUNC(fork, , [AC_DEFINE(NO_FORK, 1, [Do we have fork()])]) +AC_CHECK_FUNC(mknod, , [AC_DEFINE(NO_MKNOD, 1, [Do we have mknod()])]) +AC_CHECK_FUNC(tcdrain, , [AC_DEFINE(NO_TCDRAIN, 1, [Do we have tcdrain()])]) AC_CHECK_FUNC(uname, , [AC_DEFINE(NO_UNAME, 1, [Do we have uname()])]) if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ |