dnl Initialization stuff.
AC_INIT(hvclock, 1.1.2)
-AC_CONFIG_AUX_DIR(build-aux)
+AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_SRCDIR(src/hvclock.c)
-AM_CONFIG_HEADER(config.h:config-h.in)
-dnl Checking if the NEWS file has been updated to reflect the current version.
-AM_INIT_AUTOMAKE(check-news)
+
+AM_INIT_AUTOMAKE([no-define gnits dist-bzip2
+ -Wall -Wno-extra-portability])
AM_SILENT_RULES([yes])
+AM_CONFIG_HEADER(config.h:config-h.in)
dnl Testing the C compiler.
AC_PROG_CC
AC_TYPE_PID_T
AC_TYPE_SIZE_T
-dnl Basic CFLAGS values
-CFLAGS="${CFLAGS} -Wall"
+dnl Basic warning CFLAGS values
+WARNINGCFLAGS="-Wall -Wextra -Wformat -Wformat-security"
dnl Trying to locate the X window system's includes and libraries, and sets the
dnl variables x_includes and x_libraries to their locations. Also adds the
AC_CHECK_LIB(m, sin, LIBS="${LIBS} -lm",dnl
echo "Can't find math library" ; exit 1, "${X_LIBS}")
+AC_SUBST(WARNINGCFLAGS)
AC_SUBST(CFLAGS)
AC_SUBST(LIBS)
AC_SUBST(ac_aux_dir)
# This file is processed by GNU automake to generate Makefile.in
-bin_PROGRAMS = hvclock
-
-hvclock_SOURCES = hvclock.c hvclock.h clock.c clock.h \
- options.c options.h dockapp.c dockapp.h \
- common.h
-
-hvclock_CPPFLAGS = \
- -I$(top_srcdir) \
+AM_CPPFLAGS = \
+ $(WARNINGCFLAGS) \
-I$(top_srcdir)/pixmaps \
- $(GTK_CFLAGS) \
- $(AM_CPPFLAGS)
+ $(GTK_CFLAGS)
-hvclock_LDADD = $(GTK_LIBS)
+bin_PROGRAMS = hvclock
-# These headers will be included in the distribution tarball, but will not be
-# installed by 'make install'
-noinst_HEADERS =
+hvclock_SOURCES = \
+ hvclock.c hvclock.h \
+ clock.c clock.h \
+ options.c options.h \
+ dockapp.c dockapp.h \
+ common.h
-# we want these in the dist tarball
-EXTRA_DIST =
+LDADD = $(GTK_LIBS)
CLEANFILES = *~
hvclock_button_release(GtkWidget *clock, GdkEventButton *event)
{
if (hvclock_infos.debug)
- printf("%s: button released\n", PACKAGE);
+ printf("%s: button released\n", PACKAGE_NAME);
/* single-click --> changing viewing mode */
if (hvclock_mode == CLOCK_MODE) {
hvclock_mode = CALENDAR_MODE;
if (hvclock_infos.debug)
- printf("%s: switching to calendar mode\n", PACKAGE);
+ printf("%s: switching to calendar mode\n", PACKAGE_NAME);
} else {
hvclock_mode = CLOCK_MODE;
if (hvclock_infos.debug)
- printf("%s: switching to clock mode\n", PACKAGE);
+ printf("%s: switching to clock mode\n", PACKAGE_NAME);
}
/* Update clock/calendar... */
******************************************************************************/
static void DisplayUsage(void)
{
- printf("Usage: %s [OPTIONS]...\n", PACKAGE);
+ printf("Usage: %s [OPTIONS]...\n", PACKAGE_NAME);
printf("Dockable analog clock and calendar.\n\n");
printf
(" -d display debugging messages.\n");
static void DisplayVersion(void)
{
printf("\n");
- printf(" %s, version %s\n", PACKAGE, VERSION);
+ printf(" %s, version %s\n", PACKAGE_NAME, PACKAGE_VERSION);
printf(" Written by Hugo Villeneuve\n\n");
}
static void InvalidOption(char *message, /*@null@ */ char *string)
{
if (string == NULL)
- fprintf(stderr, "%s: %s\n", PACKAGE, message);
+ fprintf(stderr, "%s: %s\n", PACKAGE_NAME, message);
else
- fprintf(stderr, "%s: %s %s\n", PACKAGE, message, string);
+ fprintf(stderr, "%s: %s %s\n", PACKAGE_NAME, message, string);
- fprintf(stderr, "Try `%s -h' for more information.\n", PACKAGE);
+ fprintf(stderr, "Try `%s -h' for more information.\n", PACKAGE_NAME);
exit(EXIT_FAILURE);
}