Remove wrong link to picture
[gpg4win.git] / configure.ac
index 0b642b6..bf7bb4a 100644 (file)
@@ -25,21 +25,19 @@ min_automake_version="1.9.3"
 # (git tag -s gpg4win-2.x.y) and run "./autogen.sh --force".  Please
 # bump the version number immediately after the release and do another
 # commit and push so that the git magic is able to work.
 # (git tag -s gpg4win-2.x.y) and run "./autogen.sh --force".  Please
 # bump the version number immediately after the release and do another
 # commit and push so that the git magic is able to work.
-#
-# After a release the make target "copy-news" is to be called as well!
-m4_define([my_version], [2.1.1])
+m4_define([my_version], [3.0.0])
 
 # Below is m4 magic to extract and compute the git revision number,
 # the decimalized short revision number, a beta version string and a
 # flag indicating a development version (my_isgit). The latter works
 # by requiring the final tag in the repository.
 
 # Below is m4 magic to extract and compute the git revision number,
 # the decimalized short revision number, a beta version string and a
 # flag indicating a development version (my_isgit). The latter works
 # by requiring the final tag in the repository.
-m4_define([git_revision], m4_esyscmd([git branch -v 2>/dev/null \
-          | awk '/^\* / {printf "%s",$3}']))
+m4_define([git_revision],
+          m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r']))
 m4_define([git_revision_dec],
           m4_esyscmd_s([echo $((0x$(echo ]git_revision[|head -c 4)))]))
 m4_define([git_betastring],
 m4_define([git_revision_dec],
           m4_esyscmd_s([echo $((0x$(echo ]git_revision[|head -c 4)))]))
 m4_define([git_betastring],
-          m4_esyscmd_s([git describe --match 'gpg4win-[0-9].*.*[0-9]' --long|\
-                        awk -F- '$3!=0{print"-beta"$3}']))
+          m4_esyscmd_s([git describe --tags --match 'gpg4win-[0-9].*.*[0-9]' \
+                       --long | awk -F- '$3!=0{print"-beta"$3}']))
 m4_define([my_isgit],m4_if(git_betastring,[],[no],[yes]))
 m4_define([my_full_version],[my_version[]git_betastring])
 
 m4_define([my_isgit],m4_if(git_betastring,[],[no],[yes]))
 m4_define([my_full_version],[my_version[]git_betastring])
 
@@ -55,11 +53,11 @@ MANUALDATE_NOVICES="Nov. 30, 2006"
 MANUALVERSION_ADVANCED="0.0.0"
 MANUALDATE_ADVANCED="Nov. 30, 2006"
 COMPENDIUM_VERSION_DE="3.0.0"
 MANUALVERSION_ADVANCED="0.0.0"
 MANUALDATE_ADVANCED="Nov. 30, 2006"
 COMPENDIUM_VERSION_DE="3.0.0"
-COMPENDIUM_DATE_DE="21. Mai 2010"
-COMPENDIUMINPROGRESS_DE="zuletzt geringfügig korrigiert am 4. Januar 2012"
-COMPENDIUM_VERSION_EN="3.0.0-beta1"
-COMPENDIUM_DATE_EN="31. August 2010"
-COMPENDIUMINPROGRESS_EN="last minor changes from 4. January 2012"
+COMPENDIUM_DATE_DE="3. August 2015"
+COMPENDIUMINPROGRESS_DE="zuletzt geringfügig korrigiert am 3. August 2015"
+COMPENDIUM_VERSION_EN="3.0.0"
+COMPENDIUM_DATE_EN="3rd August 2015"
+COMPENDIUMINPROGRESS_EN="last minor changes from 3rd August 2015"
 
 MANUALINPROGRESS_DE=m4_if(my_isgit,[yes],["~und evtl. seitdem weiter bearbeitet"])
 MANUALINPROGRESS_EN=m4_if(my_isgit,[yes],["~and may have been further edited"])
 
 MANUALINPROGRESS_DE=m4_if(my_isgit,[yes],["~und evtl. seitdem weiter bearbeitet"])
 MANUALINPROGRESS_EN=m4_if(my_isgit,[yes],["~and may have been further edited"])
@@ -69,7 +67,7 @@ GIT_REVISION=git_revision
 GIT_REVISION_DEC=git_revision_dec
 
 
 GIT_REVISION_DEC=git_revision_dec
 
 
-AC_CONFIG_SRCDIR(include/config.nsi.in)
+AC_CONFIG_SRCDIR(src/config.nsi.in)
 AC_CONFIG_MACRO_DIR(m4)
 
 AM_INIT_AUTOMAKE([tar-ustar])
 AC_CONFIG_MACRO_DIR(m4)
 
 AM_INIT_AUTOMAKE([tar-ustar])
@@ -160,7 +158,7 @@ AC_ARG_ENABLE(light-installer,
     AC_HELP_STRING([--disable-light-installer],
                    [Do not create the light version of the installer]),
                     build_light_installer=$enableval,
     AC_HELP_STRING([--disable-light-installer],
                    [Do not create the light version of the installer]),
                     build_light_installer=$enableval,
-                    build_light_installer=yes)
+                    build_light_installer=no)
 AM_CONDITIONAL(BUILD_LIGHT_INSTALLER, test "$build_light_installer" = yes)
 
 # You can build a vanilla version of the installer, featuring only
 AM_CONDITIONAL(BUILD_LIGHT_INSTALLER, test "$build_light_installer" = yes)
 
 # You can build a vanilla version of the installer, featuring only
