source: trunk/vizservers/configure.in @ 829

Last change on this file since 829 was 760, checked in by dkearney, 14 years ago

added pymol script for launching pymol.
updated pymolproxy's makefile to install pymol and pymol's
modules from the rappture-runtime package.
updated start_viz.sh to include PYMOL_PATH environment variable
needed my pymol.

File size: 5.8 KB
Line 
1AC_INIT(vizservers, 0.1, rappture@nanohub.org)
2
3VERSION=0.0.1
4AC_SUBST(VERSION)
5
6#------------------------------------------------------------------------
7# Handle the --prefix=... option
8#------------------------------------------------------------------------
9
10if test "${prefix}" = "NONE"; then
11    prefix=/usr/local
12fi
13if test "${exec_prefix}" = "NONE"; then
14    exec_prefix=$prefix
15fi
16
17if test "${libdir}" != "${prefix}/lib"; then
18    LIB_SEARCH_DIRS="-L ${prefix}/lib -L ${libdir}"
19else
20    LIB_SEARCH_DIRS="-L ${libdir}"
21fi
22
23AC_SUBST(LIB_SEARCH_DIRS)
24
25AC_PROG_INSTALL
26AC_PROG_MAKE_SET
27
28dnl find and test the C compiler
29AC_PROG_CC
30AC_LANG_C
31
32AC_PROG_CXX
33AC_LANG_CPLUSPLUS
34
35SUBDIRS="nanoscale nanovis pymolproxy"
36AC_SUBST(SUBDIRS)
37
38AC_ARG_WITH(
39    [tcllib],
40    [AS_HELP_STRING([--with-tcllib[=DIR]],
41        [location of Tcl binary library libtclstubs.a @<:@default=/usr/lib@:>@])],
42    [with_tcllib=$withval],
43    [with_tcllib=/usr/lib])
44
45TCL_LIB_DIR=""
46TCL_LIB=""
47TCL_LIB_VERSION=""
48AC_MSG_CHECKING([for tcl binary libraries])
49if test "x$with_tcllib" != "x" ; then
50    if test -f "$with_tcllib"
51    then
52        if test -n `basename $with_tcllib | grep libtcl[0-9]\.[0-9].so`
53        then
54            TCL_LIB_DIR="$with_tcllib"
55        fi
56    else
57        if test -d "$with_tcllib"
58        then
59            if test -x "$with_tcllib/`ls $with_tcllib | grep libtcl[0-9]\.[0-9]\.so$`"
60            then
61                TCL_LIB_DIR="$with_tcllib"
62            else
63                AC_MSG_RESULT([no])
64                AC_MSG_ERROR([cannot find tcl binary libraries, try using --with-tcllib])
65            fi
66        else
67            AC_MSG_RESULT([no])
68            AC_MSG_ERROR([cannot find tcl binary libraries inside $with_tcllib, try using --with-tcllib])
69        fi
70    fi
71else
72    AC_CHECK_HEADERS([tcl.h], [],
73           [AC_MSG_ERROR([cannot find tcl.h, try using --with-tclinclude])])
74fi
75# TCL_LIB=$(ls ${TCL_LIB_DIR} | grep -o libtcl[0-9]\.[0-9])
76# TCL_LIB=`ls ${TCL_LIB_DIR} | awk '/libtcl([0-9]\.?[0-9])?\.so/ { print }'`
77# TCL_LIB=`ls ${TCL_LIB_DIR} | sed -e '/libtcl([0-9]\.?[0-9])?\.so$/ {p}'`
78# TCL_LIB_VERSION=$(echo ${TCL_LIB} | sed -e s/libtcl// -e s/\.so//)
79AC_MSG_RESULT([${TCL_LIB_DIR}/${TCL_LIB}])
80# echo TCL_LIB_DIR = ${TCL_LIB_DIR}
81# echo TCL_LIB = ${TCL_LIB}
82# echo TCL_LIB_VERSION = ${TCL_LIB_VERSION}
83AC_SUBST(TCL_LIB_DIR)
84AC_SUBST(TCL_LIB)
85AC_SUBST(TCL_LIB_VERSION)
86
87AC_ARG_WITH(
88    [tclinclude],
89    [AS_HELP_STRING([--with-tclinclude[=DIR]],
90        [location of tcl.h header file @<:@default=/usr/include@:>@])],
91    [with_tclinclude=$withval],
92    [with_tclinclude=/usr/include])
93
94TCL_INCL_DIR=""
95AC_MSG_CHECKING([for tcl.h])
96if test "x$with_tclinclude" != "x" ; then
97    if test -f "$with_tclinclude"
98    then
99        if test `basename $with_tclinclude` = "tcl.h"
100        then
101            TCL_INCL_DIR="`dirname $with_tclinclude`"
102        fi
103    else
104        if test -d "$with_tclinclude"
105        then
106            if test -r "$with_tclinclude/tcl.h"
107            then
108                TCL_INCL_DIR="$with_tclinclude"
109            else
110                if test -r "$with_tclinclude/tcl${TCL_LIB_VERSION}/tcl.h"
111                then
112                    TCL_INCL_DIR="$with_tclinclude/tcl${TCL_LIB_VERSION}"
113                else
114                    AC_MSG_RESULT([no])
115                    AC_MSG_ERROR([cannot find tcl.h, try using --with-tclinclude])
116                fi
117            fi
118        else
119            AC_MSG_RESULT([no])
120            AC_MSG_ERROR([cannot find tcl.h inside $with_tclinclude, try using --with-tclinclude])
121        fi
122    fi
123else
124    AC_CHECK_HEADERS([tcl.h], [],
125           [AC_MSG_ERROR([cannot find tcl.h, try using --with-tclinclude])])
126fi
127AC_MSG_RESULT([${TCL_INCL_DIR}])
128AC_SUBST(TCL_INCL_DIR)
129
130AC_ARG_WITH(
131    [rappture],
132    [AS_HELP_STRING([--with-rappture[=DIR]],
133        [location of rappture files lib/librappture2.a and include/rappture2/rappture2.h @<:@default=/usr@:>@])],
134    [with_rappture=$withval],
135    [with_rappture=/usr])
136
137RP2_INCL_DIR=""
138RP_DIR=""
139AC_MSG_CHECKING([for rappture])
140if test "x$with_rappture" != "x" ; then
141    if test "x$with_rappture" != "xprefix" ; then
142        if test -f "$with_rappture"
143        then
144            AC_MSG_RESULT([no])
145            AC_MSG_ERROR([please provide --with-rappture with directory])
146        else
147            if test -d "$with_rappture"
148            then
149                if test -r "$with_rappture/include/rappture2/rappture2.h" -a -r "$with_rappture/lib/librappture2.a"
150                then
151                    RP2_INCL_DIR="$with_rappture/include/rappture2"
152                    RP_DIR="$with_rappture"
153                    AC_MSG_RESULT([yes])
154                else
155                    AC_MSG_RESULT([no])
156                    AC_MSG_ERROR([cannot find rappture2.h and librappture2.a, try using --with-rappture])
157                fi
158            else
159                AC_MSG_RESULT([no])
160                AC_MSG_ERROR([cannot find rappture2.h and librappture2.a inside $with_rappture, try using --with-rappture])
161            fi
162        fi
163    else
164        RP2_INCL_DIR="$prefix/include/rappture2"
165        RP_DIR="$prefix"
166        AC_MSG_RESULT([set to prefix])
167    fi
168else
169    AC_CHECK_HEADERS([rappture.h], [],
170           [AC_MSG_ERROR([cannot find rappture.h, try using --with-rappture])])
171fi
172AC_MSG_RESULT([${RP_DIR}/include])
173AC_SUBST(RP2_INCL_DIR)
174AC_SUBST(RP_DIR)
175
176dnl AC_MSG_CHECKING(tcl library version)
177dnl TCL=`AC_TRY_RUN([#include <tcl.h>
178dnl         int main() {printf("tcl%s",TCL_VERSION);return(0);}],,
179dnl         echo "tcl8.4", echo "tcl8.4")`
180dnl AC_MSG_RESULT($TCL)
181dnl AC_MSG_CHECKING(tk library version)
182dnl TK=`AC_TRY_RUN([#include <tk.h>
183dnl         main() {printf("tk%s", TK_VERSION); exit(0);}],,
184dnl         echo "tk8.4", echo "tk8.4")`
185dnl AC_MSG_RESULT($TK)
186
187
188AC_OUTPUT(  Makefile \
189            nanoscale/Makefile \
190            nanovis/Makefile \
191            pymolproxy/Makefile \
192            start_viz.sh    )
Note: See TracBrowser for help on using the repository browser.