dnl $MirBSD: src/bin/ksh/configure.in,v 2.1 2004/12/10 18:09:41 tg Exp $ dnl dnl Process this file with autoconf to produce a configure script dnl AC_INIT(c_ksh.c) test -s config.h.in || sed -e 's!^/\* #undef \(.*\) \*/!#undef \1!' \ -e 's!^#define \(.*\) 1!#undef \1!' config.h.in AC_CONFIG_HEADER(config.h) dnl dnl dnl Start of auto-configuration stuff... dnl AC_PROG_CC AC_PROG_CPP AC_PROG_GCC_TRADITIONAL dnl this incorperates AC_AIX, AC_ISC_POSIX and AC_MINIX tests and does others KSH_OS_TYPE dnl dnl Program name munging stuff (prefix, suffix, transform) AC_ARG_PROGRAM dnl dnl Headers dnl AC_HEADER_DIRENT KSH_UNISTD_H KSH_TERM_CHECK AC_CHECK_HEADERS(sys/param.h sys/types.h sys/resource.h sys/time.h \ stddef.h stdlib.h stdint.h string.h limits.h paths.h \ memory.h fcntl.h values.h ulimit.h) AC_HEADER_TIME KSH_HEADER_SYS_WAIT dnl dnl Typedefs dnl dnl (don't use AC_TYPE_XXX() 'cause it doesn't check word boundaries) KSH_CHECK_H_TYPE(off_t, for off_t in sys/types.h, , long) KSH_CHECK_H_TYPE(mode_t, for mode_t in sys/types.h, , short) KSH_CHECK_H_TYPE(pid_t, for pid_t in sys/types.h, , int) KSH_CHECK_H_TYPE(uid_t, for uid_t in sys/types.h, , int) if test $ac_cv_type_uid_t = no; then AC_DEFINE(gid_t, int) fi define([AC_PROVIDE_AC_TYPE_UID_T],) AC_TYPE_SIGNAL case $ac_cv_type_signal in int) ksh_cv_signal_retval=0 ;; void) ksh_cv_signal_retval= ;; *) AC_MSG_ERROR(Internal erorr: unknown signal return type: $ac_cv_type_signal) esac AC_DEFINE_UNQUOTED(RETSIGVAL, $ksh_cv_signal_retval) AC_CHECK_SIZEOF(int, 4) AC_CHECK_SIZEOF(long, 4) dnl sh.h sets INT32 to int or long as appropriate. Some burnt systems, such dnl as NeXT's, clock_t is in sys/time.h (in non-posix mode). KSH_CHECK_H_TYPE(clock_t, [[for clock_t in any of , and ]], [ #ifdef HAVE_SYS_TIME_H #include #endif /* HAVE_SYS_TIME_H */ #include ], INT32) KSH_CHECK_H_TYPE(sigset_t, for sigset_t in and , [#include ], unsigned) KSH_RLIM_CHECK dnl dnl Library functions dnl KSH_MEMMOVE KSH_MEMSET AC_CHECK_FUNCS(arc4random arc4random_addrandom arc4random_push confstr \ dup2 flock getcwd getgroups getpagesize getrusage getwd killpg \ mkstemp nice random revoke setrlimit setsid srandom strcasecmp \ strerror strlcat strlcpy strstr sysconf tcsetpgrp ulimit valloc \ wait3 waitpid) AC_CHECK_FUNCS(sigsetjmp _setjmp, break) AC_FUNC_MMAP KSH_FUNC_LSTAT KSH_SYS_ERRLIST KSH_SYS_SIGLIST KSH_TIME_DECLARED KSH_TIMES_CHECK dnl dnl Structures dnl AC_HEADER_STAT AC_STRUCT_ST_RDEV dnl dnl Compiler characteristics dnl AC_C_CONST KSH_C_VOID KSH_C_VOLATILE KSH_C_FUNC_ATTR dnl dnl System services dnl AC_SYS_INTERPRETER if test $ac_cv_sys_interpreter = no; then AC_DEFINE(SHARPBANG) fi dnl dnl Misc ksh tests dnl KSH_DUP2_CLEXEC_CHECK KSH_SIGNAL_CHECK KSH_PGRP_CHECK KSH_PGRP_SYNC KSH_OPENDIR_CHECK KSH_DEV_FD ac_clean_files="$ac_clean_files a.out" AC_OUTPUT