mirror of https://github.com/BOINC/boinc.git
67 lines
1.7 KiB
Plaintext
67 lines
1.7 KiB
Plaintext
dnl Process this file with autoconf to produce a configure script.
|
|
AC_INIT(main.C)
|
|
AC_CANONICAL_SYSTEM
|
|
|
|
dnl Checks for programs.
|
|
AC_PROG_CC
|
|
AC_PROG_CPP
|
|
AC_PROG_RANLIB
|
|
|
|
AC_EGREP_CPP(yes,
|
|
[#ifdef _AIX
|
|
yes
|
|
#endif
|
|
], AC_DEFINE(unix))
|
|
|
|
case "$target" in
|
|
*-linux-*)
|
|
AC_DEFINE(GETSOCKOPT_SOCKLEN_T)
|
|
;;
|
|
*sysv5OpenUNIX8*)
|
|
AC_DEFINE(GETSOCKOPT_SIZE_T)
|
|
;;
|
|
esac
|
|
|
|
dnl Checks for libraries.
|
|
dnl Replace `main' with a function in -lm:
|
|
AC_CHECK_LIB(m, sin)
|
|
dnl Replace `main' with a function in -lnsl:
|
|
AC_CHECK_LIB(nsl, gethostbyaddr)
|
|
dnl Replace `main' with a function in -lsocket:
|
|
AC_CHECK_LIB(socket, setservent)
|
|
dnl Replace `main' with a function in -lgen:
|
|
AC_CHECK_LIB(gen, strfind)
|
|
AC_CHECK_LIB(gen, strfind, [ AC_DEFINE(HAVE_STRFIND) ] )
|
|
AC_CHECK_LIB(stdc++, cerr)
|
|
|
|
dnl Checks for header files.
|
|
AC_HEADER_DIRENT
|
|
AC_HEADER_STDC
|
|
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/select.h sys/statvfs.h sys/swap.h sys/systeminfo.h sys/socket.h sys/types.h dirent.h sys/utsname.h netdb.h netinet/in.h netinet/tcp.h arpa/inet.h sys/resource.h signal.h sys/wait.h)
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
AC_C_CONST
|
|
AC_TYPE_SIZE_T
|
|
AC_HEADER_TIME
|
|
AC_STRUCT_TM
|
|
|
|
dnl Checks for library functions.
|
|
AC_CHECK_FUNCS(select socket strstr lockf flock strftime)
|
|
|
|
AC_PATH_PROG(HAVE_SBIN_SENDMAIL, sendmail, 0, /usr/sbin)
|
|
AC_PATH_PROG(HAVE_LIB_SENDMAIL, sendmail, 0, /usr/lib)
|
|
if test "$ac_cv_path_HAVE_SBIN_SENDMAIL" = /usr/sbin/sendmail; then
|
|
AC_DEFINE(HAVE_SBIN_SENDMAIL)
|
|
fi
|
|
if test "$ac_cv_path_HAVE_LIB_SENDMAIL" = /usr/lib/sendmail; then
|
|
AC_DEFINE(HAVE_LIB_SENDMAIL)
|
|
fi
|
|
|
|
AC_EGREP_CPP(yes,
|
|
[#ifdef __APPLE__
|
|
yes
|
|
#endif
|
|
], AC_DEFINE(unix))
|
|
|
|
AC_OUTPUT(Makefile)
|