* configure.ac: Include a GNUPG_LIBEXECDIR in g10defs.h, as well as a
[gnupg.git] / configure.ac
index da1e345..4f076b3 100644 (file)
@@ -78,7 +78,7 @@ case "$use_static_rnd" in
 esac
 
 AC_ARG_WITH(egd-socket,
-    [  --with-egd-socket=NAME  Use NAME for the EGD socket)],
+    [  --with-egd-socket=NAME  use NAME for the EGD socket],
             egd_socket_name="$withval", egd_socket_name="" )
 AC_DEFINE_UNQUOTED(EGD_SOCKET_NAME, "$egd_socket_name",
                    [Define if you don't want the default EGD socket name.
@@ -122,37 +122,82 @@ fi
 
 AC_MSG_CHECKING([whether to enable external program execution])
 AC_ARG_ENABLE(exec,
-    [  --disable-exec          disable external program execution],
+    [  --disable-exec          disable all external program execution],
     use_exec=$enableval, use_exec=yes)
 AC_MSG_RESULT($use_exec)
 if test "$use_exec" = no ; then
-    AC_DEFINE(NO_EXEC,1,[Define to disable external program execution])
+    AC_DEFINE(NO_EXEC,1,[Define to disable all external program execution])
 fi
 
 if test "$use_exec" = yes ; then
-  AC_MSG_CHECKING([whether LDAP keyserver support is requested])
-  AC_ARG_ENABLE(ldap,
-  [  --disable-ldap          disable LDAP keyserver interface],
-      try_ldap=$enableval, try_ldap=yes)
-  AC_MSG_RESULT($try_ldap)
-
-  AC_MSG_CHECKING([whether experimental external hkp keyserver support is requested])
-  AC_ARG_ENABLE(external-hkp,
-  [  --enable-external-hkp   enable experimental external HKP keyserver interface],
-      try_hkp=$enableval, try_hkp=no)
-  AC_MSG_RESULT($try_hkp)
-
-  if test "$try_hkp" = yes ; then
-    GPGKEYS_HKP="gpgkeys_hkp"
-    AC_DEFINE(USE_EXTERNAL_HKP,1,[define to use the experimental external HKP keyserver interface])
+  AC_MSG_CHECKING([whether to use a restricted exec-path])
+  AC_ARG_WITH(exec-path,
+      [  --with-exec-path=PATH   restrict exec-path to PATH],
+      [if test "$withval" = yes ; then
+         withval=no
+      elif test "$withval" != no ; then
+         AC_DEFINE_UNQUOTED(FIXED_EXEC_PATH,"$withval",
+                           [if set, restrict exec-path to this value])
+      fi],withval=no)
+  AC_MSG_RESULT($withval)
+
+  AC_MSG_CHECKING([whether to enable photo ID viewing])
+  AC_ARG_ENABLE(photo-viewers,
+      [  --disable-photo-viewers disable photo ID viewers],
+      [if test "$enableval" = no ; then
+         AC_DEFINE(DISABLE_PHOTO_VIEWER,1,[define to disable photo viewing])
+      fi],enableval=yes)
+  gnupg_cv_enable_photo_viewers=$enableval
+  AC_MSG_RESULT($enableval)
+
+  if test "$gnupg_cv_enable_photo_viewers" = yes ; then
+    AC_MSG_CHECKING([whether to use a fixed photo ID viewer])
+    AC_ARG_WITH(photo-viewer,
+        [  --with-photo-viewer=FIXED_VIEWER  set a fixed photo ID viewer],
+        [if test "$withval" = yes ; then
+           withval=no
+        elif test "$withval" != no ; then
+           AC_DEFINE_UNQUOTED(FIXED_PHOTO_VIEWER,"$withval",
+                           [if set, restrict photo-viewer to this])
+        fi],withval=no)
+    AC_MSG_RESULT($withval)
   fi
 
-  AC_MSG_CHECKING([whether email keyserver support is requested])
-  AC_ARG_ENABLE(mailto,
-  [  --disable-mailto        disable email keyserver interface],
-      try_mailto=$enableval, try_mailto=yes)
-  AC_MSG_RESULT($try_mailto)
-fi
+  AC_MSG_CHECKING([whether to enable external keyserver helpers])
+  AC_ARG_ENABLE(keyserver-helpers,
+      [  --disable-keyserver-helpers  disable all external keyserver support],
+      [if test "$enableval" = no ; then
+         AC_DEFINE(DISABLE_KEYSERVER_HELPERS,1,
+                  [define to disable keyserver helpers])
+      fi],enableval=yes)
+  gnupg_cv_enable_keyserver_helpers=$enableval
+  AC_MSG_RESULT($enableval)
+
+  if test "$gnupg_cv_enable_keyserver_helpers" = yes ; then
+    AC_MSG_CHECKING([whether LDAP keyserver support is requested])
+    AC_ARG_ENABLE(ldap,
+    [  --disable-ldap          disable LDAP keyserver interface],
+        try_ldap=$enableval, try_ldap=yes)
+    AC_MSG_RESULT($try_ldap)
+
+    AC_MSG_CHECKING([whether experimental external hkp keyserver support is requested])
+    AC_ARG_ENABLE(external-hkp,
+    [  --enable-external-hkp   enable experimental external HKP keyserver interface],
+        try_hkp=$enableval, try_hkp=no)
+    AC_MSG_RESULT($try_hkp)
+
+    if test "$try_hkp" = yes ; then
+      GPGKEYS_HKP="gpgkeys_hkp"
+      AC_DEFINE(USE_EXTERNAL_HKP,1,[define to use the experimental external HKP keyserver interface])
+    fi
+
+    AC_MSG_CHECKING([whether email keyserver support is requested])
+    AC_ARG_ENABLE(mailto,
+    [  --disable-mailto        disable email keyserver interface],
+        try_mailto=$enableval, try_mailto=yes)
+    AC_MSG_RESULT($try_mailto)
+    fi
+  fi
 
 AC_MSG_CHECKING([whether included zlib is requested])
 AC_ARG_WITH(included-zlib,
@@ -348,15 +393,27 @@ fi
 AC_SUBST(GPGKEYS_LDAP)
 AC_SUBST(LDAPLIBS)
 
+dnl This isn't necessarily sendmail itself, but anything that gives a
+dnl sendmail-ish interface to the outside world.  That includes qmail,
+dnl postfix, etc.  Basically, anything that can handle "sendmail -t".
+
 if test "$try_mailto" = yes ; then
-  AC_PATH_PROG(SENDMAIL,sendmail,,$PATH:/usr/sbin:/usr/libexec:/usr/lib)
+  AC_ARG_WITH(mailprog,[  --with-mailprog=NAME    use "NAME -t" for mail transport],,with_mailprog=yes)
 
-  if test "$ac_cv_path_SENDMAIL" ; then
-    GPGKEYS_MAILTO="gpgkeys_mailto"
+  if test "$with_mailprog" = yes ; then
+    AC_PATH_PROG(SENDMAIL,sendmail,,$PATH:/usr/sbin:/usr/libexec:/usr/lib)
+    if test "$ac_cv_path_SENDMAIL" ; then
+      GPGKEYS_MAILTO="gpgkeys_mailto"
     fi
+  elif test "$with_mailprog" != no ; then
+    AC_MSG_CHECKING([for a mail transport program])
+    AC_SUBST(SENDMAIL,$with_mailprog)
+    AC_MSG_RESULT($with_mailprog)
+    GPGKEYS_MAILTO="gpgkeys_mailto"
   fi
-AC_SUBST(GPGKEYS_MAILTO)
+fi
 
+AC_SUBST(GPGKEYS_MAILTO)
 AC_SUBST(GPGKEYS_HKP)
 
 case "${target}" in
@@ -901,18 +958,22 @@ AC_SUBST(NETLIBS)
 
 # Note the \\\\ for backslashes.  Autoconf eats one layer, leaving \\
 
+AC_SUBST(GNUPG_LIBEXECDIR,"${libexecdir}/gnupg")
+
 AC_CONFIG_COMMANDS(g10defs.h,[[
 cat >g10defs.tmp <<G10EOF
 /* Generated automatically by configure */
 #ifdef HAVE_DRIVE_LETTERS
-  #define G10_LOCALEDIR "c:/lib/gnupg/locale"
-  #define GNUPG_LIBDIR  "c:/lib/gnupg"
-  #define GNUPG_DATADIR "c:/lib/gnupg"
-  #define GNUPG_HOMEDIR "c:/gnupg"
+  #define G10_LOCALEDIR     "c:\\\\lib\\\\gnupg\\\\locale"
+  #define GNUPG_LIBDIR      "c:\\\\lib\\\\gnupg"
+  #define GNUPG_LIBEXECDIR  "c:\\\\lib\\\\gnupg"
+  #define GNUPG_DATADIR     "c:\\\\lib\\\\gnupg"
+  #define GNUPG_HOMEDIR     "c:\\\\gnupg"
 #else
-  #define G10_LOCALEDIR "${datadir}/locale"
-  #define GNUPG_LIBDIR  "${libdir}/gnupg"
-  #define GNUPG_DATADIR "${datadir}/gnupg"
+  #define G10_LOCALEDIR     "${datadir}/locale"
+  #define GNUPG_LIBDIR      "${libdir}/gnupg"
+  #define GNUPG_LIBEXECDIR  "${libexecdir}/gnupg"
+  #define GNUPG_DATADIR     "${datadir}/gnupg"
   #ifdef __VMS
     #define GNUPG_HOMEDIR "/SYS\$LOGIN/gnupg" 
   #else
@@ -947,6 +1008,7 @@ fi
 prefix=$prefix
 exec_prefix=$exec_prefix
 libdir=$libdir
+libexecdir=$libexecdir
 datadir=$datadir
 DATADIRNAME=$DATADIRNAME
 ]])