Search
lxdream.org :: lxdream/autogen.sh
lxdream 0.9.1
released Jun 29
Download Now
filename autogen.sh
changeset 1:eea311cfd33e
author nkeynes
date Wed Jul 30 03:00:40 2008 +0000 (11 years ago)
permissions -rwxr-xr-x
last change Add debian changelog file
file annotate diff log raw
nkeynes@1
     1
#!/bin/sh
nkeynes@1
     2
# Run this to generate all the initial makefiles, etc.
nkeynes@1
     3
nkeynes@1
     4
srcdir=`dirname $0`
nkeynes@1
     5
test -z "$srcdir" && srcdir=.
nkeynes@1
     6
nkeynes@1
     7
DIE=0
nkeynes@1
     8
nkeynes@1
     9
if [ -n "$GNOME2_DIR" ]; then
nkeynes@1
    10
	ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS"
nkeynes@1
    11
	LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH"
nkeynes@1
    12
	PATH="$GNOME2_DIR/bin:$PATH"
nkeynes@1
    13
	export PATH
nkeynes@1
    14
	export LD_LIBRARY_PATH
nkeynes@1
    15
fi
nkeynes@1
    16
nkeynes@1
    17
(test -f $srcdir/configure.in) || {
nkeynes@1
    18
    echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
nkeynes@1
    19
    echo " top-level package directory"
nkeynes@1
    20
    exit 1
nkeynes@1
    21
}
nkeynes@1
    22
nkeynes@1
    23
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
nkeynes@1
    24
  echo
nkeynes@1
    25
  echo "**Error**: You must have \`autoconf' installed."
nkeynes@1
    26
  echo "Download the appropriate package for your distribution,"
nkeynes@1
    27
  echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
nkeynes@1
    28
  DIE=1
nkeynes@1
    29
}
nkeynes@1
    30
nkeynes@1
    31
(grep "^AC_PROG_INTLTOOL" $srcdir/configure.in >/dev/null) && {
nkeynes@1
    32
  (intltoolize --version) < /dev/null > /dev/null 2>&1 || {
nkeynes@1
    33
    echo 
nkeynes@1
    34
    echo "**Error**: You must have \`intltool' installed."
nkeynes@1
    35
    echo "You can get it from:"
nkeynes@1
    36
    echo "  ftp://ftp.gnome.org/pub/GNOME/"
nkeynes@1
    37
    DIE=1
nkeynes@1
    38
  }
nkeynes@1
    39
}
nkeynes@1
    40
nkeynes@1
    41
