+2002-01-24 Havoc Pennington <hp@redhat.com>
+
+ * pkg.c (print_package_list): make the output halfway attractive
+
+ * autogen.sh: use automake-1.4 aclocal-1.4 if found
+
+ * pkg.c (verify_package): add a warning about -I/usr/include in cflags
+
2001-10-28 Havoc Pennington <hp@pobox.com>
* pkg.c: track position of package in the path search order,
DIE=1
}
-(automake --version) < /dev/null > /dev/null 2>&1 || {
+AUTOMAKE=automake-1.4
+ACLOCAL=aclocal-1.4
+
+($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
+ AUTOMAKE=automake
+ ACLOCAL=aclocal
+}
+
+($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have automake installed to compile $PROJECT."
echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz"
perl -p -i.bak -e "s/info_TEXINFOS/noinst_TEXINFOS/g" `find glib-1.2.8 -name Makefile.am`
perl -p -i.bak -e "s/man_MANS/noinst_MANS/g" `find glib-1.2.8 -name Makefile.am`
-(cd glib-1.2.8 && automake)
+(cd glib-1.2.8 && $AUTOMAKE)
if test -z "$*"; then
echo "I am going to run ./configure with no arguments - if you wish "
echo "to pass any to it, please specify them on the $0 command line."
fi
-echo aclocal $ACLOCAL_FLAGS
-aclocal $ACLOCAL_FLAGS
+libtoolize --copy --force
+
+echo $ACLOCAL $ACLOCAL_FLAGS
+$ACLOCAL $ACLOCAL_FLAGS
# optionally feature autoheader
(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
-automake -a $am_opt
+$AUTOMAKE -a $am_opt
autoconf
cd $ORIGDIR
g_slist_free (requires);
g_slist_free (conflicts);
+
+ iter = pkg->I_cflags;
+ while (iter != NULL)
+ {
+ /* we put things in canonical -I/usr/include (vs. -I /usr/include) format,
+ * but if someone changes it later we may as well be robust
+ */
+ if (strcmp (iter->data, "-I/usr/include") == 0 ||
+ strcmp (iter->data, "-I /usr/include") == 0)
+ {
+ verbose_error ("Package %s has -I/usr/include in Cflags; this may cause problems and is not recommended\n",
+ pkg->name);
+ }
+
+ iter = iter->next;
+ }
}
static char*
return "???";
}
+static void
+max_len_foreach (gpointer key, gpointer value, gpointer data)
+{
+ int *mlen = data;
+
+ *mlen = MAX (*mlen, strlen (key));
+}
+
static void
packages_foreach (gpointer key, gpointer value, gpointer data)
{
if (pkg != NULL)
{
- printf ("%s \t\t%s - %s\n",
- pkg->key, pkg->name, pkg->description);
+ char *pad;
+
+ pad = g_strnfill (GPOINTER_TO_INT (data) - strlen (pkg->key), ' ');
+
+ printf ("%s%s%s - %s\n",
+ pkg->key, pad, pkg->name, pkg->description);
+
+ g_free (pad);
}
}
void
print_package_list (void)
{
- g_hash_table_foreach (locations, packages_foreach, NULL);
+ int mlen = 0;
+
+ g_hash_table_foreach (locations, max_len_foreach, &mlen);
+ g_hash_table_foreach (locations, packages_foreach, GINT_TO_POINTER (mlen + 1));
}