Permalink
Browse files

Added autotools support.

Thanks to Daniel K. O.
  • Loading branch information...
danfis committed Sep 29, 2010
1 parent c4b2af1 commit e653cf6fd398d50e5558cb2f1cda6d44235062a2
Showing with 115 additions and 7 deletions.
  1. +13 −0 .gitignore
  2. +6 −0 Makefile.am
  3. +7 −0 bootstrap
  4. +47 −0 configure.ac
  5. +16 −0 src/Makefile.am
  6. +0 −7 src/gjk/config.h.in
  7. +20 −0 src/testsuites/Makefile.am
  8. +6 −0 src/testsuites/cu/Makefile.am
View
@@ -0,0 +1,13 @@
+Makefile.in
+autom4te.cache/*
+aclocal.m4
+config.guess
+config.sub
+configure
+depcomp
+install-sh
+ltmain.sh
+missing
+*~
+src/gjk/config.h.in
+build/*
View
@@ -0,0 +1,6 @@
+SUBDIRS = src
+
+EXTRA_DIST = doc \
+ BSD-LICENSE \
+ README \
+ make-release.sh
View
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+libtoolize -f -c
+aclocal
+autoheader -f
+autoconf
+automake -a --foreign -f -c
View
@@ -0,0 +1,47 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+#AC_PREREQ([2.65])
+AC_INIT([libgjk], [0.1], [danfis@danfis.cz])
+AC_CONFIG_SRCDIR([src/gjk.c])
+AC_CONFIG_HEADERS([src/gjk/config.h])
+AM_INIT_AUTOMAKE
+
+# Checks for programs.
+AC_PROG_CXX
+AC_PROG_CC
+AC_PROG_INSTALL
+LT_INIT
+
+# Checks for libraries.
+AC_CHECK_LIB([m], [main])
+# FIXME: Replace `main' with a function in `-lrt':
+AC_CHECK_LIB([rt], [main])
+
+# Checks for header files.
+AC_CHECK_HEADERS([float.h stdlib.h string.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_TYPE_SIZE_T
+
+# Checks for library functions.
+AC_FUNC_FORK
+AC_FUNC_REALLOC
+AC_CHECK_FUNCS([clock_gettime])
+
+use_double=no
+AC_ARG_ENABLE(double, AS_HELP_STRING([--enable-double], [enable double precision computations instead of single precision]),
+ [use_double=yes])
+if test $use_double = no
+then
+ AC_DEFINE([GJK_SINGLE], [], [use single precision])
+else
+ AC_DEFINE([GJK_DOUBLE], [], [use double precision])
+fi
+
+
+AC_CONFIG_FILES([Makefile
+ src/Makefile
+ src/testsuites/Makefile
+ src/testsuites/cu/Makefile])
+AC_OUTPUT
View
@@ -0,0 +1,16 @@
+SUBDIRS = . testsuites
+
+lib_LTLIBRARIES = libgjk.la
+
+libgjk_la_SOURCES = alloc.c gjk/alloc.h \
+ gjk/compiler.h \
+ gjk/dbg.h \
+ gjk.c gjk/gjk.h \
+ gjk_support.c gjk/gjk_support.h \
+ gjk/list.h \
+ polytope.c gjk/polytope.h \
+ gjk/quat.h \
+ gjk/simplex.h \
+ support.c gjk/support.h \
+ vec3.c gjk/vec3.h
+
View
@@ -1,7 +0,0 @@
-#ifndef __GJK_CONFIG_H__
-#define __GJK_CONFIG_H__
-
-ifdef(`USE_SINGLE', `#define GJK_SINGLE')
-ifdef(`USE_DOUBLE', `#define GJK_DOUBLE')
-
-#endif /* __GJK_CONFIG_H__ */
View
@@ -0,0 +1,20 @@
+SUBDIRS = cu
+
+AM_CPPFLAGS = -I $(srcdir)/.. -I $(srcdir)/cu
+
+LDADD = $(builddir)/cu/libcu.la $(builddir)/../libgjk.la
+
+
+check_PROGRAMS = test bench
+
+test_SOURCES = main.c \
+ common.c common.h \
+ vec3.c vec3.h \
+ polytope.c polytope.h \
+ boxbox.c boxbox.h \
+ spheresphere.c spheresphere.h \
+ cylcyl.c cylcyl.h \
+ boxcyl.c boxcyl.h
+
+bench_SOURCES = bench.c
+
@@ -0,0 +1,6 @@
+AM_CPPFLAGS = -DCU_ENABLE_TIMER
+
+check_LTLIBRARIES = libcu.la
+
+libcu_la_SOURCES = cu.c cu.h
+

0 comments on commit e653cf6

Please sign in to comment.