From: hackbard Date: Wed, 14 May 2003 18:52:40 +0000 (+0000) Subject: added configure + decker.ttf, small fix in nlsop.c X-Git-Tag: fpb~55 X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df989494b176f1a2440b1ed5ee0204d892de3dc2;p=physik%2Fnlsop.git added configure + decker.ttf, small fix in nlsop.c --- diff --git a/configure b/configure new file mode 100755 index 0000000..31ed2e9 --- /dev/null +++ b/configure @@ -0,0 +1,95 @@ +#!/bin/sh + +name="nlsop" + +#defaults +prefix=/usr +dfblib="" +dfbinc="" + +echo $run_cmd + +usage() { + echo "usage $0 " + echo "options:" + echo "--prefix=PREFIX specify install prefix" + echo "--with-dfblib=DIR specify directfb lib dir" + echo "--with-dfbinc=DIR specify directfb include dir" + echo + } + +while [ "$1" ]; do + case "`echo $1 | awk -F= '{ print $1 }'`" in + --prefix) prefix=`echo $1 | awk -F= '{ print $2 }'`; shift;; + --help) usage; shift 1;; + --with-dfblib) dfblib=`echo $1 | awk -F= '{ print $2 }'`; shift;; + --with-dfbinc) dfbinc=`echo $1 | awk -F= '{ print $2 }'`; shift;; + esac +done + +echo "checking for dfb stuff ..." +dfb_inc_dir="0" +if [ -z "$dfbinc" ]; then + for i in /usr/include /usr/local/include; do + if [ -d $i/directfb ]; then + dfb_inc_dir=$i/directfb + fi + done +else + if [ -d $dfbinc/directfb ]; then + dfb_inc_dir=$dfbinc/directfb + fi +fi +if [ "$dfb_inc_dir" = "0" ]; then + echo "dfb includes missing ..." + exit 1 +fi +dfb_lib_dir="0" +if [ -z "$dfblib" ]; then + for i in /usr/lib /usr/local/lib; do + if [ -f $i/libdirectfb.so ]; then + dfb_lib_dir=$i + fi + done +else + if [ -f $dfblib/libdirectfb.so ]; then + dfb_lib_dir=$dfblib + fi +fi +if [ "$dfb_lib_dir" = "0" ]; then + echo "dfb libs missing ..." + exit 1 +fi +echo "directfb installation looks good :)" + +echo "creating Makefile" +cat > Makefile << EOF +# $name Makefile, created `date` + +INCLUDEDIR = /usr/include +CFLAGS = -DDEBUG -DUSE_DFB_API -DFONT=\"$prefix/share/$name/decker.ttf\" -O3 -Wall -I$dfb_inc_dir +LIBS = -L$dfb_lib_dir -ldirectfb + +OBJS = random.o dfbapi.o +OBJS2 = $name + +$name: \$(OBJS) + \$(CC) \$(CFLAGS) -o \$@ \$(OBJS) \$(LIBS) ${name}.c + +all: $name + +clean: + rm \$(OBJS) \$(OBJS2) + +remake: clean all + +install: + mkdir -p $prefix/bin + cp $name $prefix/bin + chmod 755 $prefix/bin/$name + mkdir -p $prefix/share/$name + cp decker.ttf $prefix/share/$name + chmod 644 $prefix/share/$name/decker.ttf +EOF + +echo "done" diff --git a/decker.ttf b/decker.ttf new file mode 100644 index 0000000..5e721cf Binary files /dev/null and b/decker.ttf differ diff --git a/nlsop.c b/nlsop.c index 041fac0..736003a 100644 --- a/nlsop.c +++ b/nlsop.c @@ -271,6 +271,8 @@ int main(int argc,char **argv) b_ap=B_AP; cc=CC; nowait=0; + quit=0; + escape=0; strcpy(s_file,""); strcpy(l_file,""); strcpy(r_file,"");