Use autoconf, automake & libtool
authorPetri Lehtinen <petri@digip.org>
Tue, 12 May 2009 19:21:50 +0000 (22:21 +0300)
committerPetri Lehtinen <petri@digip.org>
Tue, 12 May 2009 19:21:50 +0000 (22:21 +0300)
Makefile.am [new file with mode: 0644]
config.h.in [new file with mode: 0644]
configure.ac [new file with mode: 0644]
src/Makefile [deleted file]
src/Makefile.am [new file with mode: 0644]

diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..af437a6
--- /dev/null
@@ -0,0 +1 @@
+SUBDIRS = src
diff --git a/config.h.in b/config.h.in
new file mode 100644 (file)
index 0000000..bcc3ed3
--- /dev/null
@@ -0,0 +1,59 @@
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#undef LT_OBJDIR
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..b9fb191
--- /dev/null
@@ -0,0 +1,26 @@
+AC_PREREQ([2.63])
+AC_INIT([jansson], [0.1], [petri@digip.org])
+
+AM_INIT_AUTOMAKE([1.10 foreign])
+AM_MAINTAINER_MODE
+
+AC_CONFIG_SRCDIR([src/value.c])
+AC_CONFIG_HEADERS([config.h])
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_LIBTOOL
+
+# Checks for libraries.
+
+# Checks for header files.
+
+# Checks for typedefs, structures, and compiler characteristics.
+
+# Checks for library functions.
+
+AC_CONFIG_FILES([
+        Makefile
+        src/Makefile
+])
+AC_OUTPUT
diff --git a/src/Makefile b/src/Makefile
deleted file mode 100644 (file)
index ebc67ad..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-CFLAGS = -I../include -std=c99 -Wall -Wextra -Werror -g -O0
-
-OBJS = dump.o load.o value.o hashtable.o
-
-LIB = libjansson.a
-
-all: $(LIB)
-
-$(LIB): $(OBJS)
-       ar crsv $@ $^
-
-clean:
-       rm -f -- $(OBJS)
-       rm -f -- $(LIB)
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644 (file)
index 0000000..4471220
--- /dev/null
@@ -0,0 +1,7 @@
+include_HEADERS = jansson.h
+
+lib_LTLIBRARIES = libjansson.la
+libjansson_la_SOURCES = dump.c hashtable.h hashtable.c load.c value.c
+libjansson_la_LDFLAGS = -version-info 0:0:0
+
+AM_CFLAGS = -Wall -Wextra -std=c99