]> saetta.ns0.it Git - libzakdbt/commitdiff
New autogen.sh.
authorAndrea Zagli <azagli@libero.it>
Sat, 20 Jan 2018 08:23:53 +0000 (09:23 +0100)
committerAndrea Zagli <azagli@libero.it>
Sat, 20 Jan 2018 08:23:53 +0000 (09:23 +0100)
.gitignore
autogen.sh
config.h.in [deleted file]
configure.ac
tests/test.c

index d4cf8a5da6adefc6984a987b99cff108a1138065..a0f8da4a98408e5cd068122ad4e53c5f7b76ce63 100644 (file)
@@ -50,3 +50,5 @@ Rules-quot
 .cproject
 .project
 .settings
+compile
+config.h.in
\ No newline at end of file
index 24e7bd54b93fba0e6f1d9b4d7300ba19a33d5218..c32ddd775e9c6fdf8b979b8d7ea89b89a9d99c47 100755 (executable)
@@ -1,23 +1,44 @@
-#!/bin/bash
+#!/bin/sh
 # Run this to generate all the initial makefiles, etc.
+test -n "$srcdir" || srcdir=`dirname "$0"`
+test -n "$srcdir" || srcdir=.
 
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
+olddir=`pwd`
 
-PKG_NAME="libdbtransformer"
+cd $srcdir
 
-(test -f $srcdir/configure.ac \
-  && test -d $srcdir/src \
-  && test -f $srcdir/src/libdbtransformer.h) || {
-    echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
-    echo " top-level libdbtransformer directory"
-    exit 1
+(test -f configure.ac) || {
+        echo "*** ERROR: Directory "\`$srcdir\'" does not look like the top-level project directory ***"
+        exit 1
 }
 
-which gnome-autogen.sh || {
-    echo "You need to install gnome-common from GNOME and make"
-    echo "sure the gnome-autogen.sh script is in your \$PATH."
-    exit 1
-}
+PKG_NAME=`autoconf --trace 'AC_INIT:$1' configure.ac`
+
+if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
+        echo "*** WARNING: I am going to run \`configure' with no arguments." >&2
+        echo "*** If you wish to pass any to it, please specify them on the" >&2
+        echo "*** \`$0\' command line." >&2
+        echo "" >&2
+fi
+
+set -x
+aclocal --install || exit 1
+glib-gettextize --force --copy || exit 1
+gtkdocize --copy || exit 1
+intltoolize --force --copy --automake || exit 1
+autoreconf --verbose --force --install -Wno-portability || exit 1
+
+cd $olddir
+if [ "$NOCONFIGURE" = "" ]; then
+        $srcdir/configure "$@" || exit 1
+
+        if [ "$1" = "--help" ]; then
+                       exit 0
+               else
+            echo "Now type \`make\' to compile $PKG_NAME" || exit 1
+        fi
+else
+        echo "Skipping configure process."
+fi
 
-USE_GNOME2_MACROS=1 . gnome-autogen.sh
+{ set +x; } 2>/dev/null
diff --git a/config.h.in b/config.h.in
deleted file mode 100644 (file)
index 8ee95d7..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/* 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 home page for this package. */
-#undef PACKAGE_URL
-
-/* 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
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
index 03b251adc9fea3b6c61fb4b00b4e8be40429993d..64e8829cc46483965eba9a5aad5d113fe197f7fc 100644 (file)
@@ -6,7 +6,10 @@ AC_INIT([libdbtransformers], [0.0.1], [azagli@libero.it])
 AC_CONFIG_SRCDIR([src/dbtransformer.c])
 AC_CONFIG_HEADER([config.h])
 
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE(-Wall)
+
+m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
+
 AM_MAINTAINER_MODE
 
 AC_CONFIG_MACRO_DIR([m4])
@@ -29,7 +32,7 @@ AC_PROG_RANLIB
 GTK_DOC_CHECK
 
 # Checks for libraries.
-PKG_CHECK_MODULES(DBT, [libgda-4.0 >= 4.1.8
+PKG_CHECK_MODULES(DBT, [libgda-5.0
                         libxslt >= 1.0.0])
 
 AC_SUBST(DBT_CFLAGS)
index f7937b0afbfc0e3e5b215dcc9099416b6a1cd0fe..41bccca17fe88043866738ce181125e3e8b317e3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2010-2018 Andrea Zagli <azagli@libero.it>
  *
  *  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
@@ -23,8 +23,6 @@ Dbt *dbt;
 int
 main (int argc, char **argv)
 {
-       g_type_init ();
-
        dbt = dbt_new ();
 
        dbt_set_db_connection_from_string (dbt, "SQLite://DB_DIR=tests;DB_NAME=test.db");
@@ -33,7 +31,7 @@ main (int argc, char **argv)
        if (dbt_db_is_updated (dbt))
                {
                        g_message ("Database is updated.");
-                       return;
+                       return 0;
                }
        else
                {