]> sourceware.org Git - systemtap.git/commitdiff
Autoconf groundwork for I18N of systemtap
authorLukas Berk <lberk@redhat.com>
Thu, 3 Feb 2011 14:10:04 +0000 (09:10 -0500)
committerLukas Berk <lberk@redhat.com>
Thu, 3 Feb 2011 14:10:04 +0000 (09:10 -0500)
TODO: localedir needs to be a variable and not hard-coded
further changes to files for .po file output are upcoming.

Makefile.am
Makefile.in
config.in
configure
configure.ac

index e99c26b6a0aa39c6a72042681874bbe98e94b0fc..698ae44eaabad5e348c3d2b4b60b681cffd6f9b0 100644 (file)
@@ -54,7 +54,7 @@ stap_SOURCES = main.cxx session.cxx \
        tapset-utrace.cxx task_finder.cxx dwflpp.cxx rpm_finder.cxx \
        setupdwfl.cxx csclient.cxx remote.cxx
 noinst_HEADERS = sdt_types.h
-stap_LDADD = @stap_LIBS@ @sqlite3_LIBS@
+stap_LDADD = @stap_LIBS@ @sqlite3_LIBS@ @LIBASPRINTF@ @LIBINTL@
 stap_DEPENDENCIES =
 endif
 
index 5a32a658d8e30a25938863c45d8a3f8d143af149..5cf0cdc2c084ef5a272b06373bdb1a22f466e80c 100644 (file)
@@ -264,6 +264,8 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
+LIBASPRINTF = @LIBASPRINTF@
+LIBINTL = @LIBINTL@
 LIBS = @LIBS@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
@@ -383,7 +385,7 @@ oldinclude_HEADERS = includes/sys/sdt.h includes/sys/sdt-config.h
 @BUILD_TRANSLATOR_TRUE@        csclient.cxx remote.cxx \
 @BUILD_TRANSLATOR_TRUE@        $(am__append_13)
 @BUILD_TRANSLATOR_TRUE@noinst_HEADERS = sdt_types.h
-@BUILD_TRANSLATOR_TRUE@stap_LDADD = @stap_LIBS@ @sqlite3_LIBS@ \
+@BUILD_TRANSLATOR_TRUE@stap_LDADD = @stap_LIBS@ @sqlite3_LIBS@ -lasprintf \
 @BUILD_TRANSLATOR_TRUE@        $(am__append_12) $(am__append_17)
 @BUILD_TRANSLATOR_TRUE@stap_DEPENDENCIES = $(am__append_23)
 
@@ -429,7 +431,7 @@ PHONIES = $(am__append_18) $(am__append_24) runcheck dist-gzip uprobes \
 @BUILD_CRASHMOD_TRUE@STAPLOG = staplog.so
 
 # Get extra libs as needed
-LDADD = 
+LDADD =
 EXAMPLE_SOURCE_DIR = $(srcdir)/testsuite/systemtap.examples
 EXAMPLE_META_FILES = $(EXAMPLE_SOURCE_DIR)/*/*.meta
 TEST_COV_DIR = coverage
index 438f6e64951bdfdca180d0026719315d76de9c74..ec98b6e48421fae0437ea51cb69e69bd4e9d7830 100644 (file)
--- a/config.in
+++ b/config.in
@@ -36,9 +36,6 @@
 /* have librpm */
 #undef HAVE_LIBRPM
 
-/* have librpmio */
-#undef HAVE_LIBRPMIO
-
 /* Define to 1 if you have the `sqlite3' library (-lsqlite3). */
 #undef HAVE_LIBSQLITE3
 
 /* configure prefix location */
 #undef STAP_PREFIX
 
+/* I18N the thing */
+#undef LOCALEDIR
+
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
index db630a1241c8f56829ccab08eae40824c874dc43..e270aaea85de64dcf65c61948a2a429b514fb148 100755 (executable)
--- a/configure
+++ b/configure
@@ -7207,60 +7207,9 @@ else
   have_librpm="no"
 fi
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rpmFreeCrypto in -lrpmio" >&5
-$as_echo_n "checking for rpmFreeCrypto in -lrpmio... " >&6; }
-if test "${ac_cv_lib_rpmio_rpmFreeCrypto+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrpmio  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char rpmFreeCrypto ();
-int
-main ()
-{
-return rpmFreeCrypto ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_rpmio_rpmFreeCrypto=yes
-else
-  ac_cv_lib_rpmio_rpmFreeCrypto=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rpmio_rpmFreeCrypto" >&5
-$as_echo "$ac_cv_lib_rpmio_rpmFreeCrypto" >&6; }
-if test "x$ac_cv_lib_rpmio_rpmFreeCrypto" = x""yes; then :
-
-
-$as_echo "#define HAVE_LIBRPMIO 1" >>confdefs.h
-
-                    stap_LIBS="$stap_LIBS -lrpmio"
-                    have_librpmio="yes"
-else
-  have_librpmio="no"
-fi
-
   if test "x$have_librpm" != "xyes" -a "$with_rpm" == "yes"; then
      as_fn_error "cannot find librpm" "$LINENO" 5
   fi
-  if test "x$have_librpmio" != "xyes" -a "$with_rpm" == "yes"; then
-     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find librpmio" >&5
-$as_echo "$as_me: WARNING: cannot find librpmio" >&2;}
-  fi
 fi
 
 
@@ -7636,6 +7585,12 @@ done
 
 fi
 
+localedir='/usr/share/locale'
+
+cat >>confdefs.h <<_ACEOF
+#define LOCALEDIR "$localedir"
+_ACEOF
+
 stap_prefix=$prefix
 test "$stap_prefix" = NONE && stap_prefix=$ac_default_prefix
 
index e5f9a3ee140a49f94e12930e687a46f18d526bdd..abd73c59a9e3012cc28e34e07a7c1ebbaaf03383 100644 (file)
@@ -420,16 +420,9 @@ if test "$with_rpm" != "no"; then
                     AC_DEFINE([HAVE_LIBRPM],[1],[have librpm])
                     stap_LIBS="$stap_LIBS -lrpm"
                     have_librpm="yes"], [have_librpm="no"])
-  AC_CHECK_LIB(rpmio, rpmFreeCrypto, [
-                    AC_DEFINE([HAVE_LIBRPMIO],[1],[have librpmio])
-                    stap_LIBS="$stap_LIBS -lrpmio"
-                    have_librpmio="yes"], [have_librpmio="no"])
   if test "x$have_librpm" != "xyes" -a "$with_rpm" == "yes"; then
      AC_MSG_ERROR([cannot find librpm])
   fi
-  if test "x$have_librpmio" != "xyes" -a "$with_rpm" == "yes"; then
-     AC_MSG_WARN([cannot find librpmio])
-  fi
 fi
 
 
@@ -571,6 +564,11 @@ dnl the config.h files so files depending on it are recompiled
 dnl prefix is passed through indirectly in the Makefile.am AM_CPPFLAGS.
 dnl Formerly: Don't use this directly (when not given it is set to NONE).
 dnl Currently: inline autoconf's later defaulting
+
+localedir=/usr/share/locale
+AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir", [I18N the thing])
+AC_LIB_LINKFLAGS([asprintf])
+
 stap_prefix=$prefix
 test "$stap_prefix" = NONE && stap_prefix=$ac_default_prefix
 AC_DEFINE_UNQUOTED(STAP_PREFIX, "$stap_prefix", [configure prefix location])
This page took 0.051136 seconds and 5 git commands to generate.