(grep "^AM_PROG_XML_I18N_TOOLS" $srcdir/configure.in >/dev/null) && {
nkeynes@1
    42
  (xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || {
nkeynes@1
    43
    echo
nkeynes@1
    44
    echo "**Error**: You must have \`xml-i18n-toolize' installed."
nkeynes@1
    45
    echo "You can get it from:"
nkeynes@1
    46
    echo "  ftp://ftp.gnome.org/pub/GNOME/"
nkeynes@1
    47
    DIE=1
nkeynes@1
    48
  }
nkeynes@1
    49
}
nkeynes@1
    50
nkeynes@1
    51
(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
nkeynes@1
    52
  (libtool --version) < /dev/null > /dev/null 2>&1 || {
nkeynes@1
    53
    echo
nkeynes@1
    54
    echo "**Error**: You must have \`libtool' installed."
nkeynes@1
    55
    echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
nkeynes@1
    56
    DIE=1
nkeynes@1
    57
  }
nkeynes@1
    58
}
nkeynes@1
    59
nkeynes@1
    60
(grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.in >/dev/null) && {
nkeynes@1
    61
  (grep "sed.*POTFILES" $srcdir/configure.in) > /dev/null || \
nkeynes@1
    62
  (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || {
nkeynes@1
    63
    echo
nkeynes@1
    64
    echo "**Error**: You must have \`glib' installed."
nkeynes@1
    65
    echo "You can get it from: ftp://ftp.gtk.org/pub/gtk"
nkeynes@1
    66
    DIE=1
nkeynes@1
    67
  }
nkeynes@1
    68
}
nkeynes@1
    69
nkeynes@1
    70
(automake --version) < /dev/null > /dev/null 2>&1 || {
nkeynes@1
    71
  echo
nkeynes@1
    72
  echo "**Error**: You must have \`automake' installed."
nkeynes@1
    73
  echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
nkeynes@1
    74
  DIE=1
nkeynes@1
    75
  NO_AUTOMAKE=yes
nkeynes@1
    76
}
nkeynes@1
    77
nkeynes@1
    78
nkeynes@1
    79
# if no automake, don't bother testing for aclocal
nkeynes@1
    80
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
nkeynes@1
    81
  echo
nkeynes@1
    82
  echo "**Error**: Missing \`aclocal'.  The version of \`automake'"
nkeynes@1
    83
  echo "installed doesn't appear recent enough."
nkeynes@1
    84
  echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
nkeynes@1
    85
  DIE=1
nkeynes@1
    86
}
nkeynes@1
    87
nkeynes@1
    88
if test "$DIE" -eq 1; then
nkeynes@1
    89
  exit 1
nkeynes@1
    90
fi
nkeynes@1
    91
nkeynes@1
    92
if test -z "$*"; then
nkeynes@1
    93
  echo "**Warning**: I am going to run \`configure' with no arguments."
nkeynes@1
    94
  echo "If you wish to pass any to it, please specify them on the"
nkeynes@1
    95
  echo \`$0\'" command line."
nkeynes@1
    96
  echo
nkeynes@1
    97
fi
nkeynes@1
    98
nkeynes@1
    99
case $CC in
nkeynes@1
   100
xlc )
nkeynes@1
   101
  am_opt=--include-deps;;
nkeynes@1
   102
esac
nkeynes@1
   103
nkeynes@1
   104
for coin in `find $srcdir -path $srcdir/CVS -prune -o -name configure.in -print`
nkeynes@1
   105
do 
nkeynes@1
   106
  dr=`dirname $coin`
nkeynes@1
   107
  if test -f $dr/NO-AUTO-GEN; then
nkeynes@1
   108
    echo skipping $dr -- flagged as no auto-gen
nkeynes@1
   109
  else
nkeynes@1
   110
    echo processing $dr
nkeynes@1
   111
    ( cd $dr
nkeynes@1
   112
nkeynes@1
   113
      aclocalinclude="$ACLOCAL_FLAGS"
nkeynes@1
   114
nkeynes@1
   115
      if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then
nkeynes@1
   116
	echo "Creating $dr/aclocal.m4 ..."
nkeynes@1
   117
	test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
nkeynes@1
   118
	echo "Running glib-gettextize...  Ignore non-fatal messages."
nkeynes@1
   119
	echo "no" | glib-gettextize --force --copy
nkeynes@1
   120
	echo "Making $dr/aclocal.m4 writable ..."
nkeynes@1
   121
	test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
nkeynes@1
   122
      fi
nkeynes@1
   123
      if grep "^AC_PROG_INTLTOOL" configure.in >/dev/null; then
nkeynes@1
   124
        echo "Running intltoolize..."
nkeynes@1
   125
	intltoolize --copy --force --automake
nkeynes@1
   126
      fi
nkeynes@1
   127
      if grep "^AM_PROG_XML_I18N_TOOLS" configure.in >/dev/null; then
nkeynes@1
   128
        echo "Running xml-i18n-toolize..."
nkeynes@1
   129
	xml-i18n-toolize --copy --force --automake
nkeynes@1
   130
      fi
nkeynes@1
   131
      if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
nkeynes@1
   132
	if test -z "$NO_LIBTOOLIZE" ; then 
nkeynes@1
   133
	  echo "Running libtoolize..."
nkeynes@1
   134
	  libtoolize --force --copy
nkeynes@1
   135
	fi
nkeynes@1
   136
      fi
nkeynes@1
   137
      echo "Running aclocal $aclocalinclude ..."
nkeynes@1
   138
      aclocal $aclocalinclude
nkeynes@1
   139
      if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
nkeynes@1
   140
	echo "Running autoheader..."
nkeynes@1
   141
	autoheader
nkeynes@1
   142
      fi
nkeynes@1
   143
      echo "Running automake --gnu $am_opt ..."
nkeynes@1
   144
      automake --add-missing --gnu $am_opt
nkeynes@1
   145
      echo "Running autoconf ..."
nkeynes@1
   146
      autoconf
nkeynes@1
   147
    )
nkeynes@1
   148
  fi
nkeynes@1
   149
done
nkeynes@1
   150
nkeynes@1
   151
conf_flags="--enable-maintainer-mode"
nkeynes@1
   152
nkeynes@1
   153
if test x$NOCONFIGURE = x; then
nkeynes@1
   154
  echo Running $srcdir/configure $conf_flags "$@" ...
nkeynes@1
   155
  $srcdir/configure $conf_flags "$@" \
nkeynes@1
   156
  && echo Now type \`make\' to compile. || exit 1
nkeynes@1
   157
else
nkeynes@1
   158
  echo Skipping configure process.
nkeynes@1
   159
fi
.