📄 configure
字号:
#!/bin/sh# @(#) $Id: Configure,v 1.11 1993/07/21 01:58:08 lasse Exp $# Configure for cforms.#REPL=""CFLAGS="-g"config=src/config.hfindpath(){ dirs=`IFS=: set - $PATH; echo $*` for d in $dirs do if [ -x $d/$1 ]; then echo $d/$1 return 0 fi done return 1}if [ -f /etc/inittab ]; then CFLAGS="$CFLAGS -DSIGNAL_VOID -DSYSV" if [ -d /proc ]; then CFLAGS="$CFLAGS -DSVR4" fielse CFLAGS="$CFLAGS -DSIGNAL_INT"firm -f src/config.hecho "/* Do not edit this file it is created by Configure */" >> $configecho "#include <stdio.h>" >> $configecho "#include <curses.h>" >> $configecho "#include <ctype.h>" >> $configecho "#include <assert.h>" >> $configecho "#include <signal.h>" >> $configecho "#include <stdarg.h>" >> $configif [ -f /usr/include/stdlib.h ]; then echo "#include <stdlib.h>" >> $configelif [ -f /usr/include/malloc.h ]; then echo "#include <malloc.h>" >> $configfiif [ -f /usr/include/string.h ]; then echo "#include <string.h>" >> $configelif [ -f /usr/include/strings.h ]; then echo "#include <strings.h>" >> $configfiif [ -f /usr/include/memory.h ]; then echo "#include <memory.h>" >> $configfiif [ -f /usr/include/unistd.h ]; then echo "#include <unistd.h>" >> $configelse echo "extern int read(int, void *, unsigned);" >> $config echo "extern int write(int, void *, unsigned);" >> $configfiif [ ! -f /usr/include/stdarg.h ]; then echo "You might have problem with the file /usr/include/stdarg.h" >&2fiCC=`findpath cc`GCC=`findpath gcc`CP=`findpath cp`LATEX=`findpath latex`RANLIB=`findpath ranlib`YACC=`findpath yacc`if [ -z "$YACC" ]; then YACC=`findpath bison` if [ -z "$YACC" ]; then echo "I could not find niether yacc nor bison, you're in trouble" else YACC="$YACC -y" fifi## CC#if [ ! -z "$GCC" ]; then REPL="$REPL -e 's%^@CC%CC = $GCC -ansi -Wcast-qual -Wimplicit -Wreturn-type -Wswitch -Wcomments -Wtrigraphs -Wpointer-arith%'"elif [ ! -z "$CC" ]; then REPL="$REPL -e 's%^@CC%$CC = CC%'"else echo "no compiler found" >&2 exit 1fi## CP#if [ ! -z "$CP" ]; then REPL="$REPL -e 's%^@CP%CP = $CP'%"else echo "the command cp not found" >&2 exit 1fi## LATEX#if [ ! -z "$LATEX" ]; then REPL="$REPL -e 's%^@LATEX%LATEX = $LATEX'%"else REPL="$REPL -e 's%^@LATEX%LATEX = echo '%"fi## RANLIB#if [ ! -z "$RANLIB" ]; then REPL="$REPL -e 's%^@RANLIB%RANLIB = $RANLIB'%"else REPL="$REPL -e 's%^@RANLIB%RANLIB = echo '%"fi## YACC#if [ ! -z "$YACC" ]; then REPL="$REPL -e 's%^@YACC%YACC = $YACC'%"else echo "the command bison or yacc not found" >&2 exit 1fi## SUN specific.#if [ -f /vmunix -a -f /usr/include/strings.h ]; then if [ ! -f /usr/5include/curses.h ]; then echo "Your Sun has not got the system 5 compability package" >&2 exit 1 fi REPL="$REPL -e 's%^@CFLAGS%CFLAGS = $CFLAGS -I/usr/5include -I../include \$(DEFINES)%'" REPL="$REPL -e 's%^@LDFLAGS%LDFLAGS = -ly -L/usr/5lib -lcurses -ltermlib /usr/5lib/libc.a%'" REPL="$REPL -e 's%^@LDFLAGS%LDFLAGS = $CFLAGS -lcurses -ltermlib'%"else REPL="$REPL -e 's%^@CFLAGS%CFLAGS = $CFLAGS -I../include \$(DEFINES)%'" REPL="$REPL -e 's%^@LDFLAGS%LDFLAGS = -ly -lcurses -ltermlib'%"fi( echo "#" echo "# Don't edit in this file, use Makefile.src" eval sed $REPL Makefile.src ) > Makefile
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -