[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r850 - in Extractor: . m4 src/main src/plugins
From: |
durner |
Subject: |
[GNUnet-SVN] r850 - in Extractor: . m4 src/main src/plugins |
Date: |
Fri, 3 Jun 2005 11:21:06 -0700 (PDT) |
Author: durner
Date: 2005-06-03 11:20:50 -0700 (Fri, 03 Jun 2005)
New Revision: 850
Added:
Extractor/m4/ac_define_dir.m4
Modified:
Extractor/configure.ac
Extractor/src/main/Makefile.am
Extractor/src/main/extract.c
Extractor/src/main/extractor.c
Extractor/src/plugins/Makefile.am
Log:
- Windows
- intl
- OGG support
- add -ldl for other platforms
Modified: Extractor/configure.ac
===================================================================
--- Extractor/configure.ac 2005-06-03 17:43:29 UTC (rev 849)
+++ Extractor/configure.ac 2005-06-03 18:20:50 UTC (rev 850)
@@ -77,6 +77,13 @@
AM_ICONV
+# We define the paths here, because MinGW/GCC expands paths
+# passed through the command line ("-DLOCALEDIR=..."). This would
+# lead to hard-coded paths ("C:\mingw\mingw\bin...") that do
+# not contain the actual installation.
+AC_DEFINE_DIR([LOCALEDIR], [datadir/locale], [gettext catalogs])
+
+
# large file support
AC_SYS_LARGEFILE
AC_FUNC_FSEEKO
Added: Extractor/m4/ac_define_dir.m4
===================================================================
--- Extractor/m4/ac_define_dir.m4 2005-06-03 17:43:29 UTC (rev 849)
+++ Extractor/m4/ac_define_dir.m4 2005-06-03 18:20:50 UTC (rev 850)
@@ -0,0 +1,35 @@
+dnl @synopsis AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
+dnl
+dnl This macro _AC_DEFINEs VARNAME to the expansion of the DIR
+dnl variable, taking care of fixing up ${prefix} and such.
+dnl
+dnl VARNAME is offered as both a C preprocessor symbol, and an output
+dnl variable.
+dnl
+dnl Note that the 3 argument form is only supported with autoconf 2.13
+dnl and later (i.e. only where _AC_DEFINE supports 3 arguments).
+dnl
+dnl Examples:
+dnl
+dnl AC_DEFINE_DIR(DATADIR, datadir)
+dnl AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries])
+dnl
+dnl @category Misc
+dnl @author Stepan Kasal <address@hidden>
+dnl @author Andreas Schwab <address@hidden>
+dnl @author Guido Draheim <address@hidden>
+dnl @author Alexandre Oliva
+dnl @version 2005-01-17
+dnl @license AllPermissive
+
+AC_DEFUN([AC_DEFINE_DIR], [
+ prefix_NONE=
+ exec_prefix_NONE=
+ test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+ test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+ eval ac_define_dir="\"[$]$2\""
+ AC_SUBST($1, "$ac_define_dir")
+ AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3])
+ test "$prefix_NONE" && prefix=NONE
+ test "$exec_prefix_NONE" && exec_prefix=NONE
+])
Modified: Extractor/src/main/Makefile.am
===================================================================
--- Extractor/src/main/Makefile.am 2005-06-03 17:43:29 UTC (rev 849)
+++ Extractor/src/main/Makefile.am 2005-06-03 18:20:50 UTC (rev 850)
@@ -8,10 +8,6 @@
LIBS = \
@LTLIBINTL@ @LIBS@
-# Define a C macro LOCALEDIR indicating where catalogs will be installed.
-localedir = $(datadir)/locale
-DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
-
lib_LTLIBRARIES = \
libextractor.la
@@ -23,10 +19,14 @@
extract_LDADD = \
$(top_builddir)/src/main/libextractor.la
+if !MINGW
+ dlflag=-ldl
+endif
+
libextractor_la_LDFLAGS = \
-export-dynamic -version-info 1:1:0 $(LIBICONV)
libextractor_la_LIBADD = \
- $(LIBLTDL)
+ $(LIBLTDL) $(dlflag)
libextractor_la_DEPENDENCIES = \
$(LIBLTDL)
Modified: Extractor/src/main/extract.c
===================================================================
--- Extractor/src/main/extract.c 2005-06-03 17:43:29 UTC (rev 849)
+++ Extractor/src/main/extract.c 2005-06-03 18:20:50 UTC (rev 850)
@@ -392,9 +392,13 @@
int bibtex = NO;
char * binary = NULL;
+#ifdef MINGW
+ InitWinEnv();
+#endif
+
setlocale(LC_ALL, "");
textdomain(PACKAGE);
- bindtextdomain(PACKAGE, LOCALEDIR);
+ BINDTEXTDOMAIN(PACKAGE, LOCALEDIR);
print = malloc (sizeof (int) * EXTRACTOR_getHighestKeywordTypeNumber ());
for (i = 0; i < EXTRACTOR_getHighestKeywordTypeNumber (); i++)
print[i] = YES; /* default: print everything */
@@ -524,12 +528,18 @@
"Unknown keyword type '%s', use option '%s' to get a
list.\n",
optarg,
"-L");
+#ifdef MINGW
+ ShutdownWinEnv();
+#endif
return -1;
}
break;
default:
fprintf (stderr,
_("Use --help to get a list of options.\n"));
+#ifdef MINGW
+ ShutdownWinEnv();
+#endif
return -1;
} /* end of parsing commandline */
} /* while (1) */
@@ -538,6 +548,9 @@
{
fprintf (stderr,
"Invoke with list of filenames to extract keywords form!\n");
+#ifdef MINGW
+ ShutdownWinEnv();
+#endif
return -1;
}
@@ -601,5 +614,9 @@
free (print);
EXTRACTOR_removeAll (extractors);
+#ifdef MINGW
+ ShutdownWinEnv();
+#endif
+
return 0;
}
Modified: Extractor/src/main/extractor.c
===================================================================
--- Extractor/src/main/extractor.c 2005-06-03 17:43:29 UTC (rev 849)
+++ Extractor/src/main/extractor.c 2005-06-03 18:20:50 UTC (rev 850)
@@ -185,7 +185,7 @@
int err;
setlocale(LC_ALL, "");
- bindtextdomain(PACKAGE, LOCALEDIR);
+ BINDTEXTDOMAIN(PACKAGE, LOCALEDIR);
err = lt_dlinit ();
if (err > 0)
{
Modified: Extractor/src/plugins/Makefile.am
===================================================================
--- Extractor/src/plugins/Makefile.am 2005-06-03 17:43:29 UTC (rev 849)
+++ Extractor/src/plugins/Makefile.am 2005-06-03 18:20:50 UTC (rev 850)
@@ -65,7 +65,7 @@
libextractor_ogg_la_SOURCES = \
oggextractor.c
libextractor_ogg_la_LDFLAGS = \
- -lvorbisfile $(PLUGINFLAGS)
+ -lvorbisfile -lvorbis $(PLUGINFLAGS)
endif
noinst_LTLIBRARIES = \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r850 - in Extractor: . m4 src/main src/plugins,
durner <=