+++ /dev/null
-CC=gcc
-CFLAGS=-I. -W -Wall -g -fPIC
-#CFLAGS+=-DDEBUG
-CPP=cpp
-LD=gcc
-LDFLAGS=-L. -g
-PREFIX=/usr/local
-INSTALL=install
-
-OBJS=libcitadel.o
-
-all: libcitadel.a libcitadel.so
-
-clean:
- rm -f ${OBJS} \
- libcitadel.so libcitadel.a .depend
-
-.c.o:
- ${CC} ${CFLAGS} -o $@ -c $<
-
-libcitadel.a: ${OBJS}
- ar rcs $@ $?
-
-libcitadel.so: ${OBJS}
- ${LD} -rdynamic -shared -o $@ $?
-
-depend .depend:
- for i in *.c;do $(CPP) -M $$i;done > .tmpdepend
- mv .tmpdepend .depend
-
-install: libcitadel.a libcitadel.so
- $(INSTALL) -d $(PREFIX)/include $(PREFIX)/lib
- $(INSTALL) -m 644 libcitadel.h $(PREFIX)/include
- $(INSTALL) -m 644 libcitadel.a libcitadel.so $(PREFIX)/lib
-
-ifeq (.depend,$(wildcard .depend))
-include .depend
-endif
--- /dev/null
+#########################################################################
+# #
+# Process this file with top-level configure script to produce Makefile #
+# #
+#########################################################################
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+libdir = @libdir@
+includedir = @includedir@
+man1dir = @mandir@/man1
+
+top_builddir = .
+
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs
+
+APIHEADER = $(srcdir)/lib/libcitadel.h
+LIBRARY = libcitadel.la
+
+DESTDIR = $(INSTALL_ROOT)
+
+default: buildlib
+
+buildlib: $(LIBRARY)
+
+all: $(LIBRARY)
+
+clean:
+ cd lib && rm -f $(LIBRARY) *.o *.lo && rm -rf .libs _libs
+ rm -rf .libs libcitadel.la
+
+clobber: clean
+
+distclean: clean
+ rm -f config.status config.log config.cache libtool
+ rm -f Makefile
+
+install: $(LIBRARY) $(APIHEADER)
+ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
+ $(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)/$(LIBRARY)
+ for FN in $(APIHEADER) ; do $(INSTALL_DATA) $$FN $(DESTDIR)$(includedir) ; done
+
+uninstall:
+ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(LIBRARY)
+ rm -f $(DESTDIR)$(includedir)/libcitadel.h
+
+# for VPATH builds (invoked by configure)
+mkdir-init:
+ @for d in lib ; do \
+ (mkdir $$d 2> /dev/null || test 1) ; \
+ done
+
+CC = @CC@
+CXX = @CXX@
+LIBTOOL = @LIBTOOL@
+
+INCLUDES = -I$(srcdir)/lib -I.
+LDFLAGS = @LDFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CFLAGS = @CFLAGS@
+CXXFLAGS = @CXXFLAGS@
+VSNFLAG = -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@
+
+### autoconf this?
+LTFLAGS = --silent
+
+COMPILE = $(CC) $(INCLUDES) $(CFLAGS) $(DEFS) $(CPPFLAGS)
+CXXCOMPILE = $(CXX) $(INCLUDES) $(CXXFLAGS) $(DEFS) $(CPPFLAGS)
+LTCOMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE)
+LINK_LIB = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -no-undefined $(VSNFLAG) -rpath $(libdir) $(LDFLAGS) -o $@
+LINK_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LDFLAGS) -o $@
+LINK_CXX_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(CXXCOMPILE) $(LDFLAGS) -o $@
+
+LIB_OBJS = lib/libcitadel.lo
+$(LIBRARY): $(LIB_OBJS)
+ $(LINK_LIB) $(LIB_OBJS)
+
+lib/libcitadel.lo: lib/libcitadel.c lib/libcitadel.h
+
+.SUFFIXES: .c .cpp .lo .o
+
+.cpp.o:
+ $(CXXCOMPILE) -o $@ -c $<
+.c.o:
+ $(COMPILE) -o $@ -c $<
+.c.lo:
+ $(LTCOMPILE) -o $@ -c $<
+
+.PHONY: buildlib all \
+ clean distclean extraclean maintainer-clean \
+ dist distdir \
+ install uninstall
--- /dev/null
+dnl configuration script for libcitadel
+dnl Process this file with autoconf to produce a configure script.
+dnl
+
+dnl Ensure that libcitadel is configured with autoconf 2.52 or newer
+AC_PREREQ(2.52)
+
+AC_INIT(citadel, 1.00, example@example.com)
+undefine([expat_version])
+
+AC_CONFIG_SRCDIR(Makefile.in)
+AC_CONFIG_AUX_DIR(conftools)
+
+
+dnl
+dnl Increment LIBREVISION if source code has changed at all
+dnl
+dnl If the API has changed, increment LIBCURRENT and set LIBREVISION to 0
+dnl
+dnl If the API changes compatibly (i.e. simply adding a new function
+dnl without changing or removing earlier interfaces), then increment LIBAGE.
+dnl
+dnl If the API changes incompatibly set LIBAGE back to 0
+dnl
+
+LIBCURRENT=1
+LIBREVISION=0
+LIBAGE=0
+
+sinclude(conftools/libtool.m4)
+sinclude(conftools/ac_c_bigendian_cross.m4)
+
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
+
+AC_SUBST(LIBCURRENT)
+AC_SUBST(LIBREVISION)
+AC_SUBST(LIBAGE)
+
+dnl Checks for programs.
+AC_PROG_CC
+AC_PROG_INSTALL
+
+if test "$GCC" = yes ; then
+ dnl
+ dnl Be careful about adding the -fexceptions option; some versions of
+ dnl GCC don't support it and it causes extra warnings that are only
+ dnl distracting; avoid.
+ dnl
+ OLDCFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wstrict-prototypes"
+ CFLAGS="$OLDCFLAGS -fexceptions"
+ AC_MSG_CHECKING(whether $CC accepts -fexceptions)
+ AC_TRY_LINK( , ,
+ AC_MSG_RESULT(yes),
+ AC_MSG_RESULT(no); CFLAGS="$OLDCFLAGS")
+ CXXFLAGS=`echo "$CFLAGS" | sed 's/ -Wmissing-prototypes -Wstrict-prototypes//'`
+fi
+
+dnl Checks for header files.
+AC_HEADER_STDC
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+
+dnl Note: Avoid using AC_C_BIGENDIAN because it does not
+dnl work in a cross compile.
+AC_C_BIGENDIAN_CROSS
+
+AC_C_CONST
+AC_TYPE_SIZE_T
+AC_CHECK_FUNCS(memmove bcopy)
+
+AC_CONFIG_FILES(Makefile)
+AC_OUTPUT
+
+abs_srcdir="`cd $srcdir && pwd`"
+abs_builddir="`pwd`"
+if test "$abs_srcdir" != "$abs_builddir"; then
+ make mkdir-init
+fi
--- /dev/null
+/*
+ * $Id$
+ *
+ */
+
+#include "libcitadel.h"
+
+char *libcitadel_version_string(void) {
+ return "$Id$";
+}
--- /dev/null
+/*
+ * $Id$
+ *
+ */
+
+char *libcitadel_version_string(void);
+++ /dev/null
-/*
- * $Id$
- *
- */
-
-#include "libcitadel.h"
-
-char *libcitadel_version_string(void) {
- return "$Id$";
-}
+++ /dev/null
-/*
- * $Id$
- *
- */
-
-char *libcitadel_version_string(void);