[27593] in Source-Commits
authwatch commit [debian]: Rewrite the build system
daemon@ATHENA.MIT.EDU (Alexander Chernyakhovsky)
Sun Feb 9 02:41:14 2014
Date: Sun, 9 Feb 2014 02:41:07 -0500
From: Alexander Chernyakhovsky <achernya@MIT.EDU>
Message-Id: <201402090741.s197f7e1022052@drugstore.mit.edu>
To: source-commits@MIT.EDU
https://github.com/mit-athena/authwatch/commit/5a2e554a5963f105083c8dceb720e705554833f3
commit 5a2e554a5963f105083c8dceb720e705554833f3
Author: Alexander Chernyakhovsky <achernya@mit.edu>
Date: Sun Feb 9 02:32:39 2014 -0500
Rewrite the build system
Makefile.am | 4 ++++
Makefile.in | 44 --------------------------------------------
authwatch.c | 1 +
configure.ac | 28 +++++++++++++++++++---------
4 files changed, 24 insertions(+), 53 deletions(-)
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..5c33a7e
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,4 @@
+bin_PROGRAMS = authwatch
+authwatch_SOURCES = authwatch.c
+authwatch_CFLAGS = @GTK_CFLAGS@
+authwatch_LDADD = @KRB5_LIBS@ @GTK_LIBS@
diff --git a/Makefile.in b/Makefile.in
deleted file mode 100644
index 11e885f..0000000
--- a/Makefile.in
+++ /dev/null
@@ -1,44 +0,0 @@
-# $Id: Makefile.in,v 1.3 2006-07-25 23:37:02 ghudson Exp $
-
-SHELL=/bin/sh
-VPATH=@srcdir@
-INSTALL=@INSTALL@
-INSTALL_PROGRAM=@INSTALL_PROGRAM@
-MKDIR_P=@MKDIR_P@
-srcdir=@srcdir@
-top_srcdir=@top_srcdir@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-bindir=@bindir@
-mandir=@mandir@
-
-CC=@CC@
-DEFS=@DEFS@
-CPPFLAGS=@CPPFLAGS@
-CFLAGS=@CFLAGS@
-LDFLAGS=@LDFLAGS@
-LIBS=@KRB5_LIBS@ @LIBS@
-ALL_CFLAGS=`pkg-config --cflags gtk+-2.0` ${CPPFLAGS} ${CFLAGS} ${DEFS}
-ALL_LIBS=`pkg-config --libs gtk+-2.0` ${LIBS}
-
-all: authwatch
-
-authwatch: authwatch.o
- ${CC} ${LDFLAGS} -o $@ authwatch.o ${ALL_LIBS}
-
-.c.o:
- ${CC} -c ${ALL_CFLAGS} $<
-
-check:
-
-install:
- ${MKDIR_P} ${DESTDIR}${bindir}
- ${MKDIR_P} ${DESTDIR}${mandir}/man1
- ${INSTALL_PROGRAM} authwatch ${DESTDIR}${bindir}
- ${INSTALL} ${srcdir}/authwatch.1 ${DESTDIR}${mandir}/man1
-
-clean:
- rm -f authwatch.o authwatch
-
-distclean: clean
- rm -f config.cache config.log config.status Makefile
diff --git a/authwatch.c b/authwatch.c
index b1cf658..48b0483 100644
--- a/authwatch.c
+++ b/authwatch.c
@@ -19,6 +19,7 @@
static const char rcsid[] = "$Id: authwatch.c,v 1.7 2005-08-01 15:56:13 rbasch Exp $";
+#include <string.h>
#include <stdio.h>
#include <sys/types.h>
diff --git a/configure.ac b/configure.ac
index 26209dd..ae3e741 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,21 +1,31 @@
-dnl Process this file with autoconf to produce a configure script.
-dnl $Id: configure.in,v 1.1 2002-01-23 22:15:29 mwhitson Exp $
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
-AC_INIT([authwatch], [10.0], [debathena@mit.edu])
+AC_PREREQ([2.65])
+AC_INIT([authwatch], [10.1], [debathena@mit.edu])
+AM_INIT_AUTOMAKE([foreign -Wall])
+AM_MAINTAINER_MODE([enable])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([authwatch.c])
+AC_CONFIG_HEADERS([config.h])
+# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MKDIR_P
+AM_PROG_CC_C_O
-ATHENA_KRB5_REQUIRED
-ATHENA_KRB5
-ATHENA_UTIL_COM_ERR
+# Check for libraries.
+RRA_LIB_KRB5
-dnl "gnome-config --libs" returns -lintl before -lgnome, which will
-dnl fail if libintl is static. This hack gets an extra -lintl at the
-dnl end of the link line.
AC_CHECK_LIB(intl, gettext)
+PKG_CHECK_MODULES([GTK], [gtk+-2.0])
+AC_SUBST([GTK_CFLAGS])
+AC_SUBST([GTK_LIBS])
+
+# Checks for library functions.
+AC_CHECK_FUNCS([memset])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT