2004-08-17 Marcus Brinkmann <marcus@g10code.de>
authorMarcus Brinkmann <mb@g10code.com>
Tue, 17 Aug 2004 19:01:34 +0000 (19:01 +0000)
committerMarcus Brinkmann <mb@g10code.com>
Tue, 17 Aug 2004 19:01:34 +0000 (19:01 +0000)
* configure.ac: Invoke AC_PROG_LN_S.
(PINENTRY_DEFAULT): New variable.  Substitute it.  Fail if no
default can be determined.
* Makefile.am (install-exec-local): Install pinentry default link.

ChangeLog
Makefile.am
NEWS
configure.ac

index c40889f..0d70d31 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2004-08-17  Marcus Brinkmann  <marcus@g10code.de>
 
+       * configure.ac: Invoke AC_PROG_LN_S.
+       (PINENTRY_DEFAULT): New variable.  Substitute it.  Fail if no
+       default can be determined.
+       * Makefile.am (install-exec-local): Install pinentry default link.
+
        * configure.ac: Check for Gtk+-2.
        * gtk+-2: New directory with gtk+-2 pinentry.
        * gtk+-2/Makefile.am, gtk+-2/gtksecentry.h, gtk+-2/gtksecentry.c,
index 8067342..4900897 100644 (file)
@@ -60,3 +60,7 @@ install-exec-local:
          echo "  $(SETCAP) cap_ipc_lock+p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
          $(SETCAP) cap_ipc_lock+p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'` || true; \
        done
+
+       (cd $(DESTDIR)$(bindir); \
+       rm -f pinentry; \
+       $(LN_S) $(PINENTRY_DEFAULT) pinentry)
diff --git a/NEWS b/NEWS
index 77adb63..7f84632 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,10 @@ Noteworthy changes in version 0.7.2 (unreleased)
 
  * Add GTK+-2 pinentry.
 
+ * Install a symbolic link under the name "pinentry" that defaults to
+   pinentry-gtk, pinentry-qt, pinentry-gtk-2, or pinentry-curses, in
+   that order.
+
 Noteworthy changes in version 0.7.1 (2004-04-21)
 ------------------------------------------------
 
index fbdba07..646246b 100644 (file)
@@ -51,6 +51,7 @@ AC_PROG_RANLIB
 # We need to check for cplusplus here becuase we may not do the test
 # for Qt and autoconf does does not allow that.
 AC_PROG_CXX
+AC_PROG_LN_S
 
 dnl Checks for compiler features.
 if test "$GCC" = yes; then
@@ -274,6 +275,25 @@ dnl dnl Additional checks for Qt pinentry.
 dnl dnl End of checks for Qt pinentry.
 dnl fi
 
+if test "$pinentry_gtk" = "yes"; then
+   PINENTRY_DEFAULT=pinentry-gtk
+else
+  if test "$pinentry_qt" = "yes"; then
+    PINENTRY_DEFAULT=pinentry-qt
+  else
+    if test "$pinentry_gtk_2" = "yes"; then
+      PINENTRY_DEFAULT=pinentry-gtk-2
+    else
+      if test "$pinentry_curses" = "yes"; then
+        PINENTRY_DEFAULT=pinentry-curses
+      else
+        AC_MSG_ERROR([[No pinentry enabled.]])
+      fi
+    fi
+  fi
+fi
+AC_SUBST(PINENTRY_DEFAULT)
+
 
 AC_CONFIG_FILES([
 assuan/Makefile
@@ -298,4 +318,6 @@ AC_MSG_NOTICE([
        Qt Pinentry: $pinentry_qt
 
        Fallback to Curses: $fallback_curses
+
+       Default Pinentry: $PINENTRY_DEFAULT
 ])