@@ -170,7 +168,7 @@ AC_ARG_ENABLE(vanilla-installer,
     AC_HELP_STRING([--disable-vanilla-installer],
                    [Do not create the vanilla version of the installer]),
                     build_vanilla_installer=$enableval,
     AC_HELP_STRING([--disable-vanilla-installer],
                    [Do not create the vanilla version of the installer]),
                     build_vanilla_installer=$enableval,
-                    build_vanilla_installer=yes)
+                    build_vanilla_installer=no)
 AM_CONDITIONAL(BUILD_VANILLA_INSTALLER, test "$build_vanilla_installer" = yes)
 
 # If you want to build only the light or vanilla installer, you may
 AM_CONDITIONAL(BUILD_VANILLA_INSTALLER, test "$build_vanilla_installer" = yes)
 
 # If you want to build only the light or vanilla installer, you may
@@ -190,6 +188,24 @@ AC_ARG_ENABLE(manuals,
                     build_manuals=yes)
 AM_CONDITIONAL(BUILD_MANUALS, test "$build_manuals" = yes)
 
                     build_manuals=yes)
 AM_CONDITIONAL(BUILD_MANUALS, test "$build_manuals" = yes)
 
+# Additionaly enable building gpgex for another host
+AC_ARG_WITH([additional-gpgex-host],
+    AC_HELP_STRING([--with-additional-gpgex-host=HOST],
+                   [Additionaly build gpgex for this host]),
+                   [if test "$withval" = yes; then
+                      AC_MSG_FAILURE(
+                          [--with-additional-gpgex-host was given,
+                           but no host specified])
+                    else
+                      gpgex_host=$withval
+                    fi
+                   ],
+                    gpgex_host=no)
+
+if test "$gpgex_host" != no; then
+    GPGEX_ADD_HOST="$gpgex_host"
+fi
+AC_SUBST(GPGEX_ADD_HOST)
 
 AC_ARG_ENABLE(fast-makensis,
     AC_HELP_STRING([--enable-fast-makensis],
 
 AC_ARG_ENABLE(fast-makensis,
     AC_HELP_STRING([--enable-fast-makensis],
@@ -225,33 +241,43 @@ AC_CHECK_PROGS(SHA1SUM, sha1sum)
 AC_CHECK_PROGS(MSGFMT, msgfmt)
 AC_CHECK_PROGS(GITLOG_TO_CHANGELOG, gitlog-to-changelog,
                [build-aux/gitlog-to-changelog])
 AC_CHECK_PROGS(MSGFMT, msgfmt)
 AC_CHECK_PROGS(GITLOG_TO_CHANGELOG, gitlog-to-changelog,
                [build-aux/gitlog-to-changelog])
+AC_CHECK_PROGS(BUILD_CC, gcc cc)
 AC_PROG_INSTALL
 
 AC_PROG_INSTALL
 
+if test -n "$GPGEX_ADD_HOST"; then
+    AC_CHECK_TOOLS(STRIP_EX, ${GPGEX_ADD_HOST}-strip)
+fi
+
+if test -z "$GPG4WIN_PARALLEL"; then
+    JOBS=$(nproc 2>/dev/null || echo 1)
+    GPG4WIN_PARALLEL=-j$JOBS
+    AC_MSG_NOTICE([Using autodetected $JOBS make jobs. You can override this by setting GPG4WIN_PARALLEL.])
+fi
+AC_SUBST(GPG4WIN_PARALLEL)
+
 missing_tools=
 for i in DLLTOOL MAKE UNZIP TAR MKDIR CP RM STOW MAKENSIS ZCAT TEXI2DVI \
 missing_tools=
 for i in DLLTOOL MAKE UNZIP TAR MKDIR CP RM STOW MAKENSIS ZCAT TEXI2DVI \
-         DVIPDF CONVERT SHA1SUM MSGFMT ; do
+         DVIPDF CONVERT SHA1SUM MSGFMT BUILD_CC; do
    eval tmp='$'$i
    if test -z "$tmp"; then
       missing_tools="$missing_tools `echo $i | tr 'A-Z' 'a-z'`"
    fi
 done
 
    eval tmp='$'$i
    if test -z "$tmp"; then
       missing_tools="$missing_tools `echo $i | tr 'A-Z' 'a-z'`"
    fi
 done
 
+# Additional runtime libraries from mingw.
+GPG4WIN_RUNTIME_LIBRARY(libgcc_s_sjlj-1)
+GPG4WIN_RUNTIME_LIBRARY(libstdc++-6)
+GPG4WIN_RUNTIME_LIBRARY(libwinpthread-1)
+
 AC_CHECK_PROGS(GLIB_GENMARSHAL, glib-genmarshal)
 AC_CHECK_PROGS(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
 AC_CHECK_PROGS(GLIB_COMPILE_RESOURCES, glib-compile-resources)
 AC_CHECK_PROGS(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource)
 AC_CHECK_PROGS(GLIB_GENMARSHAL, glib-genmarshal)
 AC_CHECK_PROGS(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
 AC_CHECK_PROGS(GLIB_COMPILE_RESOURCES, glib-compile-resources)
 AC_CHECK_PROGS(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource)
-AC_CHECK_PROGS(GS, gs)
-# For the claws manual we need:
-AC_CHECK_PROGS(DOCBOOK2HTML, docbook2html)
-AC_CHECK_PROGS(DOCBOOK2TXT, docbook2txt)
-AC_CHECK_PROGS(DOCBOOK2PS, docbook2ps)
-AC_CHECK_PROGS(DOCBOOK2PDF, docbook2pdf)
 
 
 missing_opt_tools=
 for i in GLIB_GENMARSHAL GLIB_COMPILE_SCHEMAS GLIB_COMPILE_RESOURCES \
 
 
 missing_opt_tools=
 for i in GLIB_GENMARSHAL GLIB_COMPILE_SCHEMAS GLIB_COMPILE_RESOURCES \
-         GDK_PIXBUF_CSOURCE GS \
-         DOCBOOK2PDF DOCBOOK2TXT DOCBOOK2PS DOCBOOK2PDF; do
+         GDK_PIXBUF_CSOURCE; do
    eval tmp='$'$i
    if test -z "$tmp"; then
       missing_opt_tools="$missing_opt_tools `echo $i | tr 'A-Z' 'a-z'`"
    eval tmp='$'$i
    if test -z "$tmp"; then
       missing_opt_tools="$missing_opt_tools `echo $i | tr 'A-Z' 'a-z'`"
@@ -268,11 +294,8 @@ AC_CHECK_PROGS(WGET, wget)
 # Packages.
 gpg4win_dup_sources=""
 
 # Packages.
 gpg4win_dup_sources=""
 
-GPG4WIN_BPKG_GNU([libiconv])
-GPG4WIN_BPKG_GNU([gettext], [libiconv])
 
 GPG4WIN_SPKG([zlib])
 
 GPG4WIN_SPKG([zlib])
-GPG4WIN_BPKG_GNUWIN32([bsfilter])
 
 GPG4WIN_BPKG_GTK([pkgconfig])
 
 
 GPG4WIN_BPKG_GTK([pkgconfig])
 
@@ -288,82 +311,64 @@ GPG4WIN_SPKG([gdk-pixbuf], [glib])
 GPG4WIN_SPKG([gtk+], [libiconv gettext pkgconfig atk pango dnl
                       glib gdk-pixbuf cairo])
 GPG4WIN_SPKG([libpng], [pkgconfig])
 GPG4WIN_SPKG([gtk+], [libiconv gettext pkgconfig atk pango dnl
                       glib gdk-pixbuf cairo])
 GPG4WIN_SPKG([libpng], [pkgconfig])
-GPG4WIN_SPKG([enchant], [pkgconfig glib])
 
 GPG4WIN_SPKG([bzip2])
 
 GPG4WIN_SPKG([bzip2])
-GPG4WIN_SPKG([adns])
 GPG4WIN_SPKG([libgpg-error], [libiconv gettext])
 GPG4WIN_SPKG([libgpg-error], [libiconv gettext])
-GPG4WIN_SPKG([libgcrypt], [libgpg-error])
-GPG4WIN_SPKG([libksba], [libgpg-error])
-GPG4WIN_SPKG([w32pth])
 GPG4WIN_SPKG([libassuan], [libgpg-error w32pth])
 GPG4WIN_SPKG([libassuan], [libgpg-error w32pth])
-GPG4WIN_SPKG([dirmngr], [libgpg-error libgcrypt libassuan libksba w32pth])
-GPG4WIN_SPKG([pinentry], [libiconv gtk+])
-GPG4WIN_SPKG([gpgme], [libgpg-error gnupg2 glib])
-GPG4WIN_SPKG([curl], [zlib gnutls])
-GPG4WIN_SPKG([gnupg2], [libiconv libgcrypt libksba libassuan libgpg-error dnl
-                        w32pth zlib bzip2 adns pinentry])
-GPG4WIN_SPKG([pthreads-w32])
+GPG4WIN_SPKG([pinentry], [qtbase libiconv gtk+])
+GPG4WIN_SPKG([gpgme], [libgpg-error glib qtbase])
 GPG4WIN_SPKG([gpgol], [gpgme libassuan])
 GPG4WIN_SPKG([gpgex], [libassuan])
 GPG4WIN_SPKG([gpgol], [gpgme libassuan])
 GPG4WIN_SPKG([gpgex], [libassuan])
-GPG4WIN_SPKG([scute], [libgpg-error libassuan])
 GPG4WIN_SPKG([paperkey])
 GPG4WIN_SPKG([gpa], [libiconv gettext zlib gtk+ libpng glib gpgme])
 GPG4WIN_SPKG([paperkey])
 GPG4WIN_SPKG([gpa], [libiconv gettext zlib gtk+ libpng glib gpgme])
-GPG4WIN_SPKG([libgsasl])
-GPG4WIN_SPKG([libtasn1])
-GPG4WIN_SPKG([gnutls], [libgsasl libtasn1 libgcrypt])
-GPG4WIN_SPKG([libetpan], [pthreads-w32 gnutls])
-GPG4WIN_SPKG([libxml2], [zlib])
-GPG4WIN_SPKG([regex])
-GPG4WIN_SPKG([crypt])
-GPG4WIN_SPKG([claws-mail], [libiconv gettext zlib gtk+ libpng enchant glib dnl
-                            gpgme pthreads-w32 crypt regex libetpan gnutls])
-GPG4WIN_SPKG([notification_plugin], [claws-mail])
-GPG4WIN_SPKG([gtkhtml2_viewer], [curl claws-mail libxml2])
-GPG4WIN_SPKG([vcalendar], [curl claws-mail])
-GPG4WIN_SPKG([rssyl], [curl claws-mail])
-GPG4WIN_SPKG([tnef_parse], [claws-mail])
-GPG4WIN_SPKG([attachwarner], [claws-mail])
-GPG4WIN_SPKG([bsfilter_plugin], [claws-mail])
+GPG4WIN_SPKG([w32pth])
+GPG4WIN_SPKG([libiconv])
+GPG4WIN_SPKG([gettext], [libiconv])
+
+
+# Packages needed for gpgex
+GPG4WIN_SPKGEX([libgpg-error])
+GPG4WIN_SPKGEX([libassuan], [libgpg-error])
+GPG4WIN_SPKGEX([gpgex], [libassuan])
+GPG4WIN_SPKGEX([gpgme], [libgpg-error libassuan])
+GPG4WIN_SPKGEX([gpgol], [gpgme])
+
 GPG4WIN_IPKG([compendium])
 
 GPG4WIN_IPKG([compendium])
 
+# The GnuPG Package.
+GPG4WIN_BPKG_BINSRC([gnupg-w32])
+# See the script kde-l10n.sh how this package is created.
+GPG4WIN_BPKG_BINSRC([kde-l10n])
+
 # Qt related stuff.
 # Qt related stuff.
-GPG4WIN_BPKG_GNUWIN32([kdesupport])
-GPG4WIN_BPKG_BINSRC([oxygen-icons])
-GPG4WIN_BPKG_GNUWIN32([qt], [kdesupport])
-GPG4WIN_BPKG_GNUWIN32([kdelibs], [qt oxygen-icons])
-GPG4WIN_BPKG_BINSRC([kleopatra], [gpgme gnupg2 kdelibs])
-#GPG4WIN_BPKG_GNUWIN32([kleopatra], [gpgme gnupg2 kdelibs])
+GPG4WIN_SPKG([qtbase], [libpng])
+GPG4WIN_SPKG([qttools], [qtbase])
+GPG4WIN_SPKG([qtwinextras], [qtbase])
+GPG4WIN_SPKG([qtsvg], [qtbase])
+GPG4WIN_SPKG([boost], [expat zlib bzip2])
+GPG4WIN_KDEPKG([breeze-icons], [extra-cmake-modules qtbase])
+GPG4WIN_KDEPKG([kleopatra], [gnupg-w32 breeze-icons kxmlgui libkleo kde-l10n kitemmodels])
+GPG4WIN_KDEPKG([extra-cmake-modules])
+GPG4WIN_KDEPKG([kconfig], [qtbase qttools extra-cmake-modules])
+GPG4WIN_KDEPKG([ki18n], [qtbase gettext qttools extra-cmake-modules])
+GPG4WIN_KDEPKG([gpgmepp], [boost qtbase gpgme extra-cmake-modules])
+GPG4WIN_KDEPKG([kwidgetsaddons], [kconfig qttools qtbase])
+GPG4WIN_KDEPKG([kcompletion], [kwidgetsaddons])
+GPG4WIN_KDEPKG([kwindowsystem], [qtbase qtwinextras])
+GPG4WIN_KDEPKG([kcoreaddons], [qtbase qttools])
+GPG4WIN_KDEPKG([kcodecs], [qtbase qttools])
+GPG4WIN_KDEPKG([kguiaddons], [qtbase qttools])
+GPG4WIN_KDEPKG([kmime], [kcodecs])
+GPG4WIN_KDEPKG([kconfigwidgets], [kwidgetsaddons kguiaddons ki18n kcodecs kconfig])
+GPG4WIN_KDEPKG([kitemviews], [qtbase qttools])
+GPG4WIN_KDEPKG([kitemmodels], [qtbase qttools])
+GPG4WIN_KDEPKG([karchive], [qtbase qttools extra-cmake-modules])
+GPG4WIN_KDEPKG([kiconthemes], [qtsvg kconfigwidgets karchive])
+GPG4WIN_KDEPKG([kxmlgui], [kiconthemes kconfigwidgets kitemviews])
+GPG4WIN_KDEPKG([libkleo], [gpgmepp kmime kwidgetsaddons kwindowsystem kcompletion kconfig gpgme])
 
 GPG4WIN_FINALIZE
 
 
 GPG4WIN_FINALIZE
 
-# Qt is compiled with -mthreads, and thus requires the mingwm10.dll.
-mingwm_dll=no
-AC_ARG_WITH([mingwm-dll],
-           AC_HELP_STRING([--with-mingwm-dll=FILE], [use the mingwm DLL]),
-           [mingwm_dll=$withval])
-if test "$mingwm_dll" = "no"; then
-  file="/usr/share/doc/mingw32-runtime/mingwm10.dll.gz"
-  if test -r "$file"; then
-    mingwm_dll="$file"
-  fi
-fi
-if test "$mingwm_dll" = "no"; then
-  missing_tools="mingwm10.dll $missing_tools"
-fi
-# To make things simple, we just install a copy of the file in the
-# source directory.  No need to make this ugly hack any uglier by
-# messing around with the build system.
-case "$mingwm_dll" in
-    *.gz)
-      $ZCAT $mingwm_dll > src/mingwm10.dll
-      ;;
-    *)
-      cp $mingwm_dll src/mingwm10.dll
-      ;;
-esac
-
-
 # Throw an error if required tools are missing
 if test -n "$missing_tools"; then
     for i in $missing_tools; do
 # Throw an error if required tools are missing
 if test -n "$missing_tools"; then
     for i in $missing_tools; do
@@ -383,25 +388,29 @@ if test -n "$gpg4win_dup_sources"; then
       tmp="$tmp
 $i"
     done
       tmp="$tmp
 $i"
     done
-    AC_MSG_ERROR([Packages with more that one source version:$tmp])
+    tmp2="
+You might remove them with:"
+    for i in $gpg4win_rm_candidates; do
+        if ! grep -q $(basename $i) packages/packages.current; then
+            tmp2="$tmp2
+rm $i"
+        fi
+    done
+    AC_MSG_ERROR([Packages with more that one source version:$tmp$tmp2])
 fi
 
 
 # Finalize.
 
 fi
 
 
 # Finalize.
 
-AC_CONFIG_COMMANDS([gpg4win-conf],[[
-chmod +x patches/gnupg2/01-version.patch
-]])
-
 AC_CONFIG_FILES(Makefile)
 AC_CONFIG_FILES(Makefile)
-AC_CONFIG_FILES(packages/Makefile include/Makefile src/Makefile po/Makefile.in)
-AC_CONFIG_FILES(include/config.nsi src/gpg4win.mk)
+AC_CONFIG_FILES(packages/Makefile src/Makefile po/Makefile.in)
+AC_CONFIG_FILES(po/build-cc)
+AC_CONFIG_FILES(src/config.nsi src/gpg4win.mk)
 AC_CONFIG_FILES(doc/Makefile)
 AC_CONFIG_FILES(doc/logo/Makefile)
 AC_CONFIG_FILES(doc/manual/Makefile doc/manual/version.tex)
 AC_CONFIG_FILES(doc/Makefile)
 AC_CONFIG_FILES(doc/logo/Makefile)
 AC_CONFIG_FILES(doc/manual/Makefile doc/manual/version.tex)
-AC_CONFIG_FILES(doc/website/Makefile)
 AC_CONFIG_FILES(src/dictionaries/Makefile)
 AC_CONFIG_FILES(src/dictionaries/Makefile)
-AC_CONFIG_FILES(patches/gnupg2/01-version.patch)
+AC_CONFIG_FILES(src/toolchain.cmake)
 AC_OUTPUT
 
 # Throw a warning if optional tools are missing
 AC_OUTPUT
 
 # Throw a warning if optional tools are missing
@@ -418,9 +427,15 @@ if test -n "$missing_opt_tools"; then
     done
 fi
 
     done
 fi
 
-echo "
+echo -n "
         $PACKAGE_NAME-$PACKAGE_VERSION prepared for make
 
         Revision: ${GIT_REVISION}  (${GIT_REVISION_DEC})
         $PACKAGE_NAME-$PACKAGE_VERSION prepared for make
 
         Revision: ${GIT_REVISION}  (${GIT_REVISION_DEC})
-        Platform: $host
+        32bit platform: $host
+        64bit platform: ${GPGEX_ADD_HOST}
 "
 "
+if test -n "$JOBS"; then
+    echo "        make jobs: ${JOBS}"
+else
+    echo ""
+fi