# HG changeset patch
# User ladanyi
# Date 1083851284 0
# Node ID 69bde1d90c045792a6980f6f37b9ac1722066a5a
# Parent  5c5d970ef2f03188ae9c06f428ba1e6fdfcef7ff
Set up automake environment.

diff -r 5c5d970ef2f0 -r 69bde1d90c04 Makefile.am
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile.am	Thu May 06 13:48:04 2004 +0000
@@ -0,0 +1,8 @@
+SUBDIRS = src doc
+
+docs:
+	@cd doc \
+	&& $(MAKE) $(AM_MAKEFLAGS) clean \
+	&& $(MAKE) $(AM_MAKEFLAGS) all
+
+.PHONY: docs
diff -r 5c5d970ef2f0 -r 69bde1d90c04 bootstrap
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bootstrap	Thu May 06 13:48:04 2004 +0000
@@ -0,0 +1,4 @@
+#! /bin/sh
+aclocal-1.7 \
+&& automake-1.7 --gnu --add-missing \
+&& autoconf
diff -r 5c5d970ef2f0 -r 69bde1d90c04 configure.ac
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/configure.ac	Thu May 06 13:48:04 2004 +0000
@@ -0,0 +1,29 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT([HugoLib], [0.1], [etik-ol@cs.elte.hu], [hugo])
+AC_CONFIG_AUX_DIR([config])
+AM_INIT_AUTOMAKE(1.7)
+AC_CONFIG_SRCDIR([src/hugo/invalid.h])
+AC_PREREQ(2.57)
+
+dnl Checks for programs.
+AC_PROG_CC
+AC_PROG_CXX
+
+dnl Checks for libraries.
+
+dnl Checks for header files.
+AC_CHECK_HEADERS(limits.h sys/time.h unistd.h)
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_C_INLINE
+AC_TYPE_SIZE_T
+AC_HEADER_TIME
+AC_STRUCT_TM
+
+dnl Checks for library functions.
+AC_HEADER_STDC
+AC_CHECK_FUNCS(gettimeofday)
+
+AC_CONFIG_FILES([Makefile doc/Makefile src/Makefile src/hugo/Makefile src/test/Makefile])
+AC_OUTPUT
diff -r 5c5d970ef2f0 -r 69bde1d90c04 doc/Doxyfile
--- a/doc/Doxyfile	Thu May 06 13:46:07 2004 +0000
+++ b/doc/Doxyfile	Thu May 06 13:48:04 2004 +0000
@@ -394,8 +394,8 @@
 INPUT                  = mainpage.dox \
                          maps.dox coding_style.dox \
                          groups.dox \
-                         ../src/include \
-                         ../src/include/skeletons \
+                         ../src/hugo \
+                         ../src/hugo/skeletons \
                          ../src/work/alpar/list_graph.h \
                          ../src/work/athos/minlengthpaths.h \
                          ../src/work/klao/path.h \
diff -r 5c5d970ef2f0 -r 69bde1d90c04 doc/Makefile.am
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/Makefile.am	Thu May 06 13:48:04 2004 +0000
@@ -0,0 +1,40 @@
+## TODO: Doxyfile should be generated from Doxyfile.in by configure. This way
+## the value of PROJECT_NAME, PROJRCT_NUMBER, PERL_PATH, etc. could be
+## substituted in configure-time.
+
+htmldir = $(datadir)/doc/@PACKAGE@-@VERSION@/html
+## htmldir = $(pkgdatadir)/doc
+
+EXTRA_DIST = Doxyfile html
+
+all-local: html/index.html
+
+## TODO: 'html/index.html' should depend on the files listed in Doxyfile's
+## INPUT variable.
+html/index.html: Doxyfile
+	-rm -rf html
+	doxygen Doxyfile
+
+## This is needed to make 'make dist' work even if the 'html' subdirectory
+## does not exist.
+html: html/index.html
+
+clean-local:
+	-rm -rf html
+
+install-data-local: html/index.html
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(htmldir)
+	@dir='$(<D)'; for p in $$dir/*.html $$dir/*.css $$dir/*.png $$dir/*.dot $$dir/*.php $$dir/*.idx ; do \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/$$f"; \
+	  $(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/$$f; \
+	done
+
+uninstall-local: html/index.html
+	@$(NORMAL_UNINSTALL)
+	@dir='$(<D)'; for p in $$dir/*.html $$dir/*.css $$dir/*.png $$dir/*.dot $$dir/*.php $$dir/*.idx ; do \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f $(DESTDIR)$(htmldir)/$$f"; \
+	  rm -f $(DESTDIR)$(htmldir)/$$f; \
+	done
diff -r 5c5d970ef2f0 -r 69bde1d90c04 doc/makefile
--- a/doc/makefile	Thu May 06 13:46:07 2004 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-doxy:
-	rm -rf html latex
-	doxygen Doxyfile
-
-texi: etikol.texi flf-graph.texi
-	makeinfo etikol.texi&&makeinfo --html etikol.texi&&texi2pdf etikol.texi
-
-texi-html: etikol.texi flf-graph.texi
-	makeinfo etikol.texi&&makeinfo --html etikol.texi
-
-clean:
-	rm -rf html latex
diff -r 5c5d970ef2f0 -r 69bde1d90c04 src/Makefile.am
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Makefile.am	Thu May 06 13:48:04 2004 +0000
@@ -0,0 +1,1 @@
+SUBDIRS = hugo test
diff -r 5c5d970ef2f0 -r 69bde1d90c04 src/hugo/Makefile.am
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hugo/Makefile.am	Thu May 06 13:48:04 2004 +0000
@@ -0,0 +1,12 @@
+pkginclude_HEADERS =							\
+	bin_heap.h							\
+	dijkstra.h							\
+	dimacs.h							\
+	error.h								\
+	fib_heap.h							\
+	invalid.h							\
+	maps.h								\
+	smart_graph.h							\
+	time_measure.h							\
+	unionfind.h							\
+	xy.h
diff -r 5c5d970ef2f0 -r 69bde1d90c04 src/hugo/bin_heap.h
--- a/src/hugo/bin_heap.h	Thu May 06 13:46:07 2004 +0000
+++ b/src/hugo/bin_heap.h	Thu May 06 13:48:04 2004 +0000
@@ -58,8 +58,8 @@
  */
 
 
