Build with automake. Don't try installing yet; that doesn't work, but

raster needs my work to this point, so here it is. :)


SVN revision: 808
This commit is contained in:
Michael Jennings 1999-10-13 17:39:37 +00:00
parent fb927ed081
commit 560aad04d5
7 changed files with 581 additions and 0 deletions

18
.cvsignore Normal file
View File

@ -0,0 +1,18 @@
config.log
config.sub
config.cache
config.guess
configure
ltconfig
ltmain.sh
Makefile
Makefile.in
aclocal.m4
config.status
config.h
libtool
stamp-h
config.h.in
missing
mkinstalldirs
install-sh

7
Makefile.am Normal file
View File

@ -0,0 +1,7 @@
# $Id$
AUTOMAKE_OPTIONS = foreign
SUBDIRS = api epplets
EXTRA_DIST = autogen.sh

277
acconfig.h Normal file
View File

@ -0,0 +1,277 @@
/* acconfig.h
This file is in the public domain.
Descriptive text for the C preprocessor macros that
the distributed Autoconf macros can define.
No software package will use all of them; autoheader copies the ones
your configure.in uses into your configuration header file templates.
The entries are in sort -df order: alphabetical, case insensitive,
ignoring punctuation (such as underscores). Although this order
can split up related entries, it makes it easier to check whether
a given entry is in the file.
Leave the following blank line there!! Autoheader needs it. */
/* Define if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
#ifndef _ALL_SOURCE
#undef _ALL_SOURCE
#endif
/* Define if using alloca.c. */
#undef C_ALLOCA
/* Define if type char is unsigned and you are not using gcc. */
#ifndef __CHAR_UNSIGNED__
#undef __CHAR_UNSIGNED__
#endif
/* Define if the closedir function returns void instead of int. */
#undef CLOSEDIR_VOID
/* Define to empty if the keyword does not work. */
#undef const
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
#undef CRAY_STACKSEG_END
/* Define for DGUX with <sys/dg_sys_info.h>. */
#undef DGUX
/* Define if you have <dirent.h>. */
#undef DIRENT
/* Define to the type of elements in the array set by `getgroups'.
Usually this is either `int' or `gid_t'. */
#undef GETGROUPS_T
/* Define if the `getloadavg' function needs to be run setuid or setgid. */
#undef GETLOADAVG_PRIVILEGED
/* Define if the `getpgrp' function takes no argument. */
#undef GETPGRP_VOID
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
/* Define if you have alloca, as a function or macro. */
#undef HAVE_ALLOCA
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
#undef HAVE_ALLOCA_H
/* Define if you don't have vprintf but do have _doprnt. */
#undef HAVE_DOPRNT
/* Define if your system has a working fnmatch function. */
#undef HAVE_FNMATCH
/* Define if your system has its own `getloadavg' function. */
#undef HAVE_GETLOADAVG
/* Define if you have the getmntent function. */
#undef HAVE_GETMNTENT
/* Define if the `long double' type works. */
#undef HAVE_LONG_DOUBLE
/* Define if you support file names longer than 14 characters. */
#undef HAVE_LONG_FILE_NAMES
/* Define if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define if system calls automatically restart after interruption
by a signal. */
#undef HAVE_RESTARTABLE_SYSCALLS
/* Define if your struct stat has st_blksize. */
#undef HAVE_ST_BLKSIZE
/* Define if your struct stat has st_blocks. */
#undef HAVE_ST_BLOCKS
/* Define if you have the strcoll function and it is properly defined. */
#undef HAVE_STRCOLL
/* Define if your struct stat has st_rdev. */
#undef HAVE_ST_RDEV
/* Define if you have the strftime function. */
#undef HAVE_STRFTIME
/* Define if you have the ANSI # stringizing operator in cpp. */
#undef HAVE_STRINGIZE
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H
/* Define if your struct tm has tm_zone. */
#undef HAVE_TM_ZONE
/* Define if you don't have tm_zone but do have the external array
tzname. */
#undef HAVE_TZNAME
/* Define if you have <unistd.h>. */
#undef HAVE_UNISTD_H
/* Define if utime(file, NULL) sets file's timestamp to the present. */
#undef HAVE_UTIME_NULL
/* Define if you have <vfork.h>. */
#undef HAVE_VFORK_H
/* Define if you have the vprintf function. */
#undef HAVE_VPRINTF
/* Define if you have the wait3 system call. */
#undef HAVE_WAIT3
/* Define as __inline if that's what the C compiler calls it. */
#undef inline
/* Define if int is 16 bits instead of 32. */
#undef INT_16_BITS
/* Define if long int is 64 bits. */
#undef LONG_64_BITS
/* Define if major, minor, and makedev are declared in <mkdev.h>. */
#undef MAJOR_IN_MKDEV
/* Define if major, minor, and makedev are declared in <sysmacros.h>. */
#undef MAJOR_IN_SYSMACROS
/* Define if on MINIX. */
#undef _MINIX
/* Define to `int' if <sys/types.h> doesn't define. */
#undef mode_t
/* Define if you don't have <dirent.h>, but have <ndir.h>. */
#undef NDIR
/* Define if you have <memory.h>, and <string.h> doesn't declare the
mem* functions. */
#undef NEED_MEMORY_H
/* Define if your struct nlist has an n_un member. */
#undef NLIST_NAME_UNION
/* Define if you have <nlist.h>. */
#undef NLIST_STRUCT
/* Define if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
/* Define if your Fortran 77 compiler doesn't accept -c and -o together. */
#undef F77_NO_MINUS_C_MINUS_O
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t
/* Define to `int' if <sys/types.h> doesn't define. */
#undef pid_t
/* Define if the system does not provide POSIX.1 features except
with this defined. */
#undef _POSIX_1_SOURCE
/* Define if you need to in order for stat and other things to work. */
#undef _POSIX_SOURCE
/* Define as the return type of signal handlers (int or void). */
#undef RETSIGTYPE
/* Define to the type of arg1 for select(). */
#undef SELECT_TYPE_ARG1
/* Define to the type of args 2, 3 and 4 for select(). */
#undef SELECT_TYPE_ARG234
/* Define to the type of arg5 for select(). */
#undef SELECT_TYPE_ARG5
/* Define if the `setpgrp' function takes no argument. */
#undef SETPGRP_VOID
/* Define if the setvbuf function takes the buffering type as its second
argument and the buffer pointer as the third, as on System V
before release 3. */
#undef SETVBUF_REVERSED
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown
*/
#undef STACK_DIRECTION
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
#undef STAT_MACROS_BROKEN
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define on System V Release 4. */
#undef SVR4
/* Define if you don't have <dirent.h>, but have <sys/dir.h>. */
#undef SYSDIR
/* Define if you don't have <dirent.h>, but have <sys/ndir.h>. */
#undef SYSNDIR
/* Define if `sys_siglist' is declared by <signal.h>. */
#undef SYS_SIGLIST_DECLARED
/* Define if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Define if your <sys/time.h> declares struct tm. */
#undef TM_IN_SYS_TIME
/* Define to `int' if <sys/types.h> doesn't define. */
#undef uid_t
/* Define for Encore UMAX. */
#undef UMAX
/* Define for Encore UMAX 4.3 that has <inq_status/cpustats.h>
instead of <sys/cpustats.h>. */
#undef UMAX4_3
/* Define if you do not have <strings.h>, index, bzero, etc.. */
#undef USG
/* Define vfork as fork if vfork does not work. */
#undef vfork
/* Define if the closedir function returns void instead of int. */
#undef VOID_CLOSEDIR
/* Define if your processor stores words with the most significant
byte first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* Define if the X Window System is missing or not being used. */
#undef X_DISPLAY_MISSING
/* Define if lex declares yytext as a char * by default, not a char[]. */
#undef YYTEXT_POINTER
/* Leave that blank line there!! Autoheader needs it.
If you're adding to this file, keep in mind:
The entries are in sort -df order: alphabetical, case insensitive,
ignoring punctuation (such as underscores). */

