Re: Creating a new Gnome app with Autoconf/Automake



 .........----------------==================----
..--==-  Fri, 18 Dec 1998 05:03:38 +0000,
..--==-  Kevin Atkinson (KA) mentioned:

 KA)  Mark Galassi wrote:
 ))
 Kevin)  I am really sorry for having to ask such a stupid question
 Kevin)  but is there any documentation for what is needed to create a
 Kevin)  new Gnome app with Autoconf and Automake?  If not could some
 Kevin)  when please tell me what needs to be done.
 ))  I recently helped someone convert a gtk+ app to use
 )) automake/autoconf.

 KA)  Thanks but I already have Gtk+ working as the Gtk+ documentation
 KA)  has a very nice description of what to do.  What I need to be
 KA)  able to do is to get my program to compile with Gnome support.

Make sure you have GNOME CVS (anon is fine) access setup to get the
macros.  Then:

sh <sharfile below>
cd t
cvs checkout macros

Then you should be able to autogen.sh and build, etc with
automake/autoconf and stuff. Hopefully this should give you what I
think you are looking for; a minimal GNOME app compilation tree using
automake and autoconf without any code.

You can then do a ``make dist'' to create a tar.gz file, once you add
stuff like AUTHORS, ChangeLog, etc.  Someone downloading the tar file
won't need to have the macros, as they will already be included after
you autogen.sh.

-- cut here: sharfile --
#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.2).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
#
# Made on 1998-12-18 09:52 EST by <andrewtv@ztransform.velsoft.com>.
# Source directory was `/tmp'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
#
# This shar contains:
# length mode       name
# ------ ---------- ------------------------------------------
#     87 -rwxrwxr-x t/autogen.sh
#    106 -rw-rw-r-- t/Makefile.am
#    167 -rw-rw-r-- t/configure.in
#    211 -rw-rw-r-- t/t.c
#
save_IFS="${IFS}"
IFS="${IFS}:"
gettext_dir=FAILED
locale_dir=FAILED
first_param="$1"
for dir in $PATH
do
  if test "$gettext_dir" = FAILED && test -f $dir/gettext \
     && ($dir/gettext --version >/dev/null 2>&1)
  then
    set `$dir/gettext --version 2>&1`
    if test "$3" = GNU
    then
      gettext_dir=$dir
    fi
  fi
  if test "$locale_dir" = FAILED && test -f $dir/shar \
     && ($dir/shar --print-text-domain-dir >/dev/null 2>&1)
  then
    locale_dir=`$dir/shar --print-text-domain-dir`
  fi
done
IFS="$save_IFS"
if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED
then
  echo=echo
else
  TEXTDOMAINDIR=$locale_dir
  export TEXTDOMAINDIR
  TEXTDOMAIN=sharutils
  export TEXTDOMAIN
  echo="$gettext_dir/gettext -s"
fi
touch -am 1231235999 $$.touch >/dev/null 2>&1
if test ! -f 1231235999 && test -f $$.touch; then
  shar_touch=touch
else
  shar_touch=:
  echo
  $echo 'WARNING: not restoring timestamps.  Consider getting and'
  $echo "installing GNU \`touch', distributed in GNU File Utilities..."
  echo
fi
rm -f 1231235999 $$.touch
#
if mkdir _sh19001; then
  $echo 'x -' 'creating lock directory'
else
  $echo 'failed to create lock directory'
  exit 1
fi
# ============= t/autogen.sh ==============
if test ! -d 't'; then
  $echo 'x -' 'creating directory' 't'
  mkdir 't'
fi
if test -f 't/autogen.sh' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 't/autogen.sh' '(file already exists)'
else
  $echo 'x -' extracting 't/autogen.sh' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 't/autogen.sh' &&
#! /bin/sh
PKG_NAME="T"
SHORT_NAME="T"
srcdir=`dirname $0`
X. $srcdir/macros/autogen.sh
SHAR_EOF
  $shar_touch -am 1218003898 't/autogen.sh' &&
  chmod 0775 't/autogen.sh' ||
  $echo 'restore of' 't/autogen.sh' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 't/autogen.sh:' 'MD5 check failed'
1c4c792ceb492466a52d3c0f4f1a52d9  t/autogen.sh
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 't/autogen.sh'`"
    test 87 -eq "$shar_count" ||
    $echo 't/autogen.sh:' 'original size' '87,' 'current size' "$shar_count!"
  fi
fi
# ============= t/Makefile.am ==============
if test -f 't/Makefile.am' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 't/Makefile.am' '(file already exists)'
else
  $echo 'x -' extracting 't/Makefile.am' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 't/Makefile.am' &&
INCLUDES = $(GNOME_INCLUDEDIR)
bin_PROGRAMS = t
t_SOURCES = t.c
t_LDADD = $(GNOME_LIBDIR) $(GNOMEUI_LIBS)
SHAR_EOF
  $shar_touch -am 1218095198 't/Makefile.am' &&
  chmod 0664 't/Makefile.am' ||
  $echo 'restore of' 't/Makefile.am' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 't/Makefile.am:' 'MD5 check failed'
fac9e49579dffb6abac69d1478696e00  t/Makefile.am
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 't/Makefile.am'`"
    test 106 -eq "$shar_count" ||
    $echo 't/Makefile.am:' 'original size' '106,' 'current size' "$shar_count!"
  fi
fi
# ============= t/configure.in ==============
if test -f 't/configure.in' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 't/configure.in' '(file already exists)'
else
  $echo 'x -' extracting 't/configure.in' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 't/configure.in' &&
AC_INIT
AM_INIT_AUTOMAKE(t, 0.0)
AM_MAINTAINER_MODE
AM_ACLOCAL_INCLUDE(macros)
GNOME_INIT
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_LIBTOOL
GNOME_X_CHECKS
AC_OUTPUT([Makefile])
SHAR_EOF
  $shar_touch -am 1218003598 't/configure.in' &&
  chmod 0664 't/configure.in' ||
  $echo 'restore of' 't/configure.in' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 't/configure.in:' 'MD5 check failed'
7bebfc37d39b93c74220c09c2f3503dd  t/configure.in
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 't/configure.in'`"
    test 167 -eq "$shar_count" ||
    $echo 't/configure.in:' 'original size' '167,' 'current size' "$shar_count!"
  fi
fi
# ============= t/t.c ==============
if test -f 't/t.c' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 't/t.c' '(file already exists)'
else
  $echo 'x -' extracting 't/t.c' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 't/t.c' &&
#include <gnome.h>
X
int main (int argc, char *argv[])
{
X	GtkWidget *app;
X
X	gnome_init (PACKAGE, VERSION, argc, argv);
X	app = gnome_app_new (PACKAGE, PACKAGE);
X	gtk_widget_show (app);
X	gtk_main ();
X
X	return 0;
}
SHAR_EOF
  $shar_touch -am 1218004598 't/t.c' &&
  chmod 0664 't/t.c' ||
  $echo 'restore of' 't/t.c' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 't/t.c:' 'MD5 check failed'
e015d1e21f7f61e67b4a422d9e3d2110  t/t.c
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 't/t.c'`"
    test 211 -eq "$shar_count" ||
    $echo 't/t.c:' 'original size' '211,' 'current size' "$shar_count!"
  fi
fi
rm -fr _sh19001
exit 0



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