autogen.sh and ACLOCAL_FLAGS



  Hi,

  Currently, those of us who build Gnome from CVS and install in 'non-standard'
locations have to manually set an ACLOCAL_FLAGS environment variable so that
aclocal can find the .m4 files for the other packages.  However, the other
packages generally install *-configure scripts that should be usable to infer
the prefix needed.  I've been learning to use auto* for one of my own programs
and my autogen.sh has the following code snippet for determining the aclocal
include flags:

  ACLOCAL_DIR=`aclocal --print-ac-dir`
  GLIB_PREFIX=`glib-config --prefix`
  GTK_PREFIX=`gtk-config --prefix`
  ACLOCAL_INCLUDES=
  if [ "$GLIB_PREFIX" != "" ] && [ "$ACLOCAL_DIR" != "$GLIB_PREFIX/share/aclocal
" ]
  then
    ACLOCAL_INCLUDES="$ACLOCAL_INCLUDES -I $GLIB_PREFIX/share/aclocal"
  fi
  if [ "$GTK_PREFIX" != "" ] && [ "$ACLOCAL_DIR" != "$GTK_PREFIX/share/aclocal" ] && [ "$GTK_PREFIX" != "$GLIB_PREFIX" ]
  then
    ACLOCAL_INCLUDES="$ACLOCAL_INCLUDES -I $GTK_PREFIX/share/aclocal"
  fi
  echo "Using flags: '$ACLOCAL_INCLUDES'"
  aclocal $ACLOCAL_INCLUDES

  ( perhaps it should also let the user override this with an environment
   variable)

  This works perfectly on my computer (stuff installed under /usr/local/gnome)
and on the computer of the other author of the program (stuff installed in /usr)
Is it possible that a similar change could be made to the Gnome autogen scripts,
or would it be impractical?  (or, for that matter, is there a nasty bug
lurking in my method that I don't know about? ;-) )

  Daniel

-- 
There are many of us in this old world of ours who hold that things break
about even for all of us.  I have observed, for example, that we all get
about the same amount of ice.  The rich get it in the summer and the poor
get it in the winter.
		-- Bat Masterson



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]