From eedc014736c24a0df9d3d6704c226f4c0ffd945d Mon Sep 17 00:00:00 2001 From: asau Date: Wed, 23 Dec 2009 00:32:17 +0000 Subject: Detect absense of mkdtemp and mkstemp functions. Should unbreak build on Solaris. PR pkg/42428 --- lang/f2c/files/f2c.mk | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lang/f2c') diff --git a/lang/f2c/files/f2c.mk b/lang/f2c/files/f2c.mk index 7e81ac6d287..eef846c2d09 100644 --- a/lang/f2c/files/f2c.mk +++ b/lang/f2c/files/f2c.mk @@ -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 -- cgit v1.2.3