-#ifndef BIN_HEAP_HH
-#define BIN_HEAP_HH
+#ifndef HUGO_BIN_HEAP_H
+#define HUGO_BIN_HEAP_H
 
 ///\ingroup auxdat
 ///\file
diff -r 5c5d970ef2f0 -r 69bde1d90c04 src/hugo/dijkstra.h
--- a/src/hugo/dijkstra.h	Thu May 06 13:46:07 2004 +0000
+++ b/src/hugo/dijkstra.h	Thu May 06 13:48:04 2004 +0000
@@ -6,8 +6,8 @@
 ///\file
 ///\brief Dijkstra algorithm.
 
-#include <bin_heap.h>
-#include <invalid.h>
+#include <hugo/bin_heap.h>
+#include <hugo/invalid.h>
 
 namespace hugo {
 
diff -r 5c5d970ef2f0 -r 69bde1d90c04 src/hugo/dimacs.h
--- a/src/hugo/dimacs.h	Thu May 06 13:46:07 2004 +0000
+++ b/src/hugo/dimacs.h	Thu May 06 13:48:04 2004 +0000
@@ -5,7 +5,7 @@
 #include <iostream>
 #include <string>
 #include <vector>
-#include <maps.h>
+#include <hugo/maps.h>
 
 /// \file
 /// \brief Dimacs file format reader.
diff -r 5c5d970ef2f0 -r 69bde1d90c04 src/hugo/skeletons/graph.h
--- a/src/hugo/skeletons/graph.h	Thu May 06 13:46:07 2004 +0000
+++ b/src/hugo/skeletons/graph.h	Thu May 06 13:48:04 2004 +0000
@@ -5,7 +5,7 @@
 ///\file
 ///\brief Declaration of GraphSkeleton.
 
-#include <invalid.h>
+#include <hugo/invalid.h>
 
 /// The namespace of HugoLib
 namespace hugo {
diff -r 5c5d970ef2f0 -r 69bde1d90c04 src/hugo/smart_graph.h
--- a/src/hugo/smart_graph.h	Thu May 06 13:46:07 2004 +0000
+++ b/src/hugo/smart_graph.h	Thu May 06 13:48:04 2004 +0000
@@ -10,7 +10,7 @@
 #include <vector>
 #include <limits.h>
 
-#include "invalid.h"
+#include <hugo/invalid.h>
 
 namespace hugo {
 
diff -r 5c5d970ef2f0 -r 69bde1d90c04 src/hugo/unionfind.h
--- a/src/hugo/unionfind.h	Thu May 06 13:46:07 2004 +0000
+++ b/src/hugo/unionfind.h	Thu May 06 13:48:04 2004 +0000
@@ -12,7 +12,7 @@
 #include <utility>
 #include <algorithm>
 
-#include <invalid.h>
+#include <hugo/invalid.h>
 
 namespace hugo {
 
diff -r 5c5d970ef2f0 -r 69bde1d90c04 src/test/Makefile.am
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/test/Makefile.am	Thu May 06 13:48:04 2004 +0000
@@ -0,0 +1,8 @@
+AM_CPPFLAGS = -I$(top_srcdir)/src
+
+check_PROGRAMS = graph_test
+
+TESTS = $(check_PROGRAMS)
+XFAIL_TESTS =
+
+graph_test_SOURCES = graph_test.cc
diff -r 5c5d970ef2f0 -r 69bde1d90c04 src/test/dijkstra_heap_test.cc
--- a/src/test/dijkstra_heap_test.cc	Thu May 06 13:46:07 2004 +0000
+++ b/src/test/dijkstra_heap_test.cc	Thu May 06 13:48:04 2004 +0000
@@ -14,12 +14,12 @@
 #include <iostream>
 #include <math.h>
 
-#include <smart_graph.h>
-#include <dimacs.h>
-#include <dijkstra.h>
-#include <time_measure.h>
-#include <bin_heap.h>
-#include <fib_heap.h>
+#include <hugo/smart_graph.h>
+#include <hugo/dimacs.h>
+#include <hugo/dijkstra.h>
+#include <hugo/time_measure.h>
+#include <hugo/bin_heap.h>
+#include <hugo/fib_heap.h>
 
 using namespace hugo;
 
diff -r 5c5d970ef2f0 -r 69bde1d90c04 src/test/error_test.cc
--- a/src/test/error_test.cc	Thu May 06 13:46:07 2004 +0000
+++ b/src/test/error_test.cc	Thu May 06 13:48:04 2004 +0000
@@ -1,6 +1,6 @@
 #include <iostream>
 
-#include <error.h>
+#include <hugo/error.h>
 
 using namespace hugo;
 using std::cout;
diff -r 5c5d970ef2f0 -r 69bde1d90c04 src/test/graph_test.cc
--- a/src/test/graph_test.cc	Thu May 06 13:46:07 2004 +0000
+++ b/src/test/graph_test.cc	Thu May 06 13:48:04 2004 +0000
@@ -1,6 +1,6 @@
 #include<iostream>
-#include<smart_graph.h>
-#include<skeletons/graph.h>
+#include<hugo/smart_graph.h>
+#include<hugo/skeletons/graph.h>
 #include<../work/alpar/list_graph.h>
 
 /*
diff -r 5c5d970ef2f0 -r 69bde1d90c04 src/test/makefile
--- a/src/test/makefile	Thu May 06 13:46:07 2004 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-INCLUDEDIRS ?= -I../include
-CXXFLAGS += -W -Wall -O3 -ansi -pedantic $(INCLUDEDIRS) 
-#LEDAROOT ?= /ledasrc/LEDA-4.1
-
-BINARIES = dijkstra_heap_test unionfind_test error_test
-
-ifdef GCCVER
-CXX := g++-$(GCCVER)
-else
-CXX := $(shell type -p g++-3.3 || type -p g++-3.2 || type -p g++-3.0 || type -p g++-3 || echo g++)
-endif
-
-CC=$(CXX)
-
-all: $(BINARIES)
-
-.depend dep depend:
-	$(CXX) $(INCLUDEDIRS) -M $(BINARIES:=.cc) > .depend
-
-makefile: .depend
-sinclude .depend
-
-clean:
-	$(RM) *.o $(BINARIES) .depend
-
-.PHONY: all clean dep depend
diff -r 5c5d970ef2f0 -r 69bde1d90c04 src/test/unionfind_test.cc
--- a/src/test/unionfind_test.cc	Thu May 06 13:46:07 2004 +0000
+++ b/src/test/unionfind_test.cc	Thu May 06 13:48:04 2004 +0000
@@ -1,7 +1,7 @@
 #include <iostream>
 
-#include <maps.h>
-#include <unionfind.h>
+#include <hugo/maps.h>
+#include <hugo/unionfind.h>
 
 using namespace hugo;
 using namespace std;
diff -r 5c5d970ef2f0 -r 69bde1d90c04 src/test/xy_test.cc
--- a/src/test/xy_test.cc	Thu May 06 13:46:07 2004 +0000
+++ b/src/test/xy_test.cc	Thu May 06 13:48:04 2004 +0000
@@ -1,4 +1,4 @@
-#include <xy.h>
+#include <hugo/xy.h>
 #include <iostream>
 using namespace std;
 using namespace hugo;
diff -r 5c5d970ef2f0 -r 69bde1d90c04 src/work/alpar/list_graph.h
--- a/src/work/alpar/list_graph.h	Thu May 06 13:46:07 2004 +0000
+++ b/src/work/alpar/list_graph.h	Thu May 06 13:48:04 2004 +0000
@@ -10,7 +10,7 @@
 #include <vector>
 #include <limits.h>
 
-#include "invalid.h"
+#include <hugo/invalid.h>
 
 namespace hugo {