Modified source, so it now compiles separately

This commit is contained in:
Gergely Polonkai 2013-09-05 12:25:58 +02:00
parent c470345ae7
commit 4d5714348a
6 changed files with 69 additions and 3 deletions

4
Makefile.am Normal file
View File

@ -0,0 +1,4 @@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = swe/src src docs/reference/swe-glib
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc

22
autogen.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
PKG_NAME="astrognome"
(test -f $srcdir/configure.ac \
&& test -f $srcdir/src/swe-glib.c) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level $PKG_NAME directory"
exit 1
}
which gnome-autogen.sh || {
echo "gnome-autogen.sh not found, you need to install gnome-common"
exit 1
}
REQUIRED_AUTOMAKE_VERSION=1.9 . gnome-autogen.sh

40
configure.ac Normal file
View File

@ -0,0 +1,40 @@
AC_INIT([swe-glib], [0.1], [gergely@polonkai.eu])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([-Wall foreign])
AM_SILENT_RULES([yes])
AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug], [compile with debugging support])], , enable_debug=no)
if test "x$enable_debug" = "xyes" ; then
AC_DEFINE([DEBUG], [1], [Define if debugging is enabled])
fi
AC_PROG_CC
AM_PROG_CC_C_O
AM_PROG_AR
AC_PROG_LIBTOOL
IT_PROG_INTLTOOL([0.35.0])
GETTEXT_PACKAGE=swe-glib
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [GETTEXT package name])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.17])
LT_INIT
AC_CHECK_LIB([m], [atan])
GTK_DOC_CHECK([1.19], [--flavour no-tmpl])
PKG_PROG_PKG_CONFIG
AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])
PKG_CHECK_MODULES([GLIB], [glib-2.0])
PKG_CHECK_MODULES([GOBJECT], [gobject-2.0])
AC_CONFIG_MACRO_DIR([m4])
LIBSWE_LIBS='$(top_builddir)/swe/src/libswe-1.75.la'
AC_SUBST(LIBSWE_LIBS)
AC_CONFIG_FILES([
Makefile
swe/src/Makefile
src/Makefile
po/Makefile.in
docs/reference/swe-glib/Makefile
])
AC_OUTPUT

View File

@ -3,7 +3,7 @@
#include "gswe-moment.h"
#include "swe-glib-private.h"
#include "../../swe/src/swephexp.h"
#include "../swe/src/swephexp.h"
#define SYNODIC 29.53058867

View File

@ -1,7 +1,7 @@
#include <math.h>
#include <glib.h>
#include "../../swe/src/swephexp.h"
#include "../swe/src/swephexp.h"
#include "swe-glib-private.h"
#include "gswe-timestamp.h"

View File

@ -2,7 +2,7 @@
#define GETTEXT_PACKAGE "swe-glib"
#include <glib/gi18n-lib.h>
#include "../../swe/src/swephexp.h"
#include "../swe/src/swephexp.h"
#include "swe-glib.h"
gboolean gswe_initialized = FALSE;