gnunet-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DNSBL Listed] [GNUnet-developers] gnunet-qt


From: Jean Michault
Subject: Re: [DNSBL Listed] [GNUnet-developers] gnunet-qt
Date: Sun, 03 Dec 2006 16:17:26 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.8.0.7) Gecko/20060405 SeaMonkey/1.0.5

Attached is a patch that makes gnunet-qt build with GNUnet 0.7.1pre0.

Jean
Index: src/plugins/fs/fs.cc
===================================================================
--- src/plugins/fs/fs.cc        (révision 3821)
+++ src/plugins/fs/fs.cc        (copie de travail)
@@ -32,16 +32,33 @@
 #include "fs-search.h"
 #include "ecrsuri.h"
 
-static void *fsuiEventProcessor(void *cls, const FSUI_Event *event, void 
*model)
+struct GE_Context * ectx=NULL;
+struct GC_Configuration * cfg=NULL;
+GFSPlugin * thisPlugin=NULL;
+
+static void *fsuiEventProcessor(void *cls, const FSUI_Event *event)
 {
+ GFSSearch *searchWnd;
+ GFSEcrsUri * ecrsUri;
+ int i;
   switch (event->type)
   {
     case FSUI_search_result:
-      ((GFSSearchModel *) model)->addResult(event->data.SearchResult.searchURI,
-        &event->data.SearchResult.fi);
+      // search good tab
+      ecrsUri = (GFSEcrsUri *)(&event->data.SearchResult.searchURI);
+      for (i=0 ; i < thisPlugin->tabResults->count() ; i++)
+      {
+        searchWnd = (GFSSearch*)thisPlugin->tabResults->widget(i);
+       if(searchWnd->searchText() == ecrsUri->toString())
+       {
+          searchWnd->getModel()->addResult(event->data.SearchResult.searchURI,
+            &event->data.SearchResult.fi);
+               break;
+       }
+      }
       break;    
     default:
-      BREAK();
+      // FIXME : BREAK();
       /* FIXME: display/log error */
       break;
   }
@@ -56,7 +73,9 @@
   qRegisterMetaType<GFSEcrsUri>("GFSEcrsUri&");
 
   // FSUI
-  fsuiContext = FSUI_start("gnunet_qt", YES, fsuiEventProcessor, NULL);
+  fsuiContext = FSUI_start(ectx,cfg,"gnunet_qt"
+                 ,10 //FIXME : should be a parameter
+                 , YES, fsuiEventProcessor, NULL);
 
   // Status tab
   treeSearches->setModel(&searchesModel);
@@ -97,7 +116,7 @@
   GFSSearch *searchWnd;
   int tab;
   QString strSearch, strNS;
-  ECRS_URI *uri;
+  ECRS_URI *uri=NULL;
   GFSEcrsUri ecrsUri;
 
   strSearch = cmbSearchFor->lineEdit()->text();
@@ -120,8 +139,14 @@
   if (searchWnd->isEnabled())
   {
     /* first tab is already used. Create a new one. */
-    searchWnd = addSearchWnd(strSearch);
-    tab = tabResults->count() - 1;
+    for (tab=0 ; tab < tabResults->count() ; tab++)
+    {
+        searchWnd = (GFSSearch*)thisPlugin->tabResults->widget(tab);
+       if(searchWnd->searchText() == strSearch)
+               break;
+    }
+    if (tab == tabResults->count())
+       searchWnd = addSearchWnd(strSearch);
   }
   else
   {
@@ -140,18 +165,27 @@
     strUri = QString(ECRS_URI_PREFIX) + ECRS_SUBSPACE_INFIX + strNS + "/" +
       strSearch;
     ustring = strUri.toLocal8Bit().data();
-    uri = ECRS_stringToUri(ustring);
+    uri = ECRS_stringToUri(ectx,ustring);
     if (!uri)
+    {
+    /* FIXME
       LOG(LOG_ERROR,
         tr("Failed to create namespace URI from `%s'.\n").toLocal8Bit().data(),
         ustring);
+       */
+      fprintf(stderr,"Failed to create namespace URI from `%s'.\n", ustring);
+    }
   }
   else
-    uri = FSUI_parseCharKeywordURI(strSearch.toLocal8Bit().data());
+  {
+    uri = ECRS_parseCharKeywordURI(ectx,strSearch.toLocal8Bit().data());
+  }
 
   if (uri == NULL)
+  {
+     fprintf(stderr,"uri is NULL!!.\n");
     return;
-  
+  }
   /* Start search */
   ecrsUri = uri;
   searchWnd->start(ecrsUri, spinAnon->value());
@@ -177,9 +211,12 @@
 
 extern "C"
 {
-  GNUNETQT_API GPlugin *init_plugin()
+  GNUNETQT_API GPlugin *init_plugin (struct GE_Context * i_ectx,struct 
GC_Configuration * i_cfg)
   {
-    return new GFSPlugin();
+    ectx=i_ectx;
+    cfg=i_cfg;
+    thisPlugin = new GFSPlugin();
+    return thisPlugin;
   }
   
   GNUNETQT_API void shutdown_plugin(GPlugin *plugin)
Index: src/plugins/fs/fs.h
===================================================================
--- src/plugins/fs/fs.h (révision 3821)
+++ src/plugins/fs/fs.h (copie de travail)
@@ -34,7 +34,7 @@
 #include "downloadsModel.h"
 #include "uploadsModel.h"
 
-class GFSPlugin : public GPlugin, protected Ui::FSWnd
+class GFSPlugin : public GPlugin, public Ui::FSWnd
 {
   Q_OBJECT
   
Index: src/plugins/fs/fs-search.h
===================================================================
--- src/plugins/fs/fs-search.h  (révision 3821)
+++ src/plugins/fs/fs-search.h  (copie de travail)
@@ -42,6 +42,7 @@
   QString &searchText();
   void clear();
   void start(GFSEcrsUri &uri, int anonymity);
+  GFSSearchModel *getModel() {return model;};
 
 signals:
   void closeSearchWnd(class GFSSearch *wnd);
Index: src/plugins/fs/searchModel.cc
===================================================================
--- src/plugins/fs/searchModel.cc       (révision 3821)
+++ src/plugins/fs/searchModel.cc       (copie de travail)
@@ -52,6 +52,7 @@
 
   qRegisterMetaType<QModelIndex>("QModelIndex");
   
+  /* FIXME stateReadContent() is now static !
   if (stateReadContent("gnunet-qt-fs-search-columns", &columns) != -1)
   {
     int count;
@@ -68,6 +69,7 @@
     FREE(columns);
   }
   else
+  */
   {
     colTypes.append(EXTRACTOR_FILENAME);
     colTypes.append(EXTRACTOR_SIZE);
@@ -170,9 +172,12 @@
 
 void GFSSearchModel::startSearch(GFSEcrsUri &uri, int anonymity)
 {
-  emit resultsChanged(uri, 0);
+  emit resultsChanged(uri, (int) searchResults.count());  
   
-  FSUI_startSearch(fsuiContext, anonymity, uri.uri(), this);
+//FIXME: should be parameters
+#define MAX_RESULTS 1000
+#define TIMEOUT 300*cronSECONDS
+  FSUI_startSearch(fsuiContext, anonymity,MAX_RESULTS,TIMEOUT, uri.uri());
 }
 
 static int fsMetaDataIterator(EXTRACTOR_KeywordType type, const char *data,
@@ -203,10 +208,14 @@
     FREE(thumb);
   }
   
-  rowCount = searchResults.count();
-  beginInsertRows(index(-1, -1), rowCount, rowCount);
-  searchResults.append(searchResult);
-  endInsertRows();
+  // do not add already inserted result
+  if(!searchResults.contains(searchResult))
+  {
+    rowCount = searchResults.count();
+    beginInsertRows(index(-1, -1), rowCount, rowCount);
+    searchResults.append(searchResult);
+    endInsertRows();
+  }
 
   emit resultsChanged(uri, (int) searchResults.count());  
 }
Index: src/plugins/fs/searchModel.h
===================================================================
--- src/plugins/fs/searchModel.h        (révision 3821)
+++ src/plugins/fs/searchModel.h        (copie de travail)
@@ -43,6 +43,10 @@
 public:
   GFSEcrsUri uri;
   GFSMetaData metaData;
+  bool operator ==(const GFSSearchResult &other) {
+         if (uri == other.uri)return true;
+         return false;
+  }
 };
 
 class GFSSearchModel : public QAbstractItemModel
Index: src/plugins/about/about.cc
===================================================================
--- src/plugins/about/about.cc  (révision 3821)
+++ src/plugins/about/about.cc  (copie de travail)
@@ -230,7 +230,7 @@
 extern "C"
 {
 
-GNUNETQT_API GPlugin *init_plugin()
+GNUNETQT_API GPlugin *init_plugin (struct GE_Context * ,struct 
GC_Configuration *)
 {
   return new GAboutPlugin();
 }
Index: src/plugins/general/startStopThread.cc
===================================================================
--- src/plugins/general/startStopThread.cc      (révision 3821)
+++ src/plugins/general/startStopThread.cc      (copie de travail)
@@ -43,14 +43,28 @@
   QThread::start();
 }
 
+static int pid=0;
+extern char * cfgFilename;
+extern struct GE_Context * ectx;
+extern struct GC_Configuration * cfg;
+
 void GStartStopThread::run()
 {
   bool ret;
   
   if (doStart)
-    ret = startGNUnetDaemon(YES) != SYSERR;
+   // OLD :  ret = startGNUnetDaemon(YES) != SYSERR;
+  {
+    ret = os_daemon_start(ectx,
+               cfg,
+               cfgFilename,
+               YES);
+    pid = ret;
+  }
   else
-    ret = stopGNUnetDaemon() != SYSERR;
+   // OLD :  ret = stopGNUnetDaemon() != SYSERR;
+   ret = os_daemon_stop( ectx,
+                        pid);
     
   emit finished(ret);
 }
Index: src/plugins/general/general.cc
===================================================================
--- src/plugins/general/general.cc      (révision 3821)
+++ src/plugins/general/general.cc      (copie de travail)
@@ -28,6 +28,7 @@
 
 #include <QStringList>
 #include "general.h"
+#include "GNUnet/gnunet_directories.h"
 
 GGeneralPlugin::GGeneralPlugin() : GPlugin()
 {
@@ -166,11 +167,18 @@
   }
 }
 
+// FIXME : cfgFilename should be initialized by init_plugin with value from 
main
+char * cfgFilename = DEFAULT_CLIENT_CONFIG_FILE;
+struct GE_Context * ectx;
+struct GC_Configuration * cfg;
+
 extern "C"
 {
-  
-  GNUNETQT_API GPlugin *init_plugin()
-  {
+
+GNUNETQT_API GPlugin *init_plugin (struct GE_Context * i_ectx,struct 
GC_Configuration * i_cfg)
+{
+    ectx=i_ectx;
+    cfg=i_cfg;
     return new GGeneralPlugin;
   }
   
Index: src/plugins/general/checkDaemonThread.cc
===================================================================
--- src/plugins/general/checkDaemonThread.cc    (révision 3821)
+++ src/plugins/general/checkDaemonThread.cc    (copie de travail)
@@ -28,6 +28,7 @@
 #include <GNUnet/gnunet_util.h>
 #include <GNUnet/gnunet_getoption_lib.h>
 #include <QStringList>
+#include <sys/socket.h>
 
 #include "checkDaemonThread.h"
 
@@ -56,18 +57,21 @@
   wait();
 }
 
+extern struct GE_Context * ectx;
+extern struct GC_Configuration * cfg;
 void GCheckDaemonThread::run()
 {
   bool check;
 
-  check = (checkGNUnetDaemonRunning() == YES);
+  check = (connection_test_running(ectx,cfg) == YES);
   if (check)
   {  
     checkAppsIn--;
     if (checkAppsIn == 0)
     {
       GGNUnetAppDescs *descs = new GGNUnetAppDescs();
-      GNUNET_TCP_SOCKET *sock = getClientSocket();
+      int osSock=socket(PF_INET,SOCK_STREAM,0);
+      struct ClientServerConnection *sock = client_connection_create(ectx,cfg);
       
       if (sock)
       {
@@ -92,7 +96,7 @@
         }
         
         FREE(apps);
-        releaseClientSocket(sock);
+        connection_destroy(sock);
 
         checkAppsIn = 20; // 5 minutes / 15 seconds = 20 runs
       }
Index: src/include/gnunet_qt_common.h
===================================================================
--- src/include/gnunet_qt_common.h      (révision 3821)
+++ src/include/gnunet_qt_common.h      (copie de travail)
@@ -62,7 +62,8 @@
   
 public:
   ~GPluginLoader();
-  GPlugin *load(const QString &strName);
+  GPlugin *load(const QString &strName,struct GE_Context * ectx
+               ,struct GC_Configuration * cfg);
   void unloadAll();
   
 protected:
@@ -98,7 +99,7 @@
   char *cstr;
 };
 
-typedef GPlugin *(*InitPlugin) ();
+typedef GPlugin *(*InitPlugin) (struct GE_Context * ,struct GC_Configuration 
*);
 typedef void (*ShutdownPlugin) (GPlugin *plugin);
 
 
Index: src/common/pluginLoader.cc
===================================================================
--- src/common/pluginLoader.cc  (révision 3821)
+++ src/common/pluginLoader.cc  (copie de travail)
@@ -26,12 +26,14 @@
 
 #include "pluginLoader.h"
 
+
 GPluginLoader::~GPluginLoader()
 {
   unloadAll();
 }
 
-GPlugin *GPluginLoader::load(const QString &strName)
+GPlugin *GPluginLoader::load(const QString &strName,struct GE_Context * ectx
+               ,struct GC_Configuration * cfg)
 {
   InitPlugin init;
   GPluginSpec spec;
@@ -41,11 +43,17 @@
 
   if (spec.lib)
   {
+    if(!spec.lib->isLoaded())
+         fprintf(stderr,"error %s\n",spec.lib->errorString().toAscii().data());
     plugins.append(spec);
     init = (InitPlugin) spec.lib->resolve("init_plugin");
     if (init)
-      spec.wnd = init();
+      spec.wnd = init(ectx,cfg);
+    else 
+         fprintf(stderr,"init_plugin not found in plugin\n error 
%s\n",spec.lib->errorString().toAscii().data());
   }
+  else
+         fprintf(stderr,"not a plugin\n");
     
   return spec.wnd;
 }
Index: src/common/common.pro.in
===================================================================
--- src/common/common.pro.in    (révision 3821)
+++ src/common/common.pro.in    (copie de travail)
@@ -8,8 +8,8 @@
 INCLUDEPATH = ../include @INCLUDEPATH@
 QMAKE_LIBDIR += @LIBPATH@
 
-target.path = @prefix@/bin
+target.path = @prefix@/lib
 INSTALLS += target
 
 SOURCES = assert.cc pluginLoader.cc gstring.cc
-HEADERS = pluginLoader.h ../include/gnunet_qt_common.h
\ Pas de fin de ligne à la fin du fichier
+HEADERS = pluginLoader.h ../include/gnunet_qt_common.h
Index: src/core/main.cc
===================================================================
--- src/core/main.cc    (révision 3821)
+++ src/core/main.cc    (copie de travail)
@@ -26,12 +26,20 @@
 
 #include "config.h"
 #include "main.h"
+#include "gettext.h"
 #include "GNUnet/gnunet_util.h"
-
+#include "GNUnet/gnunet_directories.h"
+extern "C" {
+// FIXME extern C should be in gnunet_util_boot.h
+#include "GNUnet/gnunet_util_boot.h"
+}
 #include <QObject>
 #include <QSettings>
 
 static GApplication *app;
+char * cfgFilename = DEFAULT_CLIENT_CONFIG_FILE;
+struct GE_Context * ectx;
+struct GC_Configuration * cfg;
 
 GApplication::GApplication(int argc, char **argv) : QApplication(argc, argv)
 {
@@ -39,24 +47,46 @@
 
 void GApplication::loadPlugins()
 {
-  int count;
-  
-  QSettings settings(".gnunet/gnunet.conf", QSettings::IniFormat);
-  // FIXME: default value
-  QStringList plugins = 
settings.value("GNUNET-QT/PLUGINS").toString().split(QRegExp("\\s+"));
-  count = plugins.count();
-  
-  while(count)
-  {
+  char *names;
+  char * dup;
+  char * next;
+  const char * pos;
+  GC_get_configuration_value_string(cfg,
+                                    "GNUNET-QT",
+                                    "PLUGINS",
+                                    "about general fs",
+                                     &names);
+
+  if (names == NULL)
+    return;
+
+  dup = STRDUP(names);
+  next = dup;
+  do {
+    while (*next == ' ')
+      next++;
+    pos = next;
+    while ( (*next != '\0') &&
+           (*next != ' ') )
+      next++;
+    if (*next == '\0') {
+      next = NULL; /* terminate! */
+    } else {
+      *next = '\0'; /* add 0-termination for pos */
+      next++;
+    }
+    if (strlen(pos) > 0)
+    {
     QWidget *child;
-    QString strPlugin = plugins.takeFirst();
-    
-    child = loader.load(strPlugin);
+    child = loader.load(pos,ectx,cfg);
     if (child)
        wnd.addApplication(child, child->windowIcon(), child->windowTitle());
-
-    count--;
-  }
+    else
+           printf("error when loading %s\n",pos);
+    }
+  } while (next != NULL);
+  FREE(dup);
+  FREE(names);
 }
 
 void GApplication::showWindow()
@@ -64,73 +94,51 @@
   wnd.show();
 }
 
-/**
- * Parse the options, set the timeout.
- * @param argc the number of options
- * @param argv the option list (including keywords)
- * @return SYSERR if we should exit, OK otherwise
- */
-static int parseOptions(int argc, char ** argv)
-{
-  int c;
-
-  while (1)
-  {
-    int option_index = 0;
-    static struct GNoption long_options[] =
-    {
-      LONG_DEFAULT_OPTIONS,
-      { 0,0,0,0 }
-    };
-    c = GNgetopt_long(argc,
-          argv,
-          "c:hH:L:vd",
-          long_options,
-          &option_index);
-    if (c == -1)
-      break;  /* No more flags to process */
-    if (YES == parseDefaultOptions(c, GNoptarg))
-      continue;
-    switch(c)
-    {
-      case 'h':
-        // FIXME: standard printhelp() requires gettext()
-        //printhelp();
-        return SYSERR;
-      case 'v':
-        printf("gnunet-qt v%s\n",
-         VERSION);
-        return SYSERR;
-      default:
-        LOG(LOG_FAILURE,
-          QObject::tr("Use --help to get a list of 
options.\n").toLocal8Bit().data());
-        return SYSERR;
-    } /* end of parsing commandline */
-  } /* while (1) */
-  setConfigurationStringList(&argv[GNoptind],
-           argc-GNoptind);
-  return OK;
+extern "C" {
+static struct CommandLineOption gnunetQtOptions[] = {
+  COMMAND_LINE_OPTION_CFG_FILE(&cfgFilename), // -c 
+#ifdef WINDOWS
+  { 'd', "debug", NULL,
+    "run in debug mode",
+    0, &gnunet_getopt_configure_set_one, &debug_mode },
+#endif
+  COMMAND_LINE_OPTION_HELP((void *)gettext_noop("GNUnet QT user interface.")), 
//* -h 
+  COMMAND_LINE_OPTION_HOSTNAME, // -H 
+  COMMAND_LINE_OPTION_LOGGING, // -L 
+  COMMAND_LINE_OPTION_VERSION(VERSION), // -v 
+  COMMAND_LINE_OPTION_VERBOSE,
+  COMMAND_LINE_OPTION_END
+};
 }
 
 int main(int argc, char **argv)
 {
   int ret;
+  int i;
   
   app = new GApplication(argc, argv);
 
-  if (SYSERR == initUtil(argc,
-       argv,
-       &parseOptions))
-    return 0;
+  i = GNUNET_init(argc,
+                  argv,
+                  "gnunet-qt",
+                  &cfgFilename,
+                  gnunetQtOptions,
+                  &ectx,
+                  &cfg);
+  if (i == -1) {
+    GNUNET_fini(ectx, cfg);
+    return -1;
+  }
 
+
   app->loadPlugins();
-       app->showWindow();
+  app->showWindow();
 
   ret = app->exec();
 
   delete app;
   
-  doneUtil();
+  GNUNET_fini(ectx, cfg);
   
        return ret;
 }
Index: src/core/wndMain.ui
===================================================================
--- src/core/wndMain.ui (révision 3821)
+++ src/core/wndMain.ui (copie de travail)
@@ -1,7 +1,4 @@
 <ui version="4.0" >
- <author></author>
- <comment></comment>
- <exportmacro></exportmacro>
  <class>WndMain</class>
  <widget class="QMainWindow" name="WndMain" >
   <property name="geometry" >
@@ -24,7 +21,7 @@
    <string>gnunet-qt, GNU's Peer-To-Peer Network</string>
   </property>
   <property name="windowIcon" >
-   <iconset resource="../../pixmaps/pixmaps" 
>:/pixmaps/gnunet-logo-small.png</iconset>
+   <iconset/>
   </property>
   <widget class="QWidget" name="centralwidget" >
    <layout class="QVBoxLayout" >
@@ -50,9 +47,8 @@
   </widget>
   <widget class="QStatusBar" name="statusbar" />
  </widget>
- <pixmapfunction></pixmapfunction>
  <resources>
-  <include location="../../pixmaps/pixmaps" />
+        <include location="../../pixmaps/pixmaps.qrc" />
  </resources>
  <connections/>
 </ui>
Index: src/core/core.pro.in
===================================================================
--- src/core/core.pro.in        (révision 3821)
+++ src/core/core.pro.in        (copie de travail)
@@ -5,7 +5,7 @@
 DEPENDPATH += .
 INCLUDEPATH += ../include @top_builddir@ @INCLUDEPATH@ .
 QMAKE_LIBDIR += @LIBPATH@
-LIBS += -L../common/ -lgnunetqt_common -lgnunetutil
+LIBS += -L../common/ -lgnunetqt_common -lgnunetutil -lgnunetutil_boot
 
 target.path = @prefix@/bin
 INSTALLS += target
Index: configure.ac
===================================================================
--- configure.ac        (révision 3821)
+++ configure.ac        (copie de travail)
@@ -52,7 +52,7 @@
         ;;
       yes)
         AC_CHECK_HEADERS(GNUnet/gnunet_util.h,
-          AC_CHECK_LIB([gnunetutil], [initUtil],
+          AC_CHECK_LIB([gnunetutil], [GC_free],
             gnunet=1))
         ;;
       *)
@@ -61,7 +61,7 @@
         CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"
         INCLUDEPATH="$with_gnunet/include $INCLUDEPATH"
         AC_CHECK_HEADERS(GNUnet/gnunet_util.h,
-          AC_CHECK_LIB([gnunetutil], [initUtil],
+          AC_CHECK_LIB([gnunetutil], [GC_free],
             EXT_LIB_PATH="-L$with_gnunet/lib $EXT_LIB_PATH"
             gnunet=1))
         ;;
@@ -79,7 +79,7 @@
                  AC_MSG_ERROR([compiling gnunet-qt requires GNUnet core 
headers]))
 
 SAVELIBS=$LIBS
-AC_CHECK_LIB(gnunetutil,LOG,,
+AC_CHECK_LIB(gnunetutil,GC_free,,
              AC_MSG_ERROR([gnunet-qt requires GNUnet-Util]))
 AC_CHECK_LIB(gnunetecrs,ECRS_createMetaData,,
              AC_MSG_ERROR([gnunet-qt requires ECRS]))
Index: aclocal.m4
===================================================================
--- aclocal.m4  (révision 3821)
+++ aclocal.m4  (copie de travail)
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.8.5 -*- Autoconf -*-
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005  Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -11,56 +11,33 @@
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
-#                                                        -*- Autoconf -*-
-# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
-# Generated from amversion.in; do not edit by hand.
+# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
 # AM_AUTOMAKE_VERSION(VERSION)
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
 # generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
 
 # AM_SET_CURRENT_AUTOMAKE_VERSION
 # -------------------------------
 # Call AM_AUTOMAKE_VERSION so it can be traced.
 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-        [AM_AUTOMAKE_VERSION([1.8.5])])
+        [AM_AUTOMAKE_VERSION([1.9.6])])
 
-# AM_AUX_DIR_EXPAND
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
@@ -106,27 +83,17 @@
 am_aux_dir=`cd $ac_aux_dir && pwd`
 ])
 
-# AM_CONDITIONAL                                              -*- Autoconf -*-
+# AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+# serial 7
 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 6
-
 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 # -------------------------------------
 # Define a conditional.
@@ -145,31 +112,20 @@
 fi
 AC_CONFIG_COMMANDS_PRE(
 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
-  AC_MSG_ERROR([conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.])
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# serial 7                                             -*- Autoconf -*-
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 # Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+# serial 8
 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-
 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
 # will think it sees a *use*, and therefore will trigger all it's
@@ -177,7 +133,6 @@
 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
 
-
 # _AM_DEPENDENCIES(NAME)
 # ----------------------
 # See how the compiler implements dependency checking.
@@ -317,27 +272,17 @@
 AC_SUBST([AMDEPBACKSLASH])
 ])
 
-# Generate code to set up dependency tracking.   -*- Autoconf -*-
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, 
Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+#serial 3
 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-#serial 2
-
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
@@ -355,27 +300,21 @@
   else
     continue
   fi
-  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
-  # Extract the definition of DEP_FILES from the Makefile without
-  # running `make'.
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
   test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
   # When using ansi2knr, U may be empty or an underscore; expand it
   U=`sed -n 's/^U = //p' < "$mf"`
-  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
-  # We invoke sed twice because it is the simplest approach to
-  # changing $(DEPDIR) to its actual value in the expansion.
-  for file in `sed -n '
-    /^DEP_FILES = .*\\\\$/ {
-      s/^DEP_FILES = //
-      :loop
-       s/\\\\$//
-       p
-       n
-       /\\\\$/ b loop
-      p
-    }
-    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
     # Make sure the directory exists.
     test -f "$dirpart/$file" && continue
@@ -401,55 +340,32 @@
      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 ])
 
-# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
+# serial 8
 
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 7
-
 # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
-# Do all the work for Automake.                            -*- Autoconf -*-
+# Do all the work for Automake.                             -*- Autoconf -*-
 
-# This macro actually does too much some checks are only needed if
-# your package does certain things.  But this isn't really a big deal.
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 # Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+# serial 12
 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
 
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 11
-
 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 # AM_INIT_AUTOMAKE([OPTIONS])
 # -----------------------------------------------
@@ -506,7 +422,6 @@
 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 AM_MISSING_PROG(AUTOHEADER, autoheader)
 AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_MISSING_PROG(AMTAR, tar)
 AM_PROG_INSTALL_SH
 AM_PROG_INSTALL_STRIP
 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
@@ -515,7 +430,9 @@
 AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+                            [_AM_PROG_TAR([v7])])])
 _AM_IF_OPTION([no-dependencies],,
 [AC_PROVIDE_IFELSE([AC_PROG_CC],
                   [_AM_DEPENDENCIES(CC)],
@@ -549,52 +466,28 @@
 done
 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
 # AM_PROG_INSTALL_SH
 # ------------------
 # Define $install_sh.
-
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
-
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 install_sh=${install_sh-"$am_aux_dir/install-sh"}
 AC_SUBST(install_sh)])
 
-#                                                          -*- Autoconf -*-
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+# serial 2
 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 1
-
 # Check whether the underlying file-system supports filenames
 # with a leading dot.  For instance MS-DOS doesn't.
 AC_DEFUN([AM_SET_LEADING_DOT],
@@ -608,27 +501,16 @@
 rmdir .tst 2>/dev/null
 AC_SUBST([am__leading_dot])])
 
-# Check to see how 'make' treats includes.     -*- Autoconf -*-
+# Check to see how 'make' treats includes.                 -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+# serial 3
 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 2
-
 # AM_MAKE_INCLUDE()
 # -----------------
 # Check to see how make treats includes.
@@ -671,28 +553,17 @@
 rm -f confinc confmf
 ])
 
-#  -*- Autoconf -*-
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+# serial 4
 
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 3
-
 # AM_MISSING_PROG(NAME, PROGRAM)
 # ------------------------------
 AC_DEFUN([AM_MISSING_PROG],
@@ -717,27 +588,16 @@
 fi
 ])
 
+# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
 # AM_PROG_MKDIR_P
 # ---------------
 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
+#
 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
 # created by `make install' are always world readable, even if the
 # installer happens to have an overly restrictive umask (e.g. 077).
@@ -758,13 +618,21 @@
 # this.)
 AC_DEFUN([AM_PROG_MKDIR_P],
 [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-  # Keeping the `.' argument allows $(mkdir_p) to be used without
-  # argument.  Indeed, we sometimes output rules like
+  # We used to keeping the `.' as first argument, in order to
+  # allow $(mkdir_p) to be used without argument.  As in
   #   $(mkdir_p) $(somedir)
-  # where $(somedir) is conditionally defined.
-  # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
-  # expensive solution, as it forces Make to start a sub-shell.)
-  mkdir_p='mkdir -p -- .'
+  # where $(somedir) is conditionally defined.  However this is wrong
+  # for two reasons:
+  #  1. if the package is installed by a user who cannot write `.'
+  #     make install will fail,
+  #  2. the above comment should most certainly read
+  #     $(mkdir_p) $(DESTDIR)$(somedir)
+  #     so it does not work when $(somedir) is undefined and
+  #     $(DESTDIR) is not.
+  #  To support the latter case, we have to write
+  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+  #  so the `.' trick is pointless.
+  mkdir_p='mkdir -p --'
 else
   # On NextStep and OpenStep, the `mkdir' command does not
   # recognize any option.  It will interpret all options as
@@ -783,27 +651,16 @@
 fi
 AC_SUBST([mkdir_p])])
 
-# Helper functions for option handling.                    -*- Autoconf -*-
+# Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+# serial 3
 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 2
-
 # _AM_MANGLE_OPTION(NAME)
 # -----------------------
 AC_DEFUN([_AM_MANGLE_OPTION],
@@ -827,29 +684,17 @@
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
 #
-# Check to make sure that the build environment is sane.
-#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
+# serial 4
 
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 3
-
 # AM_SANITY_CHECK
 # ---------------
 AC_DEFUN([AM_SANITY_CHECK],
@@ -891,25 +736,14 @@
 fi
 AC_MSG_RESULT(yes)])
 
-# AM_PROG_INSTALL_STRIP
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
-
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
+# AM_PROG_INSTALL_STRIP
+# ---------------------
 # One issue with vendor `install' (even GNU) is that you can't
 # specify the program used to strip binaries.  This is especially
 # annoying in cross-compiling environments, where the build's strip
@@ -930,4 +764,100 @@
 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - 
"'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - 
"'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
 m4_include([acinclude.m4])

reply via email to

[Prev in Thread] Current Thread [Next in Thread]