initial commit master
authorMichael Rasmussen <mir@datanom.net>
Mon, 31 Dec 2018 00:53:13 +0000 (01:53 +0100)
committerMichael Rasmussen <mir@datanom.net>
Mon, 31 Dec 2018 00:53:13 +0000 (01:53 +0100)
Signed-off-by: Michael Rasmussen <mir@datanom.net>
14 files changed:
.gitignore [new file with mode: 0644]
AUTHORS [new file with mode: 0644]
ChangeLog [new file with mode: 0644]
Makefile.am [new file with mode: 0644]
NEWS [new file with mode: 0644]
README [new file with mode: 0644]
TODO [new file with mode: 0644]
autogen.sh [new file with mode: 0755]
configure.ac [new file with mode: 0644]
sqlite_plugin/Makefile.am [new file with mode: 0644]
sqlite_plugin/sqlite-plugin.c [new file with mode: 0644]
sqlite_plugin/sqlite-plugin.h [new file with mode: 0644]
src/Makefile.am [new file with mode: 0644]
src/addressbook.c [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..369a1f8
--- /dev/null
@@ -0,0 +1,2 @@
+*.o
+*.in
diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..0ca70c3
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1 @@
+Michael Rasmussen <mir@datanom.net>
diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..8160d2f
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1 @@
+0.1 Framework
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..0759647
--- /dev/null
@@ -0,0 +1,15 @@
+AUTOMAKE_OPTIONS = gnu
+
+ACLOCAL_AMFLAGS = -I m4
+
+SUBDIRS = \
+               src
+
+EXTRA_DIST = \
+            AUTHORS \
+            ChangeLog \
+            NEWS \
+            README \
+            TODO \
+            autogen.sh
+
diff --git a/NEWS b/NEWS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/TODO b/TODO
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/autogen.sh b/autogen.sh
new file mode 100755 (executable)
index 0000000..a10227f
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+if [ ! -e m4 ]; then
+    mkdir m4
+fi
+
+if [ ! -e auxdir ]; then
+    mkdir auxdir
+fi
+
+aclocal -I m4 \
+  && libtoolize --force --copy \
+  && autoheader \
+  && automake --add-missing --gnu --copy \
+  && autoconf \
+  && ./configure --enable-maintainer-mode $@
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..7b2987d
--- /dev/null
@@ -0,0 +1,122 @@
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.61)
+AC_INIT(addressbook, 0.1, [mir@datanom.net])
+AC_COPYRIGHT([Copyright (c) 2018 Michael Rasmussen.])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_AUX_DIR(auxdir)
+AC_CANONICAL_SYSTEM
+
+AC_CONFIG_SRCDIR([src/addressbook.c])
+AM_INIT_AUTOMAKE([gnu no-dist-gzip dist-bzip2 1.10])
+AC_CONFIG_HEADERS([config.h])
+AM_MAINTAINER_MODE
+
+CFLAGS="-g -Wall"
+
+if test "x$USE_MAINTAINER_MODE" = "xyes"; then
+    CFLAGS="${CFLAGS} -Werror -DDEBUG"
+    AC_DEFINE_UNQUOTED(DEBUG, [1], [Enable debug mode.])
+else
+    CFLAGS="${CFLAGS} -O -O2"
+fi
+
+GLIB_REQUIRED=2.26.0
+GOBJECT_REQUIRED=2.26.0
+GTK_REQUIRED=2.18.0
+SQLITE3_REQUIRED=3.5.0
+
+AC_SUBST(GLIB_REQUIRED)
+AC_SUBST(GOBJECT_REQUIRED)
+AC_SUBST(GTK_REQUIRED)
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_LIBTOOL
+if test -n "$lt_prog_compiler_pic"; then
+    CFLAGS="$CFLAGS $lt_prog_compiler_pic"
+fi
+
+PKG_PROG_PKG_CONFIG
+AC_LIB_PREFIX
+
+# Checks for libraries.
+PKG_CHECK_MODULES([GLIB],
+                  [glib-2.0 >= $GLIB_REQUIRED
+                   gobject-2.0 >= $GOBJECT_REQUIRED
+                   gmodule-2.0]
+)
+AC_SUBST(GLIB_CFLAGS)
+AC_SUBST(GLIB_LIBS)
+
+PKG_CHECK_MODULES([GTK], gtk+-2.0 >= $GTK_REQUIRED)
+AC_SUBST(GTK_CFLAGS)
+AC_SUBST(GTK_LIBS)
+
+AC_ARG_ENABLE(sqlite,
+        [AC_HELP_STRING([--enable-sqlite],[Build the included SQLite plugin [default=yes]])],
+        [ac_enable_sqlite=$enableval],
+        [ac_enable_sqlite=yes])
+
+AC_MSG_CHECKING([whether to compile SQLite3 module])
+if test x"$ac_enable_sqlite" = xyes; then
+       AC_MSG_RESULT(yes)
+    PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= $SQLITE3_REQUIRED],
+                                 [ac_enable_sqlite=yes],
+                                 [ac_enable_sqlite=no])
+    AC_SUBST(SQLITE3_LIBS)
+    AC_SUBST(SQLITE3_CFLAGS)
+    if test x"$ac_enable_sqlite" = "xno"; then
+       AC_MSG_RESULT([$SQLITE3_PKG_ERRORS])
+    fi
+fi
+AM_CONDITIONAL(BUILD_SQLITE, test x"$ac_enable_sqlite" = "xyes")
+
+AC_ARG_WITH([moduledir],
+        [AC_HELP_STRING([--with-moduledir[[=DIR]]],[Build the included SQLite plugin [default=yes]])],
+        [with_moduledir=$withval],
+        [with_moduledir=check])
+
+if test "x$with_moduledir" = "xcheck"; then
+       if test "x$USE_MAINTAINER_MODE" = "xyes"; then
+           PLUGINDIR="${ac_pwd}/src/libaddressbook"
+           plugindir="${ac_pwd}/src/libaddressbook"
+       else
+           if test "x$prefix" = "xNONE"; then
+               prefix=$ac_default_prefix
+           fi
+           PLUGINDIR="${prefix}/lib/addressbook/plugins"
+           plugindir="${prefix}/lib/addressbook/plugins"
+       fi
+else
+    PLUGINDIR="$with_moduledir"
+    plugindir="$with_moduledir"
+fi
+AC_SUBST(PLUGINDIR)
+AC_DEFINE_UNQUOTED(PLUGINDIR, "$plugindir", [Define plugin dir.])
+
+# Checks for header files.
+AC_CHECK_HEADER([assert.h],
+               AC_DEFINE([HAVE_ASSERT_H], [1], [Define to 1 if you have the <assert.h> header file.]))
+
+# Checks for typedefs, structures, and compiler characteristics.
+
+# Checks for library functions.
+
+AC_CONFIG_FILES([
+                 Makefile
+                 src/Makefile
+                 sqlite_plugin/Makefile
+])
+
+AC_OUTPUT
+echo "
+Configuration:
+
+        Source code:            ${ac_pwd}
+        Plugin dir:             ${plugindir}
+        Compiler:               ${CC} $($CC -dumpversion)
+        CFLAGS:                 ${CFLAGS}
+"
diff --git a/sqlite_plugin/Makefile.am b/sqlite_plugin/Makefile.am
new file mode 100644 (file)
index 0000000..64c8578
--- /dev/null
@@ -0,0 +1,26 @@
+AUTOMAKE_OPTIONS = gnu
+
+plugindir = @PLUGINDIR@
+
+if BUILD_SQLITE
+plugin_LTLIBRARIES = sqlite_plugin.la
+endif
+
+sqlite_plugin_la_CPPFLAGS = \
+               -I${top_srcdir} \
+               -I${top_builddir} \
+               $(AM_CPPFLAGS)
+
+sqlite_plugin_la_CFLAGS = \
+               @GLIB_CFLAGS@ \
+               @SQLITE3_CFLAGS@ \
+               $(AM_CFLAGS)
+
+sqlite_plugin_la_SOURCES = \
+               sqlite-plugin.h \
+               sqlite-plugin.c
+
+sqlite_plugin_la_LDFLAGS = \
+               -module -avoid-version \
+               $(AM_LDFLAGS)
+
diff --git a/sqlite_plugin/sqlite-plugin.c b/sqlite_plugin/sqlite-plugin.c
new file mode 100644 (file)
index 0000000..47ce332
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * addressbook is Copyright (C) 2009 by Michael Rasmussen.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#       include <config.h>
+#endif
+#include <glib.h>
+#include <glib-object.h>
+#include <gmodule.h>
+
+#include <sqlite3.h>
+
+#include "sqlite-plugin.h"
+
diff --git a/sqlite_plugin/sqlite-plugin.h b/sqlite_plugin/sqlite-plugin.h
new file mode 100644 (file)
index 0000000..913abbc
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * addressbook is Copyright (C) 2009 by Michael Rasmussen.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef __SQLITE_PLUGIN_H__
+#define __SQLITE_PLUGIN_H__
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+#ifdef HAVE_CONFIG_H
+#       include <config.h>
+#endif
+#include <glib-object.h>
+
+G_END_DECLS
+
+#endif /* __SQLITE_PLUGIN_H__ */
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644 (file)
index 0000000..9d3e2de
--- /dev/null
@@ -0,0 +1,17 @@
+AUTOMAKE_OPTIONS = gnu
+
+AM_CPPFLAGS = \
+          -I${top_srcdir} \
+          -I${top_builddir} \
+          @GLIB_CFLAGS@ \
+          @GTK_CFLAGS@
+
+bin_PROGRAMS = addressbook
+
+addressbook_SOURCES = \
+                 addressbook.c
+
+addressbook_LDADD = \
+               @GLIB_LIBS@ \
+               @GTK_LIBS@
+
diff --git a/src/addressbook.c b/src/addressbook.c
new file mode 100644 (file)
index 0000000..2b8c6ac
--- /dev/null
@@ -0,0 +1,4 @@
+
+int main() {
+    return 0;
+}
This page took 0.050649 seconds and 5 git commands to generate.