summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorasau <asau@pkgsrc.org>2009-12-23 00:32:17 +0000
committerasau <asau@pkgsrc.org>2009-12-23 00:32:17 +0000
commiteedc014736c24a0df9d3d6704c226f4c0ffd945d (patch)
tree550014d0fa32f24550e87056cde1b0c64e3514e3 /lang
parenta9856f6cd01ec974cdbe76ca5f9a322fb2f2492f (diff)
downloadpkgsrc-eedc014736c24a0df9d3d6704c226f4c0ffd945d.tar.gz
Detect absense of mkdtemp and mkstemp functions.
Should unbreak build on Solaris. PR pkg/42428
Diffstat (limited to 'lang')
-rw-r--r--lang/f2c/files/f2c.mk11
1 files changed, 5 insertions, 6 deletions
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