Generated the library.
authorAndrea Zagli <a.zagli@comune.scandicci.fi.it>
Tue, 11 Dec 2012 07:53:07 +0000 (08:53 +0100)
committerAndrea Zagli <a.zagli@comune.scandicci.fi.it>
Tue, 11 Dec 2012 07:53:07 +0000 (08:53 +0100)
.gitignore
Makefile.am
configure.ac
libautozgui.pc.in [new file with mode: 0644]
library/Makefile.am [new file with mode: 0644]
src/main.c

index aee532a8a0a7ea1f6d63550f60a22ac21b8523b3..a29474ac9dbf7f9f49cbde7e027a1b00a2102759 100644 (file)
@@ -1,6 +1,5 @@
 *.o
 *~
-*.in
 src/autoz-gui
 COPYING
 INSTALL
@@ -21,3 +20,11 @@ src/.deps/
 stamp-h1
 .anjuta*
 *.exe
+libautozgui.pc
+config.h.in
+libtool
+ltmain.sh
+.libs
+*.lo
+*.la
+.deps
index 00158e2db4200522dfac0b71f3777cd3407917a5..af29139f5e04e1b805a5bb26e7b6c4e218055b3b 100644 (file)
@@ -1,10 +1,15 @@
-SUBDIRS = src data tests
+SUBDIRS = src library data tests
 
 distclean-local:
        if test "$(srcdir)" = "."; then :; else \
                rm -f ChangeLog; \
        fi
 
+EXTRA_DIST = libautozgui.pc.in
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libautozgui.pc
+
 ChangeLog:
        @echo Creating $@
        @if test -d "$(srcdir)/.git"; then \
index 946515415ab772e79a623cb42aece27f1813034d..6f015e0bc3cc0f3edee8c15c8b23511b86faae60 100644 (file)
@@ -14,8 +14,14 @@ AM_MAINTAINER_MODE
 
 AC_CANONICAL_SYSTEM
 
+LT_INIT
+
+AC_LIBTOOL_WIN32_DLL
+
 # Checks for programs.
 AC_PROG_CC
+AC_PROG_LIBTOOL
+AC_PROG_RANLIB
 
 # Checks for libraries.
 PKG_CHECK_MODULES(AUTOZGUI, [libgda-ui-4.0 >= 4.1.0])
@@ -30,8 +36,10 @@ AC_SUBST(AUTOZGUI_LIBS)
 # Checks for library functions.
 
 AC_CONFIG_FILES([
+       libautozgui.pc
        Makefile
        src/Makefile
+       library/Makefile
        data/Makefile
        data/autoz-gui/Makefile
        data/autoz-gui/gui/Makefile
diff --git a/libautozgui.pc.in b/libautozgui.pc.in
new file mode 100644 (file)
index 0000000..4fcee4e
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: @PACKAGE_NAME@
+Description: Library with auto-gui interface.
+Version: @PACKAGE_VERSION@
+Requires: libgda-ui-4.0
+Libs: -L${libdir} -lautozgui
+Cflags: -I${includedir}
diff --git a/library/Makefile.am b/library/Makefile.am
new file mode 100644 (file)
index 0000000..46a44ee
--- /dev/null
@@ -0,0 +1,31 @@
+guidir = $(datadir)/$(PACKAGE)/gui
+
+AM_CPPFLAGS = $(AUTOZGUI_CFLAGS) \
+              -DGUIDIR=\""$(guidir)"\" \
+              -DG_LOG_DOMAIN=\"AutozGui\"
+
+LIBS = $(AUTOZGUI_LIBS) \
+       -export-dynamic
+
+lib_LTLIBRARIES = libautozgui.la
+
+libautozgui_la_SOURCES = \
+                ../src/authorization.c \
+                ../src/authorizations.c \
+                ../src/resource.c \
+                ../src/resources.c \
+                ../src/role.c \
+                ../src/roles.c
+
+libautozgui_la_LDFLAGS = -no-undefined
+
+libautozgui_include_HEADERS = \
+                ../src/authorization.h \
+                ../src/authorizations.h \
+                ../src/commons.h \
+                ../src/resource.h \
+                ../src/resource.h \
+                ../src/role.h \
+                ../src/roles.h
+
+libautozgui_includedir = $(includedir)/libautozgui
index 80b4b0db92c1d7b79c319162fe8358c49a959481..4d3f9f9dbbde50df4e0af8582067c1539d630ea4 100644 (file)
@@ -233,7 +233,8 @@ main (int argc, char *argv[])
 
        p = strrchr (moddir, G_DIR_SEPARATOR);
        if (p != NULL
-           && g_ascii_strcasecmp (p + 1, "src") == 0)
+           && (g_ascii_strcasecmp (p + 1, "src") == 0
+               || g_ascii_strcasecmp (p + 1, ".libs") == 0))
                {
                        commons->guidir = g_strdup (GUIDIR);
                }