Detect absense of mkdtemp and mkstemp functions.

Should unbreak build on Solaris. PR pkg/42428
This commit is contained in:
asau 2009-12-23 00:32:17 +00:00
parent a7d0a6e696
commit 74ff956e70

View file

@ -41,13 +41,12 @@ CPPFLAGS+= -I$(F2CSRCDIR) # grammar
DPSRCS+= sysdep.hd
# Handle obsolete systems like Solaris:
sysdep.hd:
echo '/*OK*/' > $@ # stub
# sysdep.hd:
# if $(CC) sysdeptest.c; then echo '/*OK*/' > sysdep.hd;\
# elif $(CC) -DNO_MKDTEMP sysdeptest.c; then echo '#define NO_MKDTEMP' >sysdep.hd;\
# else echo '#define NO_MKDTEMP' >sysdep.hd; echo '#define NO_MKSTEMP' >>sysdep.hd; fi
# rm -f a.out
if $(CC) sysdeptest.c; then echo '/*OK*/' > sysdep.hd; \
elif $(CC) -DNO_MKDTEMP sysdeptest.c; then echo '#define NO_MKDTEMP' > sysdep.hd; \
else { echo '#define NO_MKDTEMP'; echo '#define NO_MKSTEMP'; } > sysdep.hd; fi
rm -f a.out
CLEANFILES+= sysdep.hd # sysdep.hd tokdefs.h f2c.t