home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dream 52
/
Amiga_Dream_52.iso
/
Linux
/
XCdRoast
/
xcdroast-0.96d.tar.gz
/
xcdroast-0.96d.tar
/
xcdroast-0.96d
/
configure
< prev
next >
Wrap
Text File
|
1998-03-03
|
8KB
|
327 lines
#!/bin/sh
# simple configure script to locate system-libraries.
# 20.12.97 Thomas Niederreiter
BASEDIR="/usr/local/lib"
BASEDIR2="/usr/lib"
INCDIR="/usr/local/include"
INCDIR2="/usr/include"
LIBDIRPREFIX="/usr/local"
if test "$1" = --help; then
echo
echo "Available configure-options:"
echo " --prefixdir <directoryname> (default: $LIBDIRPREFIX)"
echo
exit 1
fi
if test "$1" = --prefixdir; then
if test -z "$2"; then
echo
echo "Warning: Need value for --prefixdir"
echo
exit 1
else
LIBDIRPREFIX=$2
fi
fi
echo
echo "Autoconfiguration of X-CD-Roast 0.96d:"
echo
echo -n "Looking for TCL 8.0-Library: "
DYNTCLLIBDIR=""
STATCLLIBDIR=""
FND=""
if test -f $BASEDIR/libtcl8.0.so; then
echo "$BASEDIR/libtcl8.0.so (shared)"
DYNTCLLIBDIR=$BASEDIR
FND=1
elif test -f $BASEDIR2/libtcl8.0.so; then
echo "$BASEDIR2/libtcl8.0.so (shared)"
DYNTCLLIBDIR=$BASEDIR2
FND=1
fi
if test -f $BASEDIR/libtcl8.0.a; then
if test -n "$FND"; then echo -n " "; fi
echo "$BASEDIR/libtcl8.0.a (static)"
STATCLLIBDIR=$BASEDIR
elif test -f $BASEDIR2/libtcl8.0.a; then
if test -n "$FND"; then echo -n " "; fi
echo "$BASEDIR2/libtcl8.0.a (static)"
STATCLLIBDIR=$BASEDIR2
fi
if test -z "$DYNTCLLIBDIR" -a -z "$STATCLLIBDIR"; then
echo "not found"
fi
echo -n "Looking for TK 8.0-Library: "
DYNTKLIBDIR=""
STATKLIBDIR=""
FND=""
if test -f $BASEDIR/libtk8.0.so; then
echo "$BASEDIR/libtk8.0.so (shared)"
DYNTKLIBDIR=$BASEDIR
FND=1
elif test -f $BASEDIR2/libtk8.0.so; then
echo "$BASEDIR2/libtk8.0.so (shared)"
DYNTKLIBDIR=$BASEDIR2
FND=1
fi
if test -f $BASEDIR/libtk8.0.a; then
if test -n "$FND"; then echo -n " "; fi
echo "$BASEDIR/libtk8.0.a (static)"
STATKLIBDIR=$BASEDIR
elif test -f $BASEDIR2/libtk8.0.a; then
if test -n "$FND"; then echo -n " "; fi
echo "$BASEDIR2/libtk8.0.a (static)"
STATKLIBDIR=$BASEDIR2
fi
if test -z "$DYNTKLIBDIR" -a -z "$STATKLIBDIR"; then
echo "not found"
fi
echo -n "Looking for Tix 4.1-Library: "
DYNTIXLIBDIR=""
STATIXLIBDIR=""
FND=""
if test -f $BASEDIR/libtix4.1.8.0.so; then
echo "$BASEDIR/libtix4.1.8.0.so (shared)"
DYNTIXLIBDIR=$BASEDIR
FND=1
elif test -f $BASEDIR2/libtix4.1.8.0.so; then
echo "$BASEDIR2/libtix4.1.8.0.so (shared)"
DYNTIXLIBDIR=$BASEDIR2
FND=1
fi
if test -f $BASEDIR/libtix4.1.8.0.a; then
if test -n "$FND"; then echo -n " "; fi
echo "$BASEDIR/libtix4.1.8.0.a (static)"
STATIXLIBDIR=$BASEDIR
elif test -f $BASEDIR2/libtix4.1.8.0.a; then
if test -n "$FND"; then echo -n " "; fi
echo "$BASEDIR2/libtix4.1.8.0.a (static)"
STATIXLIBDIR=$BASEDIR2
fi
if test -z "$DYNTIXLIBDIR" -a -z "$STATIXLIBDIR"; then
echo "not found"
fi
echo -n "Looking for Tix 4.1-SAM-Library: "
DYNTIXSAMLIBDIR=""
STATIXSAMLIBDIR=""
FND=""
if test -f $BASEDIR/libtixsam4.1.8.0.so; then
echo "$BASEDIR/libtixsam4.1.8.0.so (shared)"
DYNTIXSAMLIBDIR=$BASEDIR
FND=1
elif test -f $BASEDIR2/libtixsam4.1.8.0.so; then
echo "$BASEDIR2/libtixsam4.1.8.0.so (shared)"
DYNTIXSAMLIBDIR=$BASEDIR2
FND=1
fi
if test -f $BASEDIR/libtixsam4.1.8.0.a; then
if test -n "$FND"; then echo -n " "; fi
echo "$BASEDIR/libtixsam4.1.8.0.a (static)"
STATIXSAMLIBDIR=$BASEDIR
elif test -f $BASEDIR2/libtixsam4.1.8.0.a; then
if test -n "$FND"; then echo -n " "; fi
echo "$BASEDIR2/libtixsam4.1.8.0.a (static)"
STATIXSAMLIBDIR=$BASEDIR2
fi
if test -z "$DYNTIXSAMLIBDIR" -a -z "$STATIXSAMLIBDIR"; then
echo "not found"
fi
echo -n "Looking for TCL 8.0 lib-directory: "
TCLLIBDIR=""
if test -d $BASEDIR/tcl8.0; then
echo "$BASEDIR/tcl8.0/"
TCLLIBDIR=$BASEDIR/tcl8.0/
elif test -d $BASEDIR2/tcl8.0; then
echo "$BASEDIR2/tcl8.0/"
TCLLIBDIR=$BASEDIR2/tcl8.0/
else
echo "not found"
fi
echo -n "Looking for TK 8.0 lib-directory: "
TKLIBDIR=""
if test -d $BASEDIR/tk8.0; then
echo "$BASEDIR/tk8.0/"
TKLIBDIR=$BASEDIR/tk8.0/
elif test -d $BASEDIR2/tk8.0; then
echo "$BASEDIR2/tk8.0/"
TKLIBDIR=$BASEDIR2/tk8.0/
else
echo "not found"
fi
echo -n "Looking for Tix 4.1 lib-directory: "
TIXLIBDIR=""
if test -d $BASEDIR/tix4.1; then
echo "$BASEDIR/tix4.1/"
TIXLIBDIR=$BASEDIR/tix4.1/
elif test -d $BASEDIR2/tix4.1; then
echo "$BASEDIR2/tix4.1/"
TIXLIBDIR=$BASEDIR2/tix4.1/
else
echo "not found"
fi
echo -n "Looking for TCL/TK/Tix include-files: "
TCLTKINCLUDE=""
if test -f $INCDIR/tcl.h -a -f $INCDIR/tk.h -a -f $INCDIR/tix.h; then
echo "$INCDIR/"
TCLTKINCLUDE=$INCDIR
elif test -f $INCDIR2/tcl.h -a -f $INCDIR2/tk.h -a -f $INCDIR2/tix.h; then
echo "$INCDIR2/"
TCLTKINCLUDE=$INCDIR2
else
echo "not found"
fi
# Now we have collected the system-info. Its time to check it.
echo
if test -z "$DYNTCLLIBDIR" -a -z "$STATCLLIBDIR"; then
echo "No TCL 8.0 Library found. Please install TCL 8.0."
echo "(further information can be found in the README.Compile-file)"
exit 1
fi
if test -z "$DYNTKLIBDIR" -a -z "$STATKLIBDIR"; then
echo "No TK 8.0 Library found. Please install TK 8.0."
echo "(further information can be found in the README.Compile-file)"
exit 1
fi
if test -z "$DYNTIXLIBDIR" -a -z "$STATIXLIBDIR" -a -z "$DYNTIXSAMLIBDIR" -a -z "$STATIXSAMLIBDIR"; then
echo "No Tix 4.1 Library found. Please install Tix4.1."
echo "(further information can be found in the README.Compile-file)"
exit 1
fi
if test -z "$TCLLIBDIR" -o -z "$TKLIBDIR" -o -z "$TIXLIBDIR"; then
echo "Not all TCL/TK/Tix-library-directories found."
echo "Please check your installation of TCL/TK and Tix."
echo "(further information can be found in the README.Compile-file)"
exit 1
fi
if test -z "$TCLTKINCLUDE"; then
echo "Have not found all the TCL/TK/Tix-include-files."
echo "Please check your installation of TCL/TK and Tix."
echo "(further information can be found in the README.Compile-file)"
exit 1
fi
STATICOK=0
# got we all to build a static version?
if test -n "$STATIXSAMLIBDIR" -o -n "$STATIXSAMLIBDIR"; then
STATICOK=1
fi
SHAREDOK=0
# got we all to build a shared version?
if test -n "$DYNTIXLIBDIR" -o -n "$DYNTIXLIBDIR"; then
SHAREDOK=1
fi
if test "$STATICOK" = 0 -a "$SHAREDOK" = 0; then
echo
echo "Can't build shared or static version -> aborting."
echo "Please check your installation of TCL/TK and Tix."
echo "(further information can be found in the README.Compile-file)"
exit 1
fi
echo "System-check OK."
echo "Creating src/etixwish/Makefile"
rm -f src/etixwish/Makefile
cat >src/etixwish/Makefile <<EOF
#
# automatically generated by the configure-script.
# usually no need to edit that.
#
# This directory contains the tcl-library-files
TCLLIBDIR=$TCLLIBDIR
# This directory contains the tk-library-files
TKLIBDIR=$TKLIBDIR
# This directory contains the tix-library-files
TIXLIBDIR=$TIXLIBDIR
# The directory that contains tcl.h, tk.h and tix.h
TCLTKINCLUDE=$TCLTKINCLUDE
# The directories where the tcl/tk/tix-libraries are searched
TCLTKLIBDIRS=-L/usr/local/lib -L/usr/lib
# TCL/TK/Tix-Libraries to link with the static version
TCLSTATICLIBS=-ltixsam4.1.8.0 -ltk8.0 -ltcl8.0
# TCL/TK/Tix-Libraries to link with the shared version
TCLSHAREDLIBS=-ltix4.1.8.0 -ltk8.0 -ltcl8.0
# Library-path-prefix: Where X-CD-Roast looks for its utils..
LIBDIRPREFIX=$LIBDIRPREFIX
EOF
cat src/etixwish/Makefile.in >>src/etixwish/Makefile
echo "Done."
if test "$SHAREDOK" = "1"; then
DEFTARGET=xcdroast-shared
elif test "$STATICOK" = "1"; then
DEFTARGET=xcdroast-static
else
# should never happen
exit 1
fi
echo "Creating Makefile"
rm -f Makefile
cat >Makefile <<EOF
#
# automatically generated by the configure-script.
# usually no need to edit that.
#
# base-directory for X-CD-Roast installation
PREFIX=$LIBDIRPREFIX
all: $DEFTARGET utils
EOF
cat Makefile.in >>Makefile
echo "Done."
echo
echo "---------------------------------------------------------------"
echo
echo "Type \"make\" to compile X-CD-Roast and its utility-programs."
echo
echo "Then type \"make install\" to install X-CD-Roast on your system."
echo "(Installation-prefix: $LIBDIRPREFIX) "
echo
echo "Good Luck."