Updated makefiles due to the move of directories, and changed gif to
authorlindahl <lindahl>
Fri, 22 Jun 2001 17:01:33 +0000 (17:01 +0000)
committerlindahl <lindahl>
Fri, 22 Jun 2001 17:01:33 +0000 (17:01 +0000)
images, since we'll be converting to png (and we already have jpegs)

133 files changed:
Makefile.am
configure
configure.in
include/config.h.in
include/types/Makefile.am
man/Makefile.am
man/man1/Makefile.am [new file with mode: 0644]
man/man1/do_dssp.1 [moved from man/do_dssp.1 with 100% similarity]
man/man1/editconf.1 [moved from man/editconf.1 with 100% similarity]
man/man1/eneconv.1 [moved from man/eneconv.1 with 100% similarity]
man/man1/g_anaeig.1 [moved from man/g_anaeig.1 with 100% similarity]
man/man1/g_analyze.1 [moved from man/g_analyze.1 with 100% similarity]
man/man1/g_angle.1 [moved from man/g_angle.1 with 100% similarity]
man/man1/g_bond.1 [moved from man/g_bond.1 with 100% similarity]
man/man1/g_bundle.1 [moved from man/g_bundle.1 with 100% similarity]
man/man1/g_chi.1 [moved from man/g_chi.1 with 100% similarity]
man/man1/g_cluster.1 [moved from man/g_cluster.1 with 100% similarity]
man/man1/g_confrms.1 [moved from man/g_confrms.1 with 100% similarity]
man/man1/g_covar.1 [moved from man/g_covar.1 with 100% similarity]
man/man1/g_density.1 [moved from man/g_density.1 with 100% similarity]
man/man1/g_dielectric.1 [moved from man/g_dielectric.1 with 100% similarity]
man/man1/g_dih.1 [moved from man/g_dih.1 with 100% similarity]
man/man1/g_dipoles.1 [moved from man/g_dipoles.1 with 100% similarity]
man/man1/g_disre.1 [moved from man/g_disre.1 with 100% similarity]
man/man1/g_dist.1 [moved from man/g_dist.1 with 100% similarity]
man/man1/g_dyndom.1 [moved from man/g_dyndom.1 with 100% similarity]
man/man1/g_enemat.1 [moved from man/g_enemat.1 with 100% similarity]
man/man1/g_energy.1 [moved from man/g_energy.1 with 100% similarity]
man/man1/g_gyrate.1 [moved from man/g_gyrate.1 with 100% similarity]
man/man1/g_h2order.1 [moved from man/g_h2order.1 with 100% similarity]
man/man1/g_hbond.1 [moved from man/g_hbond.1 with 100% similarity]
man/man1/g_helix.1 [moved from man/g_helix.1 with 100% similarity]
man/man1/g_lie.1 [moved from man/g_lie.1 with 100% similarity]
man/man1/g_mdmat.1 [moved from man/g_mdmat.1 with 100% similarity]
man/man1/g_mindist.1 [moved from man/g_mindist.1 with 100% similarity]
man/man1/g_morph.1 [moved from man/g_morph.1 with 100% similarity]
man/man1/g_msd.1 [moved from man/g_msd.1 with 100% similarity]
man/man1/g_nmeig.1 [moved from man/g_nmeig.1 with 100% similarity]
man/man1/g_nmens.1 [moved from man/g_nmens.1 with 100% similarity]
man/man1/g_order.1 [moved from man/g_order.1 with 100% similarity]
man/man1/g_potential.1 [moved from man/g_potential.1 with 100% similarity]
man/man1/g_rama.1 [moved from man/g_rama.1 with 100% similarity]
man/man1/g_rdf.1 [moved from man/g_rdf.1 with 100% similarity]
man/man1/g_rms.1 [moved from man/g_rms.1 with 100% similarity]
man/man1/g_rmsdist.1 [moved from man/g_rmsdist.1 with 100% similarity]
man/man1/g_rmsf.1 [moved from man/g_rmsf.1 with 100% similarity]
man/man1/g_rotacf.1 [moved from man/g_rotacf.1 with 100% similarity]
man/man1/g_saltbr.1 [moved from man/g_saltbr.1 with 100% similarity]
man/man1/g_sas.1 [moved from man/g_sas.1 with 100% similarity]
man/man1/g_sgangle.1 [moved from man/g_sgangle.1 with 100% similarity]
man/man1/g_sorient.1 [moved from man/g_sorient.1 with 100% similarity]
man/man1/g_tcaf.1 [moved from man/g_tcaf.1 with 100% similarity]
man/man1/g_traj.1 [moved from man/g_traj.1 with 100% similarity]
man/man1/g_velacc.1 [moved from man/g_velacc.1 with 100% similarity]
man/man1/genbox.1 [moved from man/genbox.1 with 100% similarity]
man/man1/genconf.1 [moved from man/genconf.1 with 100% similarity]
man/man1/genion.1 [moved from man/genion.1 with 100% similarity]
man/man1/genpr.1 [moved from man/genpr.1 with 100% similarity]
man/man1/gmxcheck.1 [moved from man/gmxcheck.1 with 100% similarity]
man/man1/gmxdump.1 [moved from man/gmxdump.1 with 100% similarity]
man/man1/grompp.1 [moved from man/grompp.1 with 100% similarity]
man/man1/highway.1 [moved from man/highway.1 with 100% similarity]
man/man1/make_ndx.1 [moved from man/make_ndx.1 with 100% similarity]
man/man1/mdrun.1 [moved from man/mdrun.1 with 100% similarity]
man/man1/mk_angndx.1 [moved from man/mk_angndx.1 with 100% similarity]
man/man1/ngmx.1 [moved from man/ngmx.1 with 100% similarity]
man/man1/nmrun.1 [moved from man/nmrun.1 with 100% similarity]
man/man1/pdb2gmx.1 [moved from man/pdb2gmx.1 with 100% similarity]
man/man1/protonate.1 [moved from man/protonate.1 with 100% similarity]
man/man1/tpbconv.1 [moved from man/tpbconv.1 with 100% similarity]
man/man1/trjcat.1 [moved from man/trjcat.1 with 100% similarity]
man/man1/trjconv.1 [moved from man/trjconv.1 with 100% similarity]
man/man1/trjorder.1 [moved from man/trjorder.1 with 100% similarity]
man/man1/wheel.1 [moved from man/wheel.1 with 100% similarity]
man/man1/x2top.1 [moved from man/x2top.1 with 100% similarity]
man/man1/xpm2ps.1 [moved from man/xpm2ps.1 with 100% similarity]
man/man1/xrama.1 [moved from man/xrama.1 with 100% similarity]
scripts/Makefile.am
share/html/Makefile.am
share/html/gif/.cvsignore [deleted file]
share/html/gmxfaq.html
share/html/images/Makefile.am [moved from share/html/gif/Makefile.am with 89% similarity]
share/html/images/annealdn.gif [moved from share/html/gif/annealdn.gif with 100% similarity]
share/html/images/annealup.gif [moved from share/html/gif/annealup.gif with 100% similarity]
share/html/images/articles.gif [moved from share/html/gif/articles.gif with 100% similarity]
share/html/images/bench.gif [moved from share/html/gif/bench.gif with 100% similarity]
share/html/images/charts_down.gif [moved from share/html/gif/charts_down.gif with 100% similarity]
share/html/images/charts_up.gif [moved from share/html/gif/charts_up.gif with 100% similarity]
share/html/images/faq.gif [moved from share/html/gif/faq.gif with 100% similarity]
share/html/images/features.gif [moved from share/html/gif/features.gif with 100% similarity]
share/html/images/flow_down.gif [moved from share/html/gif/flow_down.gif with 100% similarity]
share/html/images/flow_downleft.gif [moved from share/html/gif/flow_downleft.gif with 100% similarity]
share/html/images/flow_hline.gif [moved from share/html/gif/flow_hline.gif with 100% similarity]
share/html/images/flow_left.gif [moved from share/html/gif/flow_left.gif with 100% similarity]
share/html/images/flow_leftright.gif [moved from share/html/gif/flow_leftright.gif with 100% similarity]
share/html/images/flow_leftrightdown.gif [moved from share/html/gif/flow_leftrightdown.gif with 100% similarity]
share/html/images/flow_leftrightup.gif [moved from share/html/gif/flow_leftrightup.gif with 100% similarity]
share/html/images/flow_leftup.gif [moved from share/html/gif/flow_leftup.gif with 100% similarity]
share/html/images/flow_right+left.gif [moved from share/html/gif/flow_right+left.gif with 100% similarity]
share/html/images/flow_right.gif [moved from share/html/gif/flow_right.gif with 100% similarity]
share/html/images/flow_rightleftdown.gif [moved from share/html/gif/flow_rightleftdown.gif with 100% similarity]
share/html/images/flow_uprightleft.gif [moved from share/html/gif/flow_uprightleft.gif with 100% similarity]
share/html/images/flow_vline.gif [moved from share/html/gif/flow_vline.gif with 100% similarity]
share/html/images/flow_vrule.gif [moved from share/html/gif/flow_vrule.gif with 100% similarity]
share/html/images/gmxlogo_small.jpg [moved from share/html/gif/gmxlogo_small.jpg with 100% similarity]
share/html/images/links.gif [moved from share/html/gif/links.gif with 100% similarity]
share/html/images/mail.gif [moved from share/html/gif/mail.gif with 100% similarity]
share/html/images/manual.gif [moved from share/html/gif/manual.gif with 100% similarity]
share/html/images/plotje.gif [moved from share/html/gif/plotje.gif with 100% similarity]
share/html/images/rainbow.gif [moved from share/html/gif/rainbow.gif with 100% similarity]
share/html/images/software.gif [moved from share/html/gif/software.gif with 100% similarity]
share/html/images/topologies.gif [moved from share/html/gif/topologies.gif with 100% similarity]
share/html/images/xvgr.gif [moved from share/html/gif/xvgr.gif with 100% similarity]
share/html/online.html
share/html/online/Makefile.am
share/template/Makefile.am
share/top/Makefile.am
share/tutor/Makefile.am
share/tutor/gmxdemo/Makefile.am
share/tutor/nmr1/Makefile.am
share/tutor/nmr2/Makefile.am
share/tutor/speptide/Makefile.am
share/tutor/water/Makefile.am
src/Makefile.am
src/Makefile.inc [deleted file]
src/contrib/Makefile.am
src/gmxlib/Makefile.am
src/gmxlib/futil.c
src/gmxlib/wman.c
src/kernel/Makefile.am
src/mdlib/Makefile.am
src/ngmx/Makefile.am
src/tools/Makefile.am