12
api/Makefile.am Normal file
View File

@ -0,0 +1,12 @@
# $Id$
lib_LTLIBRARIES = libepplet.la
libepplet_la_SOURCES = epplet.c
libepplet_la_DEPENDENCIES = $(top_builddir)/config.h
libepplet_la_LDFLAGS = -version-info 1:0:1
INCLUDES = -I. -I$(top_srcdir) -I.. -I$(includedir) -I$(prefix)/include $(X_CFLAGS)
LDADD = -L$(libdir) -L$(prefix)/lib $(LIBS) $(X_LIBS)
EXTRA_DIST = epplet.h

59
autogen.sh Executable file
View File

@ -0,0 +1,59 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
# $Id$
DIE=0
echo "Generating configuration files for Epplets, please wait...."
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed to compile Epplets."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
(libtool --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have libtool installed to compile Epplets."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have automake installed to compile Epplets."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
if test "$DIE" -eq 1; then
exit 1
fi
echo " libtoolize --copy --force"
libtoolize --copy --force
echo " aclocal -I . $ACLOCAL_FLAGS"
aclocal -I . $ACLOCAL_FLAGS
echo " autoheader"
autoheader
echo " automake --add-missing"
automake --add-missing
echo " autoconf"
autoconf
if [ -x config.status -a -z "$*" ]; then
./config.status --recheck
else
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."
echo "If you do not wish to run ./configure, press Ctrl-C now."
trap 'echo "configure aborted" ; exit 0' 1 2 15
sleep 1
fi
./configure "$@"
fi

180
configure.in Normal file
View File

@ -0,0 +1,180 @@
dnl# $Id$
AC_INIT(api/epplet.h)
AM_INIT_AUTOMAKE(Epplets, 0.1)
dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
if test ! -z "${CFLAGS}" -o ! -z "${CCOPTS}"; then
CFLAGS_GIVEN=1
else
CFLAGS_GIVEN=0
fi
if test -z "${CFLAGS}"; then
if test -z "${CCOPTS}"; then
CCOPTS="-O"
fi
CFLAGS="$CCOPTS"
fi
AC_PROG_CC
AC_PROG_CPP
dnl# These must be run after AC_PROG_CC but before any other macros that use
dnl# the C compiler
AC_AIX
AC_ISC_POSIX
AC_MINIX
dnl# At least make the attempt to support CygWin32
AC_CYGWIN
AC_ARG_PROGRAM
AM_PROG_LIBTOOL
AC_GCC_TRADITIONAL
dnl # If using gcc, use -O2. If -g works with it, use that too
if test "$GCC" = "yes"; then
if test "$ac_cv_prog_cc_g" = "yes"; then
CCOPTS='-g -O2'
else
CCOPTS='-O2'
fi
CFLAGS="$CCOPTS"
fi
AC_PROG_INSTALL
dnl# Check the sanity of what we've done so far
AM_SANITY_CHECK
dnl# Most people don't want the developer-only clutter
AM_MAINTAINER_MODE
dnl# If it's there, what the hell?
AM_WITH_DMALLOC
dnl# Look for needed programs
AC_CHECK_PROG(RM, rm, rm, true)
AC_CHECK_PROG(CP, cp, cp, false)
AC_CHECK_PROG(CHMOD, chmod, chmod, true)
AC_CHECK_PROG(TAR, tar, tar, tar)
AC_CHECK_PROG(MKDIR, mkdir, mkdir, false)
AC_CHECK_PROG(AR, ar, ar, false)
AC_CHECK_PROG(MV, mv, mv, true)
AC_LN_S
AC_C_CONST
AC_C_INLINE
AC_PATH_XTRA
if test "$ac_cv_lib_socket_connect" = "yes" ; then
SUBLIBS="-lsocket"
fi
if test "$ac_cv_lib_nsl_gethostbyname" = "yes" ; then
SUBLIBS="$SUBLIBS -lnsl"
fi
dnl# Checks for header files.
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(unistd.h time.h math.h pwd.h sys/types.h)
AC_HEADER_TIME
dnl# Missing typedefs and replacements
AC_TYPE_MODE_T
AC_TYPE_PID_T
AC_TYPE_UID_T
dnl# Checks for library functions.
AC_TYPE_SIGNAL
dnl#AC_CHECK_FUNCS()
dnl#
dnl# X LIBRARIES
dnl#
AC_CHECK_LIB(X11, XOpenDisplay, X_LIBS="$X_LIBS -lX11", [
echo "ERROR: You need libX11 to build Epplets. Verify that you have libX11.a or";
echo " libX11.so installed and that it is located in the X libraries";
echo " directory shown above. If it is in a different directory, try using";
echo " the --x-libraries parameter to configure.";
AC_MSG_ERROR([Fatal: libX11 not found.])], $X_LIBS $SUBLIBS)
AC_CHECK_LIB(Xext, XextAddDisplay, X_LIBS="-lXext $X_LIBS", [
echo "ERROR: You need libXext to build Epplets. Verify that you have libXext.a or";
echo " libXext.so installed and that it is located in the X libraries";
echo " directory shown above. If it is in a different directory, try using";
echo " the --x-libraries parameter to configure.";
AC_MSG_ERROR([Fatal: libXext not found.])], $X_LIBS $SUBLIBS)
AC_CHECK_PROG(IMLIB_CONFIG, imlib-config, imlib-config, no)
if test "$IMLIB_CONFIG" != "no"; then
if test "$prefix" = "NONE"; then
AC_MSG_CHECKING(imlib-config for prefix)
prefix="`$IMLIB_CONFIG --prefix`"
AC_MSG_RESULT($prefix)
fi
AC_MSG_CHECKING(imlib-config for the value of CFLAGS)
CFLAGS="$CFLAGS `$IMLIB_CONFIG --cflags`"
AC_MSG_RESULT($CFLAGS)
AC_MSG_CHECKING(imlib-config for the value of GRLIBS)
GRLIBS="$GRLIBS `$IMLIB_CONFIG --libs`"
AC_MSG_RESULT($GRLIBS)
SAVE_LIBS="$LIBS"
LIBS="$GRLIBS"
AC_MSG_CHECKING(the sanity of new compile/link flags)
AC_TRY_LINK(, , echo "yes", echo "no" ; IMLIB_CONFIG="no" ;
AC_WARN(Compile/link failed. Reverting to manual method.)
)
LIBS="$SAVE_LIBS"
fi
if test "$IMLIB_CONFIG" = "no"; then
AC_CHECK_LIB(png, png_get_valid, GRLIBS="$GRLIBS -lpng -lz -lm", ,
$SUBLIBS $X_LIBS -lz -lm)
AC_CHECK_LIB(jpeg, jpeg_read_scanlines, GRLIBS="$GRLIBS -ljpeg", ,
$SUBLIBS $X_LIBS)
AC_CHECK_LIB(tiff, TIFFOpen, GRLIBS="$GRLIBS -ltiff", ,
$SUBLIBS $X_LIBS -lm)
AC_CHECK_LIB(gif, DGifOpenFileName, GRLIBS="$GRLIBS -lgif", ,
$SUBLIBS $X_LIBS)
AC_CHECK_LIB(ungif, DGifOpenFileName, GRLIBS="$GRLIBS -lungif", ,
$SUBLIBS $X_LIBS)
AC_CHECK_LIB(Imlib, Imlib_init, , [
echo "WARNING: Imlib was not found or did not correctly link.";
echo " Please check config.log to see what the error was.";
echo " I will attempt to continue, but things may go wrong.";
AC_MSG_WARN([WARNING: libImlib not found. Attempting to continue anyway.])],
$GRLIBS $SUBLIBS $X_LIBS)
fi
AC_PREFIX(enlightenment)
CFLAGS=${CFLAGS--O}
LDFLAGS=${LDFLAGS--O}
LIBS="$LIBS $GRLIBS"
CPPFLAGS="$CPPFLAGS"
AC_SUBST(CC)
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(LIBS)
AC_SUBST(THREADLIBS)
basedir=.
AM_CONFIG_HEADER(config.h)
AC_OUTPUT(Makefile api/Makefile epplets/Makefile)
echo "Now type 'make' to build $PACKAGE $VERSION."

28
epplets/Makefile.am Normal file
View File

@ -0,0 +1,28 @@
# $Id$
bin_PROGRAMS = E-Load.epplet E-Clock.epplet E-Net.epplet E-Cpu.epplet EppletTest.epplet
E_Load_epplet_SOURCES = E-Load.c
E_Load_epplet_DEPENDENCIES = $(top_srcdir)/api/libepplet.la
E_Load_epplet_LDFLAGS = -rpath $(libdir):$(pkglibdir)
E_Clock_epplet_SOURCES = E-Clock.c
E_Clock_epplet_DEPENDENCIES = $(top_srcdir)/api/libepplet.la
E_Clock_epplet_LDFLAGS = -rpath $(libdir):$(pkglibdir)
E_Net_epplet_SOURCES = E-Net.c
E_Net_epplet_DEPENDENCIES = $(top_srcdir)/api/libepplet.la
E_Net_epplet_LDFLAGS = -rpath $(libdir):$(pkglibdir)
E_Cpu_epplet_SOURCES = E-Cpu.c
E_Cpu_epplet_DEPENDENCIES = $(top_srcdir)/api/libepplet.la
E_Cpu_epplet_LDFLAGS = -rpath $(libdir):$(pkglibdir)
EppletTest_epplet_SOURCES = TestEpplet.c
EppletTest_epplet_DEPENDENCIES = $(top_srcdir)/api/libepplet.la
EppletTest_epplet_LDFLAGS = -rpath $(libdir):$(pkglibdir)
INCLUDES = -I. -I$(top_srcdir)/api -I$(top_srcdir) -I.. -I$(includedir) -I$(prefix)/include $(X_CFLAGS)
LDADD = $(top_builddir)/api/libepplet.la -L$(libdir) -L$(prefix)/lib $(LIBS) $(X_LIBS)
EXTRA_DIST = E-Load.icon E-Clock.icon E-Net.icon E-Cpu.icon EppletTest.icon