checks for time functions added

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4224 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-10-27 19:43:07 +00:00
parent 76db86e7e1
commit afc31813f6
3 changed files with 513 additions and 303 deletions

697
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1355,6 +1355,9 @@ dnl ---------------------------------------------------------------------------
dnl notice that /usr/include should not be in this list, otherwise it breaks
dnl compilation on Solaris/gcc because standard headers are included instead
dnl of the gcc ones
dnl
dnl Also try to put all directories which may contain X11R6 before those which
dnl may contain X11R5/4 - we want to use R6 on machines which have both!
SEARCH_INCLUDE="\
/usr/local/include \
\
@@ -1368,16 +1371,15 @@ SEARCH_INCLUDE="\
\
/usr/Motif1.2/include \
/usr/dt/include \
/usr/openwin/include \
\
/usr/include/Xm \
\
/usr/X11R6/include \
/usr/X11R6.4/include \
/usr/X11R5/include \
/usr/X11R4/include \
\
/usr/X11R6/lib \
/usr/X11R5/lib \
/usr/X11R4/lib \
\
/usr/include/X11R6 \
/usr/include/X11R5 \
/usr/include/X11R4 \
@@ -1416,7 +1418,6 @@ SEARCH_INCLUDE="\
/usr/local/x11r5/include \
/usr/lpp/Xamples/include \
\
/usr/openwin/include \
/usr/openwin/share/include \
"
@@ -2287,11 +2288,6 @@ if test "$wxUSE_APPLE_IEEE" = "yes"; then
AC_DEFINE(wxUSE_APPLE_IEEE)
fi
if test "$wxUSE_TIMEDATE" = "yes"; then
AC_DEFINE(wxUSE_TIMEDATE)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS typetest"
fi
if test "$wxUSE_WAVE" = "yes"; then
AC_DEFINE(wxUSE_WAVE)
fi
@@ -2354,12 +2350,6 @@ if test "$wxUSE_LONGLONG" = "yes"; then
AC_DEFINE(wxUSE_LONGLONG)
fi
if test "$wxUSE_SOCKETS" = "yes" ; then
AC_DEFINE(wxUSE_SOCKETS)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS wxsocket"
INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS protocol"
fi
if test "$wxUSE_DIALUP_MANAGER" = "yes" ; then
AC_DEFINE(wxUSE_DIALUP_MANAGER)
fi
@@ -2372,11 +2362,75 @@ if test "$wxUSE_SERIAL" = "yes" ; then
AC_DEFINE(wxUSE_SERIAL)
fi
dnl ------------------------------------------------------------------------
dnl time/date functions
dnl ------------------------------------------------------------------------
if test "$wxUSE_TIMEDATE" = "yes"; then
AC_CHECK_FUNCS(gettimeofday localtime ftime)
if test "$ac_cv_func_gettimeofday" = "yes"; then
AC_CACHE_CHECK([whether gettimeofday takes two arguments],
wx_cv_func_gettimeofday_has_2_args,
[
dnl on some _really_ old systems it takes only 1 argument
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE(
[
#include <sys/time.h>
#include <unistd.h>
],
[
struct timeval tv;
struct timezone tz;
gettimeofday(&tv, &tz);
],
wx_cv_func_gettimeofday_has_2_args=yes,
AC_TRY_COMPILE(
[
#include <sys/time.h>
#include <unistd.h>
],
[
struct timeval tv;
gettimeofday(&tv);
],
wx_cv_func_gettimeofday_has_2_args=no,
wx_cv_func_gettimeofday_has_2_args=unknown
)
)
AC_LANG_RESTORE
])
if test "$wx_cv_func_gettimeofday_has_2_args" != "yes"; then
AC_DEFINE(WX_GETTIMEOFDAY_NO_TZ)
fi
fi
AC_DEFINE(wxUSE_TIMEDATE)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS typetest"
fi
dnl ------------------------------------------------------------------------
dnl wxSocket
dnl ------------------------------------------------------------------------
if test "$wxUSE_SOCKETS" = "yes"; then
dnl under Solaris, socket functions live in -lsocket
AC_CHECK_FUNC(socket,,
AC_CHECK_LIB(socket, socket,
INET_LINK="$INET_LINK -lsocket",
[
AC_MSG_WARN([socket library not found - sockets will be disabled])
wxUSE_SOCKETS=no
]
)
)
fi
if test "$wxUSE_SOCKETS" = "yes" ; then
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
dnl determine the type of third argument for getsockname
@@ -2393,18 +2447,15 @@ if test "$wxUSE_SOCKETS" = "yes"; then
[#include <sys/socket.h>],
[int len; getsockname(0, 0, &len);],
AC_DEFINE(SOCKLEN_T, int) AC_MSG_RESULT(int),
AC_MSG_RESULT(unknown)
)
AC_MSG_RESULT(unknown)
)
)
)
AC_LANG_RESTORE
dnl under Solaris, socket functions live in -lsocket
AC_CHECK_FUNC(socket,,
AC_CHECK_LIB(socket, socket,
INET_LINK="$INET_LINK -lsocket"
)
)
AC_DEFINE(wxUSE_SOCKETS)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS wxsocket"
INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS protocol"
fi
dnl ---------------------------------------------------------------------------
@@ -3040,7 +3091,9 @@ AC_OUTPUT([
if test ! -d include/wx/${TOOLKIT_DIR}; then
mkdir include/wx/${TOOLKIT_DIR}
fi
mv -f setup.h include/wx/${TOOLKIT_DIR}/setup.h
if test -f setup.h; then
mv -f setup.h include/wx/${TOOLKIT_DIR}/setup.h
fi
],
[
TOOLKIT_DIR="${TOOLKIT_DIR}"

View File

@@ -580,9 +580,22 @@
/* The type of 3rd argument to getsockname() - usually size_t or int */
#undef SOCKLEN_T
/* gettimeofday() usually takes 2 arguments, but some really old systems might
* have only one, in which case define WX_GETTIMEOFDAY_NO_TZ */
#undef WX_GETTIMEOFDAY_NO_TZ
/* Define if you have dlopen() */
#undef HAVE_DLOPEN
/* Define if you have gettimeofday() */
#undef HAVE_GETTIMEOFDAY
/* Define if you have ftime() */
#undef HAVE_FTIME
/* Define if you have localtime() */
#undef HAVE_LOCALTIME
/* Define if you have nanosleep() */
#undef HAVE_NANOSLEEP
@@ -661,9 +674,6 @@
/* Define if you have the vfork function. */
#undef HAVE_VFORK
/* Define if you have the vsnprintf function. */
#undef HAVE_VSNPRINTF
/* Define if you have the <X11/XKBlib.h> header file. */
#undef HAVE_X11_XKBLIB_H