X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=configure.in;h=4d5999cd04fab4b9e8dc8c50a84d2847b0804e23;hb=e38936a73431577301570b129ccd1dfca146aa4e;hp=9bf50f733bcbdf716b8c7353dc1cfae56a0e4888;hpb=cdd0717baa6ed75b645c1c0bcabec5fa59335cf3;p=ir-tcl-moved-to-github.git diff --git a/configure.in b/configure.in index 9bf50f7..4d5999c 100644 --- a/configure.in +++ b/configure.in @@ -1,9 +1,8 @@ dnl IR toolkit for tcl/tk -dnl (c) Index Data 1996-1999 +dnl (c) Index Data 1996-2001 dnl See the file LICENSE for details. -dnl $Id: configure.in,v 1.25 1999-11-30 14:05:58 adam Exp $ +dnl $Id: configure.in,v 1.31 2001-12-03 00:31:06 adam Exp $ AC_INIT(ir-tcl.h) -CC=${CC-cc} dnl ------ Substitutions AC_SUBST(CC) AC_SUBST(TCLLIB) @@ -17,8 +16,6 @@ AC_SUBST(SHLIB_VERSION) AC_SUBST(SHLIB_IRTCL) AC_SUBST(ALL_SPEC) AC_SUBST(IRCLIENT_SHELL) -AC_SUBST(YAZLIB) -AC_SUBST(YAZINC) dnl dnl ------ Build root AC_SUBST(build_root) @@ -26,48 +23,21 @@ AC_ARG_WITH(build-root, [ --with-buildroot RPM Build root],[build_root=$ dnl dnl ------ Preliminary settings AC_PROG_INSTALL -AC_STDC_HEADERS -if test "$ac_cv_header_stdc" = no; then - AC_MSG_WARN(Your system doesn't seem to support ANSI C) -fi dnl -dnl ------ Look for Yaz -dnl See if user specified location of yaz-config; otherwise -dnl use ../yaz if is a directory (internal development); otherwise -dnl use yaz-config found in PATH. -yazconfig=NONE -yazpath=NONE -AC_ARG_WITH(yazconfig, [ --with-yazconfig Path for yaz-config], [yazpath=$withval]) -if test "x$yazpath" != "xNONE"; then - yazconfig=$yazpath/yaz-config -else - for i in ../yaz* ../yaz; do - if test -d $i; then - if test -r $i/include/yaz/yaz-version.h; then - yazconfig=$i/yaz-config - fi - fi - done - if test "x$yazconfig" = "xNONE"; then - AC_PATH_PROG(yazconfig, yaz-config, NONE) - fi -fi -AC_MSG_CHECKING(for YAZ) -if test -r $yazconfig; then - . $yazconfig - AC_MSG_RESULT($yazconfig) -else - AC_MSG_RESULT(Not found) -fi +dnl ------ YAZ +YAZ_INIT dnl dnl ------ look for Tcl tclconfig=NONE tryprefix=NONE -AC_ARG_WITH(tclconfig, [ --with-tclconfig Path for tclConfig.sh], [tclconfig=$withval]) +AC_ARG_WITH(tclconfig, [ --with-tclconfig=DIR tclConfig.sh/tkConfig.sh in DIR (example /usr/lib)], [tclconfig=$withval]) if test "x$tclconfig" = xNONE; then saveprefix=${prefix} AC_PREFIX_PROGRAM(tclsh) if test "x$prefix" = xNONE; then + AC_PREFIX_PROGRAM(tclsh8.3) + fi + if test "x$prefix" = xNONE; then AC_PREFIX_PROGRAM(tclsh8.2) fi if test "x$prefix" = xNONE; then @@ -93,7 +63,13 @@ if test -r ${tclconfig}/tclConfig.sh; then AC_MSG_CHECKING(for Tcl) . ${tclconfig}/tclConfig.sh TCLLIB="${TCL_LIB_SPEC} ${TCL_LIBS}" - TCLINC=-I${TCL_PREFIX}/include + if test -d ${TCL_PREFIX}/include/tcl${TCL_VERSION}; then + TCLINC=-I${TCL_PREFIX}/include/tcl${TCL_VERSION} + elif test "${TCL_PREFIX}" = "/usr"; then + TCLINC="" + else + TCLINC=-I${TCL_PREFIX}/include + fi RANLIB=$TCL_RANLIB SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS SHLIB_LD=$TCL_SHLIB_LD @@ -102,7 +78,9 @@ if test -r ${tclconfig}/tclConfig.sh; then SHLIB_IRTCL=irtcl${TCL_SHLIB_SUFFIX} ALL_SPEC="irtcl${TCL_SHLIB_SUFFIX} libirtcl.a" AC_MSG_RESULT($TCL_VERSION) + CC=$TCL_CC else + AC_PROG_CC SHLIB_CFLAGS="" SHLIB_LD="shared-linker" SHLIB_SUFFIX="" @@ -133,6 +111,8 @@ else ALL_SPEC="ir-tcl ir-tk" fi dnl + + dnl ------ look for Tk dnl if test -r ${tclconfig}/tkConfig.sh; then @@ -160,64 +140,64 @@ else else AC_MSG_RESULT($TK_VERSION) fi - fi - AC_PATH_X - not_really_there="" - if test "$no_x" = ""; then - if test "$x_includes" = ""; then - AC_TRY_CPP([#include ], , not_really_there="yes") + AC_PATH_X + not_really_there="" + if test "$no_x" = ""; then + if test "$x_includes" = ""; then + AC_TRY_CPP([#include ], , not_really_there="yes") + else + if test ! -r $x_includes/X11/Intrinsic.h; then + not_really_there="yes" + fi + fi + fi + if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then + echo checking for X11 header files + XINCLUDES="# no special path needed" + AC_TRY_CPP([#include ], , XINCLUDES="nope") + if test "$XINCLUDES" = nope; then dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/include/X11R4 /usr/X11R5/include /usr/include/X11R5 /usr/openwin/include /usr/X11/include /usr/sww/include" + for i in $dirs ; do + if test -r $i/X11/Intrinsic.h; then + XINCLUDES=" -I$i" + fi + done + fi else - if test ! -r $x_includes/X11/Intrinsic.h; then - not_really_there="yes" + if test "$x_includes" != ""; then + XINCLUDES=-I$x_includes + else + XINCLUDES="# no special path needed" fi fi - fi - if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then - echo checking for X11 header files - XINCLUDES="# no special path needed" - AC_TRY_CPP([#include ], , XINCLUDES="nope") - if test "$XINCLUDES" = nope; then dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/include/X11R4 /usr/X11R5/include /usr/include/X11R5 /usr/openwin/include /usr/X11/include /usr/sww/include" + if test "$XINCLUDES" = nope; then + echo "Warning: couldn't find any X11 include files." + XINCLUDES="# no include files found" + fi + if test "$no_x" = yes; then + XLIBSW=nope + if test "$XLIBSW" = nope; then + dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/lib/X11R4 /usr/X11R5/lib /usr/lib/X11R5 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib" for i in $dirs ; do - if test -r $i/X11/Intrinsic.h; then - XINCLUDES=" -I$i" + if test -r $i/libX11.a; then + XLIBSW="-L$i -lX11" fi done fi - else - if test "$x_includes" != ""; then - XINCLUDES=-I$x_includes else - XINCLUDES="# no special path needed" - fi - fi - if test "$XINCLUDES" = nope; then - echo "Warning: couldn't find any X11 include files." - XINCLUDES="# no include files found" - fi - if test "$no_x" = yes; then - XLIBSW=nope - if test "$XLIBSW" = nope; then - dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/lib/X11R4 /usr/X11R5/lib /usr/lib/X11R5 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib" - for i in $dirs ; do - if test -r $i/libX11.a; then - XLIBSW="-L$i -lX11" + if test "$x_libraries" = ""; then + XLIBSW=-lX11 + else + XLIBSW="-L$x_libraries -lX11" fi - done - fi - else - if test "$x_libraries" = ""; then + fi + if test "$XLIBSW" = nope ; then + AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow) + fi + if test "$XLIBSW" = nope ; then + echo "Warning: couldn't find the X11 library archive. Using -lX11." XLIBSW=-lX11 - else - XLIBSW="-L$x_libraries -lX11" fi fi - if test "$XLIBSW" = nope ; then - AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow) - fi - if test "$XLIBSW" = nope ; then - echo "Warning: couldn't find the X11 library archive. Using -lX11." - XLIBSW=-lX11 - fi TKINC=$XINCLUDES TKLIB="${TKLIB} ${XLIBSW} ${TCLLIB}" IRCLIENT_SHELL=ir-tk