dnl dnl Copyright 2005-2006 Intel Corporation dnl dnl Licensed under the Apache License, Version 2.0 (the "License"); dnl you may not use this file except in compliance with the License. dnl You may obtain a copy of the License at dnl dnl http://www.apache.org/licenses/LICENSE-2.0 dnl dnl Unless required by applicable law or agreed to in writing, software dnl distributed under the License is distributed on an "AS IS" BASIS, dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. dnl See the License for the specific language governing permissions and dnl limitations under the License. dnl dnl ------------------------------------------------------------------------- dnl Checks for system programs dnl ------------------------------------------------------------------------- AC_DEFUN(AC_OASYS_SYSTEM_PROGRAMS, [ AC_PROG_AWK AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_RANLIB ]) dnl ------------------------------------------------------------------------- dnl Checks for system libraries dnl ------------------------------------------------------------------------- AC_DEFUN(AC_OASYS_SYSTEM_LIBRARIES, [ AC_SEARCH_LIBS(pthread_create, pthread, [], AC_MSG_ERROR([can't find required library function (pthread_create)])) AC_CHECK_FUNC(pthread_yield, [], [AC_SEARCH_LIBS(sched_yield, rt, [], AC_MSG_ERROR([can't find required library function (pthread_yield or sched_yield)]))]) AC_SEARCH_LIBS(pthread_setspecific, pthread, AC_DEFINE_UNQUOTED(HAVE_PTHREAD_SETSPECIFIC, 1, [whether pthread_setspecific is defined]), []) AC_SEARCH_LIBS(socket, socket, [], AC_MSG_ERROR([can't find required library function (socket)])) AC_SEARCH_LIBS(gethostbyname, nsl, [], AC_MSG_ERROR([can't find required library function (gethostbyname)])) AC_SEARCH_LIBS(xdr_int, rpc, [], AC_MSG_ERROR([can't find required library function (xdr_int)])) ]) dnl ------------------------------------------------------------------------- dnl Checks for header files. dnl ------------------------------------------------------------------------- AC_DEFUN(AC_OASYS_SYSTEM_HEADERS, [ AC_HEADER_STDC AC_CHECK_HEADERS([err.h execinfo.h stdint.h string.h synch.h sys/cdefs.h sys/types.h]) ]) dnl ------------------------------------------------------------------------- dnl Checks for typedefs, structures, and compiler characteristics. dnl ------------------------------------------------------------------------- AC_DEFUN(AC_OASYS_SYSTEM_TYPES, [ AC_C_CONST AC_C_INLINE AC_C_VOLATILE AC_TYPE_MODE_T AC_MSG_CHECKING([value for _FILE_OFFSET_BITS preprocessor symbol]) ac_file_offset_bits=64 AC_ARG_WITH(file-offset-bits, AC_HELP_STRING([--with-file-offset-bits=N], [value for _FILE_OFFSET_BITS (default 64)]), ac_file_offset_bits=$withval) AC_MSG_RESULT($ac_file_offset_bits) if test $ac_file_offset_bits = 64 ; then LFSDEFS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" else LFSDEFS="-D_FILE_OFFSET_BITS=$ac_file_offset_bits" fi AC_SUBST(LFSDEFS) oasys_ac_cppflags_save="$CPPFLAGS" CPPFLAGS="$LFSDEFS $CPPFLAGS" AC_CHECK_SIZEOF(off_t) CPPFLAGS="$oasys_ac_cppflags_save" AC_TYPE_SIGNAL AC_TYPE_SIZE_T AC_CHECK_TYPES([ptrdiff_t]) AC_CHECK_TYPES([uint32_t]) AC_CHECK_TYPES([u_int32_t]) ]) dnl ------------------------------------------------------------------------- dnl Checks for library functions. dnl ------------------------------------------------------------------------- AC_DEFUN(AC_OASYS_SYSTEM_FUNCTIONS, [ AC_OASYS_FUNC_FPCLASSIFY AC_CHECK_FUNCS([fdatasync getaddrinfo gethostbyname gethostbyname_r getopt_long inet_aton inet_pton pthread_yield sched_yield]) ])