index 388cfb34f6f475dcd664cfcf520fb5fa77310b04..ea6d7a32992cbe9aa284c4a79eb910f22182a85a 100644 (file)
@@ -1,13 +1,8 @@
-## Process this file with automake to produce Makefile.in
-#
-# Don't edit - this file is generated automatically from Makefile.am
-#
+# Note: this file is generated automatically from Makefile.am
+
 AUTOMAKE_OPTIONS = foreign
 
-#
-# The real work is done in our subdirs - automake iterates through these
-#
-SUBDIRS = src top html tutor man
+SUBDIRS = include src share admin scripts man 
 
 #
 # Most files in the config subdir is included automatically when
@@ -33,12 +28,14 @@ install-mdrun:
        (cd ${top_builddir}/src/kernel && $(MAKE) install-mdrun)
 
 links:
-       (cd /usr/local/bin && $(LN_S) ${bindir}/* .)
+       (cd /usr/local/bin && ln -sf ${bindir}/* .)
 
 #
 # Apart from normal things like .o, things matching this are removed
 # (The second one removes files beginning with a #)
+
 CLEANFILES = *~ \\\#* 
+
 DISTCLEANFILES = libtool config.cache config.log
 
 
index 7e1a721de39b897f1dac01b7af9114cb5d7f2efc..8c243236ec1737c5ecf18373b2854df5c2e40061 100755 (executable)
--- a/configure
+++ b/configure
@@ -7012,17 +7012,13 @@ EOF
 
 fi
 
-if test "${prefix}" = "NONE"; then
-  cat >> confdefs.h <<EOF
-#define GMXLIBDIR "${ac_default_prefix}/top"
+echo "1: ${datadir}"
+echo '2: ${datadir}' 
+cat >> confdefs.h <<EOF
+#define GMXLIBDIR "${datadir}/top"
 EOF
 
-else
-  cat >> confdefs.h <<EOF
-#define GMXLIBDIR "${prefix}/top"
-EOF
 
-fi
 
 # Check if there are any optimizations and options for this arch and cpu
 
@@ -7246,7 +7242,7 @@ if test $ac_cv_prog_gcc = yes; then
   
 
 echo $ac_n "checking whether $CC accepts -malign-double""... $ac_c" 1>&6
-echo "configure:7250: checking whether $CC accepts -malign-double" >&5
+echo "configure:7246: checking whether $CC accepts -malign-double" >&5
 if eval "test \"`echo '$''{'ac_align_double'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7303,7 +7299,7 @@ fi
        
 
 echo $ac_n "checking whether $CC accepts -mcpu=$cputype""... $ac_c" 1>&6
-echo "configure:7307: checking whether $CC accepts -mcpu=$cputype" >&5
+echo "configure:7303: checking whether $CC accepts -mcpu=$cputype" >&5
 if eval "test \"`echo '$''{'ac_m_cpu_60x'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7330,7 +7326,7 @@ fi
         
 
 echo $ac_n "checking whether $CC accepts -mcpu=750""... $ac_c" 1>&6
-echo "configure:7334: checking whether $CC accepts -mcpu=750" >&5
+echo "configure:7330: checking whether $CC accepts -mcpu=750" >&5
 if eval "test \"`echo '$''{'ac_m_cpu_750'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7358,7 +7354,7 @@ fi
         
 
 echo $ac_n "checking whether $CC accepts -mcpu=powerpc""... $ac_c" 1>&6
-echo "configure:7362: checking whether $CC accepts -mcpu=powerpc" >&5
+echo "configure:7358: checking whether $CC accepts -mcpu=powerpc" >&5
 if eval "test \"`echo '$''{'ac_m_cpu_powerpc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7386,7 +7382,7 @@ fi
        
 
 echo $ac_n "checking whether $CC accepts -mpowerpc""... $ac_c" 1>&6
-echo "configure:7390: checking whether $CC accepts -mpowerpc" >&5
+echo "configure:7386: checking whether $CC accepts -mpowerpc" >&5
 if eval "test \"`echo '$''{'ac_m_powerpc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7448,7 +7444,7 @@ if test "$ac_test_CFLAGS" != "set"; then
   
 
 echo $ac_n "checking whether $CC accepts ${CFLAGS}""... $ac_c" 1>&6
-echo "configure:7452: checking whether $CC accepts ${CFLAGS}" >&5
+echo "configure:7448: checking whether $CC accepts ${CFLAGS}" >&5
 if eval "test \"`echo '$''{'ac_guessed_cflags'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7497,7 +7493,7 @@ if test "$enable_fortran" = "yes"; then
     
 
 echo $ac_n "checking whether $F77 accepts ${FFLAGS}""... $ac_c" 1>&6
-echo "configure:7501: checking whether $F77 accepts ${FFLAGS}" >&5
+echo "configure:7497: checking whether $F77 accepts ${FFLAGS}" >&5
 if eval "test \"`echo '$''{'ac_guessed_fflags'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7558,6 +7554,7 @@ fi
 
 
 
+
 trap '' 1 2 15
 cat > confcache <<\EOF
 # This file is a shell script that caches the results of configure
@@ -7666,23 +7663,26 @@ trap 'rm -fr `echo "Makefile
                  src/kernel/Makefile
                  src/tools/Makefile
                  src/ngmx/Makefile
-                src/include/Makefile
-                src/include/types/Makefile
-                 src/contrib/Makefile
-                 src/contrib/scripts/Makefile
-                tutor/Makefile
-                tutor/gmxdemo/Makefile
-                tutor/nmr1/Makefile
-                tutor/nmr2/Makefile
-                tutor/water/Makefile
-                tutor/speptide/Makefile
-                tutor/template/Makefile
-                tutor/template/Template.mak
-                top/Makefile
-                html/Makefile
-                 html/gif/Makefile
-                 html/online/Makefile
-                 man/Makefile src/include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+                src/contrib/Makefile
+                 include/Makefile
+                include/types/Makefile
+                 scripts/Makefile
+                admin/Makefile
+                 share/Makefile
+                share/tutor/Makefile
+                share/tutor/gmxdemo/Makefile
+                share/tutor/nmr1/Makefile
+                share/tutor/nmr2/Makefile
+                share/tutor/water/Makefile
+                share/tutor/speptide/Makefile
+                share/template/Makefile
+                share/template/Template.mak
+                share/top/Makefile
+                share/html/Makefile
+                 share/html/images/Makefile
+                 share/html/online/Makefile
+                 man/Makefile
+                 man/man1/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
@@ -7770,6 +7770,7 @@ s%@GMXLIB_COND_OBJ@%$GMXLIB_COND_OBJ%g
 s%@MDLIB_COND_OBJ@%$MDLIB_COND_OBJ%g
 s=XXX_SUFFIX_XXX=$SUFFIX=g
 s%@SUFFIX@%$SUFFIX%g
+s%@SHARED_VERSION_INFO@%$SHARED_VERSION_INFO%g
 
 CEOF
 EOF
@@ -7818,23 +7819,26 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile
                  src/kernel/Makefile
                  src/tools/Makefile
                  src/ngmx/Makefile
-                src/include/Makefile
-                src/include/types/Makefile
-                 src/contrib/Makefile
-                 src/contrib/scripts/Makefile
-                tutor/Makefile
-                tutor/gmxdemo/Makefile
-                tutor/nmr1/Makefile
-                tutor/nmr2/Makefile
-                tutor/water/Makefile
-                tutor/speptide/Makefile
-                tutor/template/Makefile
-                tutor/template/Template.mak
-                top/Makefile
-                html/Makefile
-                 html/gif/Makefile
-                 html/online/Makefile
-                 man/Makefile"}
+                src/contrib/Makefile
+                 include/Makefile
+                include/types/Makefile
+                 scripts/Makefile
+                admin/Makefile
+                 share/Makefile
+                share/tutor/Makefile
+                share/tutor/gmxdemo/Makefile
+                share/tutor/nmr1/Makefile
+                share/tutor/nmr2/Makefile
+                share/tutor/water/Makefile
+                share/tutor/speptide/Makefile
+                share/template/Makefile
+                share/template/Template.mak
+                share/top/Makefile
+                share/html/Makefile
+                 share/html/images/Makefile
+                 share/html/online/Makefile
+                 man/Makefile
+                 man/man1/Makefile"}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -7915,7 +7919,7 @@ ac_eD='%g'
 if test "${CONFIG_HEADERS+set}" != set; then
 EOF
 cat >> $CONFIG_STATUS <<EOF
-  CONFIG_HEADERS="src/include/config.h"
+  CONFIG_HEADERS="include/config.h"
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 fi
@@ -8006,7 +8010,7 @@ cat >> $CONFIG_STATUS <<EOF
 
 EOF
 cat >> $CONFIG_STATUS <<\EOF
-test -z "$CONFIG_HEADERS" || echo timestamp > src/include/stamp-h
+test -z "$CONFIG_HEADERS" || echo timestamp > include/stamp-h
 
 exit 0
 EOF
index 18838b452c218ce68bb2629cbacd972b7276b45a..31fb13b50923e6c739abfb28810602625d47535c 100644 (file)
@@ -9,7 +9,7 @@ dnl This is the version info according to the libtool versioning system.
 dnl It does *not* correspond to the release number.
 SHARED_VERSION_INFO="1:0:0"
 AC_PREFIX_DEFAULT(/usr/local/gromacs)
-AM_CONFIG_HEADER(src/include/config.h)
+AM_CONFIG_HEADER(include/config.h)
 
 #######################################################################
 # User options
@@ -675,12 +675,9 @@ fi
 if test "$enable_vectorized_recip" = "yes"; then
   AC_DEFINE(VECTORIZE_RECIP,,[Vectorize the reciprocal calculation])
 fi
+AC_DEFINE_UNQUOTED(GMXLIBDIR,"${datadir}/top",[Default topology file location])
 
-if test "${prefix}" = "NONE"; then
-  AC_DEFINE_UNQUOTED(GMXLIBDIR,"${ac_default_prefix}/top",[Default topology file location])
-else
-  AC_DEFINE_UNQUOTED(GMXLIBDIR,"${prefix}/top",[Default topology file location])
-fi
 
 # Check if there are any optimizations and options for this arch and cpu
 ACX_COMPILER_MAXOPT
@@ -703,6 +700,7 @@ fi
 
 AC_SUBST(bindir)
 AC_SUBST(libdir)
+AC_SUBST(SHARED_VERSION_INFO)
 
 AC_OUTPUT([Makefile
                  src/Makefile
@@ -711,23 +709,26 @@ AC_OUTPUT([Makefile
                  src/kernel/Makefile
                  src/tools/Makefile
                  src/ngmx/Makefile
-                src/include/Makefile
-                src/include/types/Makefile
-                 src/contrib/Makefile
-                 src/contrib/scripts/Makefile
-                tutor/Makefile
-                tutor/gmxdemo/Makefile
-                tutor/nmr1/Makefile
-                tutor/nmr2/Makefile
-                tutor/water/Makefile
-                tutor/speptide/Makefile
-                tutor/template/Makefile
-                tutor/template/Template.mak
-                top/Makefile
-                html/Makefile
-                 html/gif/Makefile
-                 html/online/Makefile
-                 man/Makefile])
+                src/contrib/Makefile
+                 include/Makefile
+                include/types/Makefile
+                 scripts/Makefile
+                admin/Makefile
+                 share/Makefile
+                share/tutor/Makefile
+                share/tutor/gmxdemo/Makefile
+                share/tutor/nmr1/Makefile
+                share/tutor/nmr2/Makefile
+                share/tutor/water/Makefile
+                share/tutor/speptide/Makefile
+                share/template/Makefile
+                share/template/Template.mak
+                share/top/Makefile
+                share/html/Makefile
+                 share/html/images/Makefile
+                 share/html/online/Makefile
+                 man/Makefile
+                 man/man1/Makefile])
 
 echo ""
 echo "GROMACS is ready to compile. Summary of main options:"
index e29b6245f7c53a84054c6b37eb1a02ccc101e2f2..483085fd97bf95c39a4228aec0f41dacdf87925a 100644 (file)
@@ -1,4 +1,4 @@
-/* src/include/config.h.in.  Generated automatically from configure.in by autoheader.  */
+/* include/config.h.in.  Generated automatically from configure.in by autoheader.  */
 
 /* Define to empty if the keyword does not work.  */
 #undef const
 /* Default topology file location */
 #undef GMXLIBDIR
 
-/* Default topology file location */
-#undef GMXLIBDIR
-
index dda22b797893ddfe5d1c4d64d9537aef21262f68..5af7dbee006607de2eebbb8db7aafe36fdc34562 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Don't edit - this file is generated automatically from Makefile.am
 #
-includetypesdir = ${prefix}/include/types
+includetypesdir = ${includedir}/types
 
 includetypes_HEADERS = \
        atoms.h         edsams.h        forcerec.h      ifunc.h         \
index 35c6f2733e2b4776c8b680945d3e8323444960ec..aa1da3143dba9672f49f53f770a0b766a5741c38 100644 (file)
@@ -3,23 +3,6 @@
 # Don't edit - this file is generated automatically from Makefile.am
 #
 
-man_MANS =     g_dih.1      g_msd.1        g_tcaf.1     nmrun.1      \
-               do_dssp.1    g_dipoles.1    g_nmeig.1    g_traj.1     \
-                pdb2gmx.1    editconf.1     g_disre.1    g_nmens.1    \
-                g_velacc.1   protonate.1    eneconv.1    g_dist.1     \
-                g_order.1    genbox.1       tpbconv.1    g_anaeig.1   \
-                g_dyndom.1   g_potential.1  genconf.1    trjcat.1     \
-                g_analyze.1  g_enemat.1     g_rama.1     genion.1     \
-                trjconv.1    g_angle.1      g_energy.1   g_rdf.1      \
-                genpr.1      trjorder.1     g_bond.1     g_gyrate.1   \
-                g_rms.1      gmxcheck.1     wheel.1      g_bundle.1   \
-                g_h2order.1  g_rmsdist.1    gmxdump.1    x2top.1      \
-                g_chi.1      g_hbond.1      g_rmsf.1     grompp.1     \
-                xpm2ps.1     g_cluster.1    g_helix.1    g_rotacf.1   \
-                highway.1    xrama.1        g_confrms.1  g_lie.1      \
-                g_saltbr.1   make_ndx.1     g_covar.1    g_mdmat.1    \
-                g_sas.1      mdrun.1        g_density.1  g_mindist.1  \
-                g_sgangle.1  mk_angndx.1    g_morph.1    g_sorient.1  \
-                ngmx.1       g_dielectric.1  
+SUBDIRS = man1
 
-EXTRA_DIST = ${man_MANS}
\ No newline at end of file
+CLEANFILES = *~ \\\#*
\ No newline at end of file
diff --git a/man/man1/Makefile.am b/man/man1/Makefile.am
new file mode 100644 (file)
index 0000000..35c6f27
--- /dev/null
@@ -0,0 +1,25 @@
+## Process this file with automake to produce Makefile.in
+#
+# Don't edit - this file is generated automatically from Makefile.am
+#
+
+man_MANS =     g_dih.1      g_msd.1        g_tcaf.1     nmrun.1      \
+               do_dssp.1    g_dipoles.1    g_nmeig.1    g_traj.1     \
+                pdb2gmx.1    editconf.1     g_disre.1    g_nmens.1    \
+                g_velacc.1   protonate.1    eneconv.1    g_dist.1     \
+                g_order.1    genbox.1       tpbconv.1    g_anaeig.1   \
+                g_dyndom.1   g_potential.1  genconf.1    trjcat.1     \
+                g_analyze.1  g_enemat.1     g_rama.1     genion.1     \
+                trjconv.1    g_angle.1      g_energy.1   g_rdf.1      \
+                genpr.1      trjorder.1     g_bond.1     g_gyrate.1   \
+                g_rms.1      gmxcheck.1     wheel.1      g_bundle.1   \
+                g_h2order.1  g_rmsdist.1    gmxdump.1    x2top.1      \
+                g_chi.1      g_hbond.1      g_rmsf.1     grompp.1     \
+                xpm2ps.1     g_cluster.1    g_helix.1    g_rotacf.1   \
+                highway.1    xrama.1        g_confrms.1  g_lie.1      \
+                g_saltbr.1   make_ndx.1     g_covar.1    g_mdmat.1    \
+                g_sas.1      mdrun.1        g_density.1  g_mindist.1  \
+                g_sgangle.1  mk_angndx.1    g_morph.1    g_sorient.1  \
+                ngmx.1       g_dielectric.1  
+
+EXTRA_DIST = ${man_MANS}
\ No newline at end of file
similarity index 100%
rename from man/do_dssp.1
rename to man/man1/do_dssp.1
similarity index 100%
rename from man/editconf.1
rename to man/man1/editconf.1
similarity index 100%
rename from man/eneconv.1
rename to man/man1/eneconv.1
similarity index 100%
rename from man/g_anaeig.1
rename to man/man1/g_anaeig.1
similarity index 100%
rename from man/g_analyze.1
rename to man/man1/g_analyze.1
similarity index 100%
rename from man/g_angle.1
rename to man/man1/g_angle.1
similarity index 100%
rename from man/g_bond.1
rename to man/man1/g_bond.1
similarity index 100%
rename from man/g_bundle.1
rename to man/man1/g_bundle.1
similarity index 100%
rename from man/g_chi.1
rename to man/man1/g_chi.1
similarity index 100%
rename from man/g_cluster.1
rename to man/man1/g_cluster.1
similarity index 100%
rename from man/g_confrms.1
rename to man/man1/g_confrms.1
similarity index 100%
rename from man/g_covar.1
rename to man/man1/g_covar.1
similarity index 100%
rename from man/g_density.1
rename to man/man1/g_density.1
similarity index 100%
rename from man/g_dielectric.1
rename to man/man1/g_dielectric.1
similarity index 100%
rename from man/g_dih.1
rename to man/man1/g_dih.1
similarity index 100%
rename from man/g_dipoles.1
rename to man/man1/g_dipoles.1
similarity index 100%
rename from man/g_disre.1
rename to man/man1/g_disre.1
similarity index 100%
rename from man/g_dist.1
rename to man/man1/g_dist.1
similarity index 100%
rename from man/g_dyndom.1
rename to man/man1/g_dyndom.1
similarity index 100%
rename from man/g_enemat.1
rename to man/man1/g_enemat.1
similarity index 100%
rename from man/g_energy.1
rename to man/man1/g_energy.1
similarity index 100%
rename from man/g_gyrate.1
rename to man/man1/g_gyrate.1
similarity index 100%
rename from man/g_h2order.1
rename to man/man1/g_h2order.1
similarity index 100%
rename from man/g_hbond.1
rename to man/man1/g_hbond.1
similarity index 100%
rename from man/g_helix.1
rename to man/man1/g_helix.1
similarity index 100%
rename from man/g_lie.1
rename to man/man1/g_lie.1
similarity index 100%
rename from man/g_mdmat.1
rename to man/man1/g_mdmat.1
similarity index 100%
rename from man/g_mindist.1
rename to man/man1/g_mindist.1
similarity index 100%
rename from man/g_morph.1
rename to man/man1/g_morph.1
similarity index 100%
rename from man/g_msd.1
rename to man/man1/g_msd.1
similarity index 100%
rename from man/g_nmeig.1
rename to man/man1/g_nmeig.1
similarity index 100%
rename from man/g_nmens.1
rename to man/man1/g_nmens.1
similarity index 100%
rename from man/g_order.1
rename to man/man1/g_order.1
similarity index 100%
rename from man/g_potential.1
rename to man/man1/g_potential.1
similarity index 100%
rename from man/g_rama.1
rename to man/man1/g_rama.1
similarity index 100%
rename from man/g_rdf.1
rename to man/man1/g_rdf.1
similarity index 100%
rename from man/g_rms.1
rename to man/man1/g_rms.1
similarity index 100%
rename from man/g_rmsdist.1
rename to man/man1/g_rmsdist.1
similarity index 100%
rename from man/g_rmsf.1
rename to man/man1/g_rmsf.1
similarity index 100%
rename from man/g_rotacf.1
rename to man/man1/g_rotacf.1
similarity index 100%
rename from man/g_saltbr.1
rename to man/man1/g_saltbr.1
similarity index 100%
rename from man/g_sas.1
rename to man/man1/g_sas.1
similarity index 100%
rename from man/g_sgangle.1
rename to man/man1/g_sgangle.1
similarity index 100%
rename from man/g_sorient.1
rename to man/man1/g_sorient.1
similarity index 100%
rename from man/g_tcaf.1
rename to man/man1/g_tcaf.1
similarity index 100%
rename from man/g_traj.1
rename to man/man1/g_traj.1
similarity index 100%
rename from man/g_velacc.1
rename to man/man1/g_velacc.1
similarity index 100%
rename from man/genbox.1
rename to man/man1/genbox.1
similarity index 100%
rename from man/genconf.1
rename to man/man1/genconf.1
similarity index 100%
rename from man/genion.1
rename to man/man1/genion.1
similarity index 100%
rename from man/genpr.1
rename to man/man1/genpr.1
similarity index 100%
rename from man/gmxcheck.1
rename to man/man1/gmxcheck.1
similarity index 100%
rename from man/gmxdump.1
rename to man/man1/gmxdump.1
similarity index 100%
rename from man/grompp.1
rename to man/man1/grompp.1
similarity index 100%
rename from man/highway.1
rename to man/man1/highway.1
similarity index 100%
rename from man/make_ndx.1
rename to man/man1/make_ndx.1
similarity index 100%
rename from man/mdrun.1
rename to man/man1/mdrun.1
similarity index 100%
rename from man/mk_angndx.1
rename to man/man1/mk_angndx.1
similarity index 100%
rename from man/ngmx.1
rename to man/man1/ngmx.1
similarity index 100%
rename from man/nmrun.1
rename to man/man1/nmrun.1
similarity index 100%
rename from man/pdb2gmx.1
rename to man/man1/pdb2gmx.1
similarity index 100%
rename from man/protonate.1
rename to man/man1/protonate.1
similarity index 100%
rename from man/tpbconv.1
rename to man/man1/tpbconv.1
similarity index 100%
rename from man/trjcat.1
rename to man/man1/trjcat.1
similarity index 100%
rename from man/trjconv.1
rename to man/man1/trjconv.1
similarity index 100%
rename from man/trjorder.1
rename to man/man1/trjorder.1
similarity index 100%
rename from man/wheel.1
rename to man/man1/wheel.1
similarity index 100%
rename from man/x2top.1
rename to man/man1/x2top.1
similarity index 100%
rename from man/xpm2ps.1
rename to man/man1/xpm2ps.1
similarity index 100%
rename from man/xrama.1
rename to man/man1/xrama.1
index bad7242a3105ad3335c926dfe6075c466c932d35..94ec8b8fc2bd5aff5f0566b8505579611b10b31d 100644 (file)
@@ -3,11 +3,5 @@
 # Don't edit - this file is generated automatically from Makefile.am
 #
 
-# These scripts aren't installed, but should go in the distribution
-
-EXTRA_DIST =   grompplog2top   make_gromos_nb.pl       make_gromos_rtp.py  \
-               mkhtml          mkonline                make_gromos_bon.pl  \
-               mkcompl         mknroff                 make_gromos_rtp.pl  \
-               mktex           GMXRC                   NOGMX
-
-
+EXTRA_DIST =   grompplog2top       make_gromos_nb.pl   make_gromos_rtp.py \
+               make_gromos_bon.pl make_gromos_rtp.pl  
index 52c1db46cf5c13df910ff3d01cffac8ee8b31399..ae4a6f7f1b1f5cf4f2c84db400963ec5c6f3affa 100644 (file)
@@ -2,9 +2,9 @@
 #
 # Don't edit - this file is generated automatically from Makefile.am
 #
-SUBDIRS = .  gif  online
+SUBDIRS = .  images  online
 
-htmldir = ${prefix}/html
+htmldir = ${datadir}/html
 
 html_DATA = online.html 
 
diff --git a/share/html/gif/.cvsignore b/share/html/gif/.cvsignore
deleted file mode 100644 (file)
index 70845e0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Makefile.in
index d4f8a05befaf991daa227c41398df939530d5b8a..6441e682539332408c0a4d9055a2e4d9b86f054d 100644 (file)
@@ -471,9 +471,9 @@ graphs are included to clarify things a bit.
 <TD>
 <TH ALIGN=CENTER>Cooling to zero
 <TR>
-<TD ALIGN=CENTER><IMG SRC="gif/annealup.gif">
+<TD ALIGN=CENTER><IMG SRC="images/annealup.gif">
 <TD>&nbsp;&nbsp;&nbsp;
-<TD ALIGN=CENTER><IMG SRC="gif/annealdn.gif">
+<TD ALIGN=CENTER><IMG SRC="images/annealdn.gif">
 </TABLE>
 <P>
 
similarity index 89%
rename from share/html/gif/Makefile.am
rename to share/html/images/Makefile.am
index 91feb8c2ec4c3fd0994416241f1e1d426953d7db..81def3030bec70e775bdceff3adfd926e9f42f29 100644 (file)
@@ -2,9 +2,9 @@
 #
 # Don't edit - this file is generated automatically from Makefile.am
 #
-gifdir = ${prefix}/html/gif
+imagedir = ${datadir}/html/images
 
-gif_DATA = \
+image_DATA = \
        annealdn.gif            features.gif            \
        flow_leftrightup.gif    flow_vrule.gif          \
        annealup.gif            flow_down.gif           \
@@ -21,8 +21,17 @@ gif_DATA = \
        flow_vline.gif          topologies.gif          \
        plotje.gif              xvgr.gif        
 
-EXTRA_DIST = ${gif_DATA}
+EXTRA_DIST = ${image_DATA}
 
 CLEANFILES = *~ \\\#*
 
 
+
+
+
+
+
+
+
+
+
index 21eef4d711fb09d6d9df666c1039806c76193c97..db737bd2e9bf72282438aa718ad11dae9fda655b 100644 (file)
@@ -8,7 +8,7 @@
 <table WIDTH="800" NOSAVE NOBORDER >
 <tr NOSAVE>
 <td WIDTH="120" HEIGHT="140" NOSAVE><a href="http://www.gromacs.org/"><img SRC="
-gif/gmxlogo_small.jpg" BORDER=0 height=133 width=116></a></td>
+images/gmxlogo_small.jpg" BORDER=0 height=133 width=116></a></td>
 
 <td ALIGN=LEFT VALIGN=TOP WIDTH=480 NOSAVE>
 <br><br>
index 288fa823040609d5e2033fb2df421a3773a929bf..9699361964642b71d8f92d685d3ba9895f6af1aa 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Don't edit - this file is generated automatically from Makefile.am
 #
-onlinedir = ${prefix}/html/online
+onlinedir = ${datadir}/html/online
 
 online_DATA = \
   dat.html           g_disre.html      g_sorient.html        ndx.html        \
index 46d88d308604b961d3e9aed8f1402afb1cfef7fe..75c320a7ec0a1adbe2c7cf3d3f23b0840167ca8e 100644 (file)
@@ -3,7 +3,7 @@
 # Don't edit - this file is generated automatically from Makefile.am
 #
 
-templatedir = ${prefix}/share/template
+templatedir = ${datadir}/template
 
 # we don't build this, it's meant for the user to play with.
 # Since a Makefile is used for the installation, we call the
@@ -22,3 +22,6 @@ install-data-hook:
 CLEANFILES = *~ \\\#* *.ene *.hat *.tr? *.xtc *.edr *.ene *.xvg core *.log mdout.mdp *.tp? mon.out confout.gro deshuf.ndx output.* *.gz *.ps *.dat *.g87 *~ \\\#*
 
 
+
+
+
index e6ba5009adfb2dd626dfeb362b6a18b904862b30..e8cda2df8e6106d46039244ac6e35366dac59e37 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Don't edit - this file is generated automatically from Makefile.am
 #
-topoldir = ${prefix}/top
+topoldir = ${datadir}/top
 
 topol_DATA = \
        FF.dat          ffgmx.itp       ffgmxnb.itp     ffgmxbon.itp    \
index 15ea6cb794aa0a2dbe5ca3f8168f708c5c164294..412d20ae2b3a8a4ae52226f63e5c64972980be90 100644 (file)
@@ -3,9 +3,9 @@
 # Don't edit - this file is generated automatically from Makefile.am
 #
 
-SUBDIRS = nmr1 nmr2 speptide water gmxdemo template
+SUBDIRS = nmr1 nmr2 speptide water gmxdemo 
 
-tutordir = ${prefix}/share/tutor
+tutordir = ${datadir}/tutor
 
 tutor_SCRIPTS = cleanit
 
index df096416d0195c7bdafbd39342f451e49adf6713..ab059ba21703436f7e34caf026152c08e02bc848 100644 (file)
@@ -3,7 +3,7 @@
 # Don't edit - this file is generated automatically from Makefile.am
 #
 
-gmxdemodir = ${prefix}/share/tutor/gmxdemo
+gmxdemodir = ${datadir}/tutor/gmxdemo
 
 gmxdemo_DATA = cpeptide.pdb
 gmxdemo_SCRIPTS = demo
index 2e62e442c0cac4daf422cd1736bc6910d4a85377..23312a79a5d41cef281d59947e5733d6f9b076e5 100644 (file)
@@ -3,7 +3,7 @@
 # Don't edit - this file is generated automatically from Makefile.am
 #
 
-nmr1dir = ${prefix}/share/tutor/nmr1
+nmr1dir = ${datadir}/tutor/nmr1
 
 nmr1_DATA = conf.gro grompp.mdp pep.pdb topol.top
 
index 49f488b5e04826c84578ba481cac7efdcc720bbe..d6ef504e1b8f41f30bd133431d5c078227abd16e 100644 (file)
@@ -3,7 +3,7 @@
 # Don't edit - this file is generated automatically from Makefile.am
 #
 
-nmr2dir = ${prefix}/share/tutor/nmr2
+nmr2dir = ${datadir}/tutor/nmr2
 
 nmr2_DATA = conf.gro genconf.gcp grompp.mdp pep.pdb topol.top
 
index 92d6b6f5f0f6a1191c485aba1ba5833850869716..36fa4f26eabf3ecc88f1ed5389b8bcbcb9755c88 100644 (file)
@@ -3,7 +3,7 @@
 # Don't edit - this file is generated automatically from Makefile.am
 #
 
-speptidedir = ${prefix}/share/tutor/speptide
+speptidedir = ${datadir}/tutor/speptide
 
 speptide_DATA = em.mdp  full.mdp  pr.mdp  speptide.pdb
 
index eed41e1c051c97d4b2fc59f49bddb63690a59689..93f9b9029f62224ecc6417fea3fbf2cdacf3a0f5 100644 (file)
@@ -3,7 +3,7 @@
 # Don't edit - this file is generated automatically from Makefile.am
 #
 
-waterdir = ${prefix}/share/tutor/water
+waterdir = ${datadir}/tutor/water
 
 water_DATA = oxygen.ndx  spc216.gro  spc216.pdb  water.mdp  water.top
 
index 8bfd849d0d4511766db10d30ba2ac10bd08dfa0f..6e1437c6c2ab7bd76663cc0109cf8b8f0a1d7cdf 100644 (file)
@@ -3,11 +3,8 @@
 # Don't edit - this file is generated automatically from Makefile.am
 #
 
-include $(srcdir)/Makefile.inc
-
-SUBDIRS = include gmxlib mdlib kernel tools ngmx contrib
+SUBDIRS = gmxlib mdlib kernel tools ngmx contrib
 # don't do anything for the local directory
-EXTRA_DIST = Makefile.inc
 
 mdrun:         
        (cd ${top_builddir}/src/gmxlib && $(MAKE))
diff --git a/src/Makefile.inc b/src/Makefile.inc
deleted file mode 100644 (file)
index 67808ed..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-## Process this file with automake to produce Makefile.in
-#
-# Don't edit - this file is generated automatically from Makefile.am
-#
-
-#################
-# We need a second compile command producing executables 
-# that can be run on the local host to make the innerloops.
-# In most cases this is identical to the normal one, but not
-# for cross-compilation. We also need it on parallel machines 
-# where the MPI executables cannot be run outside a batch queue.
-
-BUILD_COMPILE = $(BUILD_CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
-#################
-# This might be bad - but I don't know any other way to enable
-# us to type make <progname> in subdirs right now
-#AM_CPPFLAGS = -DHAVE_CONFIG_H
-
-
index d3acac6ad5572eea70ab2d927f13a9f0daf53455..9205dff007fd0db4e1a4a1c506bb08e71556d37f 100644 (file)
@@ -2,17 +2,14 @@
 #
 # Don't edit - this file is generated automatically from Makefile.am
 #
-SUBDIRS = scripts
-
-include $(srcdir)/../Makefile.inc
 
 # This is necessary for VPATH to work, 
 # but it can probably be done in a nicer way...
-INCLUDES = @INCLUDES@ -I$(top_srcdir)/src/include
+INCLUDES = @INCLUDES@ -I$(top_srcdir)/include
 LDFLAGS = @LDFLAGS@ -L${top_builddir}/src/gmxlib -L${top_builddir}/src/mdlib 
 LDADD = ../gmxlib/libgmxXXX_SUFFIX_XXX.la ../mdlib/libmdXXX_SUFFIX_XXX.la
 
-EXTRA_DIST              = README  programs.txt  gromacs-3.0.spec
+EXTRA_DIST              = README  
 
 # NB: The programs in contrib do not get double/mpi suffixes automatically,
 # to make it easier for new developers to understand this file. If you want
@@ -59,3 +56,13 @@ addquote_SOURCES     = addquote.c
 # clean things explicitly, since the target names might have changed
 CLEANFILES   =         ${bin_PROGRAMS} ${EXTRA_PROGRAMS}       \
                *_mpi *_d *~ \\\#*
+
+
+
+
+
+
+
+
+
+
index d4e6b54224ce7c12f1362d272fda5046852560a4..9e46a7511eac35976e915969d082d96a28c72fa8 100644 (file)
@@ -3,11 +3,11 @@
 # Note that Makefile is generated automatically from Makefile.in,
 # which is automatically generated from Makefile.am
 
-include $(srcdir)/../Makefile.inc
+
 # 
 # This is necessary for VPATH builds (and thus distcheck) to work, 
 # but it can probably be included in a nicer way...
-INCLUDES = @INCLUDES@ -I$(top_srcdir)/src/include
+INCLUDES = @INCLUDES@ -I$(top_srcdir)/include
 
 # produce the gmx library
 #
@@ -53,8 +53,10 @@ endif
 #
 
 libgmxXXX_SUFFIX_XXX_la_LIBADD = @GMXLIB_COND_OBJ@     
-
 libgmxXXX_SUFFIX_XXX_la_DEPENDENCIES = @GMXLIB_COND_OBJ@       
+libgmxXXX_SUFFIX_XXX_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@
+
+
 
 # The inner loops
 innerf.f:      mkinl 
@@ -83,6 +85,8 @@ EXTRA_DIST     = \
        mkinl_recip.c           mkinl_interactions.c    metacode.c         \
        mkinl.h                 mkinl_fortrandata.h
 
+BUILD_COMPILE = $(BUILD_CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+
 metacode.o:    metacode.c
                $(BUILD_COMPILE) -c $(srcdir)/metacode.c
 mkinl.o:       mkinl.c
@@ -113,3 +117,8 @@ mkinl:              $(MKINL_OBJ)
 # clean things explicitly, since the target names might have changed
 CLEANFILES     = ${lib_LTLIBRARIES} *_d.la *_mpi.la *~ \\\#* innerc.c innerf.f mkinl
 
+
+
+
+
+
index 5334357716ca321a18ffc3fe36a12f1ba32b797f..42764079596e216bb2a1366c175c4f305ba70ca8 100644 (file)
 static char *SRCID_futil_c = "$Id$";
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 #include "sysstuff.h"
 #include "string2.h"
 #include "futil.h"
 #include "network.h"
 #include "fatal.h"
 #include "smalloc.h"
+#include "statutil.h"
 
 typedef struct t_pstack {
   FILE   *fp;
@@ -292,19 +295,130 @@ FILE *ffopen(char *file,char *mode)
   return ff;
 }
 
-char *low_libfn(char *file,bool bFatal)
+
+
+bool search_subdirs(char *parent, char *libdir)
+{
+  char *ptr;
+  bool found;
+
+  /* Search a few common subdirectory names for the gromacs library dir */
+  sprintf(libdir,"%s/share/top/FF.dat",parent);
+  found=fexist(libdir);
+  if(!found) {
+    sprintf(libdir,"%s/share/gromacs/top/FF.dat",parent);
+    found=fexist(libdir);
+  }    
+  if(!found) {
+    sprintf(libdir,"%s/share/gromacs-%s/top/FF.dat",parent,VERSION);
+    found=fexist(libdir);
+  }    
+  if(!found) {
+    sprintf(libdir,"%s/share/gromacs/gromacs-%s/top/FF.dat",parent,VERSION);
+    found=fexist(libdir);
+  }    
+  
+  /* Remove the FF.dat part from libdir if we found something */
+  if(found) {
+    ptr=rindex(libdir,'/'); /* slash always present, no check necessary */
+    *ptr='\0';
+  }
+  return found;
+}
+
+bool get_libdir(char *libdir)
+{
+  char bin_name[512];
+  char buf[512];
+  char full_path[512];
+  char test_file[512];
+  char *system_path;
+  char *dir,*ptr;
+  bool found=FALSE;
+  int i;
+
+  /* First - detect binary name */
+  strcpy(bin_name,Program());
+
+  /* Only do the smart search part if we got a real name */
+  if(bin_name && strcmp(bin_name,"GROMACS")) {
+  
+    if (!index(bin_name,'/')) {
+      /* No "/" in name means it must be in the path - search it! */
+      system_path=getenv("PATH");
+      found=FALSE;
+      while(!found && (dir=strsep(&system_path,":"))!=NULL) {
+       sprintf(full_path,"%s/%s",dir,bin_name);
+       found=fexist(full_path);
+      }
+      if(!found)
+       return FALSE;
+    } else if (bin_name[0]!='/') {
+      /* name is relative the current dir */
+      getcwd(buf,sizeof(buf)-1);
+      strcpy(full_path,buf);
+      strcat(full_path,bin_name+1);
+    }
+
+    /* Now we should have a full path and name in full_bin_name,
+     * but it might be a link, or a link to a link to a link...
+     */
+    while( (i=readlink(full_path,buf,sizeof(buf)-1)) > 0 ) {
+      buf[i]='\0';
+      /* If it doesn't start with "/" it is relative */
+      if(buf[0]!='/') {
+       strcpy(rindex(full_path,'/')+1,buf);
+      } else
+       strcpy(full_path,buf);
+    }
+    
+    /* Remove the executable name - it always contains at least one slash */
+    *(rindex(full_path,'/')+1)='\0';
+    
+    /* Now we have the full path to the gromacs executable.
+     * Use it to find the library dir. 
+     */
+    found=FALSE;
+    while(!found && ( (ptr=rindex(full_path,'/')) != NULL ) ) {
+      *ptr='\0';
+      found=search_subdirs(full_path,libdir);
+    }
+  }
+  /* End of smart searching. If we didn't find it in our parent tree,
+   * or if the program name wasn't set, at least try some standard 
+   * locations before giving up, in case we are running from e.g. 
+   * a users home directory:
+   */
+  if(!found) 
+    found=search_subdirs("/usr/local",libdir);
+  if(!found) 
+    found=search_subdirs("/usr",libdir);
+  if(!found) 
+    found=search_subdirs("/opt",libdir);
+
+  return found;
+}
+
+
+char *low_libfn(char *file, bool bFatal)
 {
   char *ret=NULL;
   char *lib;
   static char buf[1024];
   static char libdir[1024];
   static int  bFirst=1;
-  
+  static bool env_is_set;
+
   if(bFirst) {
-    if((lib=getenv("GMXLIB")) != NULL)
+    lib=getenv("GMXLIB");
+    if(lib!=NULL) {
+      env_is_set=TRUE;
       strcpy(libdir,lib);
-    else
-      strcpy(libdir,GMXLIBDIR);
+    } else {
+      env_is_set=FALSE;
+      if(get_libdir(libdir))
+       strcpy(libdir,GMXLIBDIR);
+    }
     bFirst=0;
   }
   
@@ -314,13 +428,17 @@ char *low_libfn(char *file,bool bFatal)
     sprintf(buf,"%s/%s",libdir,file);
     ret=buf;
     if (bFatal && !fexist(ret))
-      fatal_error(0,"Library file %s not found in current dir nor in libdir %s",
-                 ret,libdir);
+      fatal_error(0,"Library file %s not found in current dir nor in libdir %s\n"
+                 "%s\n",ret,libdir, 
+                 env_is_set ? "" : "(You can override libdir with the GMXLIB environment variable.)");
   }
     
   return ret;
 }
 
+
+
+
 FILE *low_libopen(char *file,bool bFatal)
 {
   FILE *ff;
index 2a663d7a5caa1e400e655a6e7a82e273106ac8f8..6b0103689a431921ad01b23773064def3f622bb8 100644 (file)
@@ -454,7 +454,7 @@ static void write_htmlman(FILE *out,
   fprintf(out,"<table WIDTH=\"800\" NOBORDER >\n<TR>\n");
   fprintf(out,"<td WIDTH=\"120\" HEIGHT=\"133\">\n"
          "<a href=\"http://www.gromacs.org/\">"
-         "<img SRC=\"../gif/gmxlogo_small.jpg\""
+         "<img SRC=\"../images/gmxlogo_small.jpg\""
          "BORDER=0 height=133 width=116></a></td>");
   fprintf(out,"<td ALIGN=LEFT VALIGN=TOP WIDTH=480>"
          "<br><br><h2>GROMACS Online Reference:<br>%s</h2>",program);
index 288d92218730547ede2b2101fcc0711956495ae0..0ec2ee5c77ab25cc109a921fd515f1a7d6cb1bf8 100644 (file)
@@ -3,11 +3,9 @@
 # Don't edit - this file is generated automatically from Makefile.am
 #
 
-include $(srcdir)/../Makefile.inc
-
 # This is necessary for VPATH to work, 
 # but it can probably be done in a nicer way...
-INCLUDES = @INCLUDES@ -I$(top_srcdir)/src/include
+INCLUDES = @INCLUDES@ -I$(top_srcdir)/include
 LDFLAGS = @LDFLAGS@ -L${top_builddir}/src/gmxlib -L${top_builddir}/src/mdlib
 LDADD = ../gmxlib/libgmxXXX_SUFFIX_XXX.la ../mdlib/libmdXXX_SUFFIX_XXX.la
 
index 03fa1a6a844f4275dc654787f426a5d2e6109f03..520597624fba692c6113404273481b8d58216440 100644 (file)
@@ -3,11 +3,9 @@
 # Don't edit - this file is generated automatically from Makefile.am
 #
 
-include $(srcdir)/../Makefile.inc
-
 # This is necessary for VPATH to work, 
 # but it can probably be done in a nicer way...
-INCLUDES = @INCLUDES@ -I$(top_srcdir)/src/include
+INCLUDES = @INCLUDES@ -I$(top_srcdir)/include
 
 # Dependencies and extra objects should come before the target definition
 libmdXXX_SUFFIX_XXX_la_LIBADD         = @MDLIB_COND_OBJ@       
index 590cfd63d18be8851e0645a65b7ef33c8493c4ab..381150da0cd10a9f113ae47f4fdecf1abdbe4fb6 100644 (file)
@@ -3,11 +3,9 @@
 # Don't edit - this file is generated automatically from Makefile.am
 #
 
-include $(srcdir)/../Makefile.inc
-
 # This is necessary for VPATH to work, 
 # but it can probably be done in a nicer way...
-INCLUDES = @INCLUDES@ -I$(top_srcdir)/src/include
+INCLUDES = @INCLUDES@ -I$(top_srcdir)/include
 LDFLAGS = @LDFLAGS@ -L${top_builddir}/src/gmxlib -L${top_builddir}/src/mdlib 
 LDADD = ../gmxlib/libgmxXXX_SUFFIX_XXX.la ../mdlib/libmdXXX_SUFFIX_XXX.la
 
index 98ba9ab05824955369adde3b6d130440f628003e..fc9e8f86292b75f14890fc2c1ac5a92de336a0fc 100644 (file)
@@ -2,11 +2,10 @@
 #
 # Don't edit - this file is generated automatically from Makefile.am
 #
-include $(srcdir)/../Makefile.inc
 
 # This is necessary for VPATH to work, 
 # but it can probably be done in a nicer way...
-INCLUDES = @INCLUDES@ -I$(top_srcdir)/src/include
+INCLUDES = @INCLUDES@ -I$(top_srcdir)/include
 LDFLAGS = @LDFLAGS@ -L${top_builddir}/src/gmxlib -L${top_builddir}/src/mdlib 
 LDADD = ../gmxlib/libgmxXXX_SUFFIX_XXX.la ../mdlib/libmdXXX_SUFFIX_XXX.la