* if we find a Sun CC rather check dependencies with -xM instead of -M
STATICDATA_DIR=@MAKE_STATICDATA_DIR@
DOC_DIR=@MAKE_DOC_DIR@
UTILBIN_DIR=@MAKE_UTILBIN_DIR@
STATICDATA_DIR=@MAKE_STATICDATA_DIR@
DOC_DIR=@MAKE_DOC_DIR@
UTILBIN_DIR=@MAKE_UTILBIN_DIR@
+DEPEND_FLAG=@DEPEND_FLAG@
all: $(TARGETS)
.SUFFIXES: .o .d .c
all: $(TARGETS)
.SUFFIXES: .o .d .c
CPPFLAGS=@CPPFLAGS@ -I. -I ./include/
DATABASE=@DATABASE@
DEFS=@DEFS@
CPPFLAGS=@CPPFLAGS@ -I. -I ./include/
DATABASE=@DATABASE@
DEFS=@DEFS@
-LDFLAGS=@LDFLAGS@ -rdynamic
LIBS=@LIBS@
LIBOBJS=@LIBOBJS@
INSTALL=@INSTALL@
LIBS=@LIBS@
LIBOBJS=@LIBOBJS@
INSTALL=@INSTALL@
.c.d:
@echo Checking dependencies for $<
.c.d:
@echo Checking dependencies for $<
- @$(CC) -M $(CPPFLAGS) $< | sed -e 's!$*.o!$*.o $*/.o $@!' > $@
+ @$(CC) $(DEPEND_FLAG) $(CPPFLAGS) $< | sed -e 's!$*.o!$*.o $*/.o $@!' > $@
@test -s $@ || rm -f $@
Makefile: $(srcdir)/Makefile.in config.status
@test -s $@ || rm -f $@
Makefile: $(srcdir)/Makefile.in config.status
dnl Checks for programs.
AC_PROG_CC
dnl Checks for programs.
AC_PROG_CC
dnl Set up system-dependent compiler flags.
if test "$GCC" = yes; then
if test "$CC" = icc; then
dnl Set up system-dependent compiler flags.
if test "$GCC" = yes; then
if test "$CC" = icc; then
+echo $CC snaothus---------------------
+AC_MSG_CHECKING([how to compile with POSIX threads])
+ if test -n "`$CC -V 2>&1 |grep Sun`"; then
+ DEPEND_FLAG=-xM;
+ else
+ DEPEND_FLAG=-M
+ fi
+AC_SUBST(DEPEND_FLAG)
+
AC_PROG_INSTALL
AC_PROG_YACC
missing_dir=`cd $ac_aux_dir && pwd`
AC_PROG_INSTALL
AC_PROG_YACC
missing_dir=`cd $ac_aux_dir && pwd`
dnl We want to test for the following in libc before checking for their
dnl respective libraries, because some systems (like Irix) have both, and the
dnl non-libc versions may be broken.
dnl We want to test for the following in libc before checking for their
dnl respective libraries, because some systems (like Irix) have both, and the
dnl non-libc versions may be broken.
-AC_CHECK_FUNCS(crypt gethostbyname connect )
+AC_CHECK_FUNCS(crypt gethostbyname connect flock)
dnl disable backtrace if we don't want it.
dnl disable backtrace if we don't want it.
AC_CACHE_CHECK([under the bed], ac_cv_under_the_bed, [
number=`date | cut -c 19`
case $number in
AC_CACHE_CHECK([under the bed], ac_cv_under_the_bed, [
number=`date | cut -c 19`
case $number in
*/
void lock_control(void)
{
*/
void lock_control(void)
{
/*
* TODO: solaris manpages describe this function, but the headers
* don't show it!
*/
/*
* TODO: solaris manpages describe this function, but the headers
* don't show it!
*/
if (flock(fileno(control_fp), (LOCK_EX | LOCK_NB))) {
lprintf(CTDL_EMERG, "citserver: unable to lock %s.\n", file_citadel_control);
lprintf(CTDL_EMERG, "Is another citserver already running?\n");
if (flock(fileno(control_fp), (LOCK_EX | LOCK_NB))) {
lprintf(CTDL_EMERG, "citserver: unable to lock %s.\n", file_citadel_control);
lprintf(CTDL_EMERG, "Is another citserver already running?\n");
/usr/bin/printf "This version of echo $ECHO supports $MINUS_e $MINUS_E.\n"
/usr/bin/printf "This version of echo $ECHO supports $MINUS_e $MINUS_E.\n"
-cat <<EOF >$C_FILE
-
-#start ofs the files which inturn removes any existing file
+#start of the files which inturn removes any existing file
/*
* $C_FILE
* Auto generated by mk_modules_init.sh DO NOT EDIT THIS FILE
/*
* $C_FILE
* Auto generated by mk_modules_init.sh DO NOT EDIT THIS FILE