Changeset 2984

Show
Ignore:
Timestamp:
12/03/99 00:56:22 (15 years ago)
Author:
ucacoxh
Message:

- First pass at Tcl/Tk header and library location.
- Start of common header and library location.

Almost certainly does not work across the board yet...

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • rat/trunk/configure.in

    r2983 r2984  
    153153AC_SUBST(AUDIOLIB) 
    154154 
    155 # X and Tcl/Tk ############################################################## 
     155# X ######################################################################### 
    156156AC_PATH_XTRA 
    157157AC_SUBST(X_CFLAGS) 
    158158AC_SUBST(X_LIBS) 
     159 
     160# TCL/TK #################################################################### 
     161# have to use pwd because srcdir is helpfully chosen to be . and check header 
     162# fails with it. 
     163RAT_PARENT=`echo $PWD | sed -e 's%/[[^/]]*$%%'` 
     164TCL_INC=${RAT_PARENT}/tcl-8.0/generic 
     165TCL_LIB=${RAT_PARENT}/tcl-8.0/unix 
     166AC_ARG_WITH(tcl,            
     167        [  --with-tcl=DIR          specify location of Tcl installation], 
     168        [ TCL_INC=$withval/include 
     169          TCL_LIB=$withval/lib]) 
     170AC_CHECK_HEADER(${TCL_INC}/tcl.h,, 
     171        [AC_CHECK_HEADER(${TCL_INC}/tcl8.0/tcl.h, 
     172        TCL_INC=${TCL_INC}/tcl8.0, 
     173        [ echo "Could not find tcl.h.  One of the following halted progress:" 
     174          echo "   (a) Tcl is not installed." 
     175          echo "   (b) Tcl's location was mis-specified, or not specified (--with-tcl=DIR)." 
     176          echo "   (c) this script failed to see it (please inform rat-trap@cs.ucl.ac.uk)." 
     177          exit])]) 
     178AC_CHECK_LIB(tcl8.0,  
     179        Tcl_Init, 
     180        TCL_LIB_NAME=tcl8.0, 
     181        [AC_CHECK_LIB(tcl80,  
     182                Tcl_Init, 
     183                TCL_LIB_NAME=tcl80, 
     184                [ 
     185                        echo "Could not find Tcl library.  One of the following halted progess:" 
     186                        echo "   (a) Tcl is not installed." 
     187                        echo "   (b) Library is not built or not in expected location (--with-tcl=DIR)." 
     188                        echo "   (c) this script failed to see it (please inform rat-trap@cs.ucl.ac.uk)." 
     189                        exit 
     190                ], 
     191                -L${TCL_LIB} -lm)], 
     192        -L${TCL_LIB} -lm) 
     193 
     194TK_INC=${RAT_PARENT}/tk-8.0/generic 
     195TK_LIB=${RAT_PARENT}/tk-8.0/unix 
     196AC_ARG_WITH(tk,            
     197        [  --with-tk=DIR           specify location of Tk installation], 
     198        [ TK_INC=$withval/include 
     199          TK_LIB=$withval/lib]) 
     200 
     201# NB for tk.h we don't want to compile anything, AC_CHECK_HEADER(S) compiles 
     202# a file with specified header, but does not include X and tcl headers. 
     203# Could use AC_TRY_CPP with $ac_x_include/Xlib.h, etc... for time being just 
     204# check for existence...autoconf generates a warning here. 
     205AC_CHECK_FILE($TK_INC/tk.h,, 
     206        [AC_CHECK_FILE($TK_INC/tk8.0/tk.h, 
     207         TK_INC=${TK_INC}/tk8.0, 
     208        [ echo "Could not find tk.h.  One of the following halted progress:" 
     209          echo "   (a) Tk is not installed." 
     210          echo "   (b) Tk's location was mis-specified, or not specified (--with-tk=DIR)." 
     211          echo "   (c) this script failed to see it (please inform rat-trap@cs.ucl.ac.uk)." 
     212          exit])]) 
     213 
     214AC_CHECK_LIB(tk8.0,  
     215        Tk_Init, 
     216        TK_LIB_NAME=tk8.0, 
     217        [AC_CHECK_LIB(tk80,  
     218                Tk_Init, 
     219                TK_LIB_NAME=tk80, 
     220                [ 
     221                        echo "Could not find Tk library.  One of the following halted progess:" 
     222                        echo "   (a) Tk is not installed." 
     223                        echo "   (b) Library is not built or not in expected location (--with-tk=DIR)." 
     224                        echo "   (c) this script failed to see it (please inform rat-trap@cs.ucl.ac.uk)." 
     225                        exit 
     226                ], 
     227                -L${TCL_LIB} -L${TK_LIB} -l$TCL_LIB_NAME -L$ac_x_libraries -lm -lXext -lX11)], 
     228        -L${TCL_LIB} -L${TK_LIB} -l$TCL_LIB_NAME $ac_x_libraries -lm -lXext -lX11) 
     229 
     230# XXX Add check for common ################################################## 
     231 
     232COMMON_INC=${RAT_PARENT}/common 
     233COMMON_LIB=${RAT_PARENT}/common 
     234AC_ARG_WITH(common,            
     235        [  --with-common=DIR       specify location of UCL's common library], 
     236        [ COMMON_INC=$withval/include 
     237          COMMON_LIB=$withval/lib]) 
    159238 
    160239# Enable options ############################################################ 
     
    205284fi 
    206285 
    207 # TCL/TK #################################################################### 
    208 # have to use pwd because srcdir is helpfully chosen to be . and check header 
    209 # fails with it. 
    210 RAT_PARENT=`pwd`/..  
    211 TK_INC_DIR=${RAT_PARENT}/tk-8.0/generic 
    212 TK_LIB_DIR=${RAT_PARENT}/tk-8.0/unix 
    213 AC_ARG_WITH(osprey-audio, [  --with-osprey=DIR       specify Osprey (Sunvideo Plus PCI) support home], O1KHOME=$withval) 
    214 AC_ARG_WITH(tk,            
    215         [  --with-tk=DIR           specify location of tk installation], 
    216         [ TK_INC_DIR=$withval/include 
    217           TK_LIB_DIR=$withval/lib]) 
    218 AC_CHECK_HEADER(${TK_INC_DIR}/tk.h)   
    219 # print warning if this fails 
    220 # Check library too. 
    221 # duplicate for tcl and common 
    222  
    223286AC_CONFIG_HEADER(config.h) 
    224287