minor automake fixes.

This commit is contained in:
crs 2002-08-01 11:45:21 +00:00
parent 7900d9fe41
commit 3f13217929
4 changed files with 29 additions and 14 deletions

View File

@ -1,14 +1,21 @@
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
dnl initialize
AC_INIT(lib/base/common.h) AC_INIT(lib/base/common.h)
AM_CONFIG_HEADER(config.h)
AC_CONFIG_AUX_DIR(config) AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE(synergy, 1.0.0)
dnl current version
MAJOR_VERSION=0
MINOR_VERSION=9
RELEASE_VERSION=8
dnl initialize automake
AM_INIT_AUTOMAKE(synergy, $MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION)
AM_CONFIG_HEADER(config.h)
dnl information on the package dnl information on the package
dnl checks for programs dnl checks for programs
AC_PROG_CC
AC_PROG_CXX AC_PROG_CXX
AC_PROG_RANLIB AC_PROG_RANLIB
@ -20,7 +27,6 @@ AC_HEADER_STDC
AC_CHECK_HEADERS([unistd.h sys/time.h]) AC_CHECK_HEADERS([unistd.h sys/time.h])
AC_CHECK_HEADERS([istream ostream]) AC_CHECK_HEADERS([istream ostream])
AC_CHECK_HEADERS([windows.h]) AC_CHECK_HEADERS([windows.h])
AC_HEADER_SYS_WAIT
AC_HEADER_TIME AC_HEADER_TIME
AC_PATH_X AC_PATH_X
AC_PATH_XTRA AC_PATH_XTRA
@ -37,26 +43,27 @@ AC_CHECK_SIZEOF(char, 1)
AC_CHECK_SIZEOF(short, 2) AC_CHECK_SIZEOF(short, 2)
AC_CHECK_SIZEOF(int, 2) AC_CHECK_SIZEOF(int, 2)
AC_CHECK_SIZEOF(long, 4) AC_CHECK_SIZEOF(long, 4)
dnl should check for bool dnl require bool support
dnl should require template support dnl require template support
dnl should require exception support dnl require exception support
dnl require C++ casting support
dnl require mutable support
dnl checks for library functions dnl checks for library functions
dnl AC_TYPE_SIGNAL dnl AC_TYPE_SIGNAL
dnl AC_FUNC_FORK AC_FUNC_FORK
AC_FUNC_MEMCMP AC_FUNC_MEMCMP
AC_FUNC_STRFTIME AC_FUNC_STRFTIME
AC_CHECK_FUNCS(gmtime_r) AC_CHECK_FUNCS(gmtime_r)
AC_CHECK_FUNCS(getpwuid_r) AC_CHECK_FUNCS(getpwuid_r)
AC_CHECK_FUNCS(vsnprintf)
dnl use AC_REPLACE_FUNCS() for stuff in string.h dnl use AC_REPLACE_FUNCS() for stuff in string.h
dnl checks for system services dnl checks for system services
dnl adjust variables for X11 and pthreads dnl adjust variables for X11 and pthreads
CFLAGS="$CFLAGS $X_CFLAGS $PTHREAD_CFLAGS"
CXXFLAGS="$CXXFLAGS $X_CFLAGS $PTHREAD_CFLAGS" CXXFLAGS="$CXXFLAGS $X_CFLAGS $PTHREAD_CFLAGS"
CC="$PTHREAD_CC"
AC_OUTPUT([ AC_OUTPUT([
Makefile Makefile

View File

@ -196,9 +196,6 @@ CStopwatch::getClock() const
# include <time.h> # include <time.h>
# endif # endif
#endif #endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
double double
CStopwatch::getClock() const CStopwatch::getClock() const

View File

@ -49,7 +49,16 @@ CCondVarBase::getMutex() const
#include "CThread.h" #include "CThread.h"
#include <pthread.h> #include <pthread.h>
#include <sys/time.h> #if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
#include <cerrno> #include <cerrno>
void void

View File

@ -40,6 +40,7 @@ CUnixPlatform::uninstallDaemon(const char*)
int int
CUnixPlatform::daemonize(const char* name, DaemonFunc func) CUnixPlatform::daemonize(const char* name, DaemonFunc func)
{ {
#if HAVE_WORKING_FORK
// fork so shell thinks we're done and so we're not a process // fork so shell thinks we're done and so we're not a process
// group leader // group leader
switch (fork()) { switch (fork()) {
@ -55,6 +56,7 @@ CUnixPlatform::daemonize(const char* name, DaemonFunc func)
// parent exits // parent exits
exit(0); exit(0);
} }
#endif
// become leader of a new session // become leader of a new session
setsid(); setsid();