[pan2/testing: 218/279] added configure.in patches for git branch and ssl libs/cflags



commit 3b69a1f951928845810759912b2730fba79b8ea4
Author: Heinrich MÃller <sphemuel stud informatik uni-erlangen de>
Date:   Sun Oct 23 00:59:25 2011 +0200

    added configure.in patches for git branch and ssl libs/cflags

 configure.in          |   17 ++++++++++++++++-
 pan/gui/Makefile.am   |    5 +++--
 pan/gui/server-ui.cc  |    7 +++++++
 pan/tasks/Makefile.am |    4 ++--
 4 files changed, 28 insertions(+), 5 deletions(-)
---
diff --git a/configure.in b/configure.in
index 8de39d7..c35d935 100644
--- a/configure.in
+++ b/configure.in
@@ -13,7 +13,8 @@ else
 dnl git-dir is used for building outside the src tree
 	GIT_HASH=`git --git-dir=$srcdir/.git log -1 --pretty=format:%h 2> /dev/null`
 	if test ! -z $GIT_HASH; then
-		GIT_BRANCH=`git --git-dir=$srcdir/.git symbolic-ref HEAD 2> /dev/null | awk -F/ '{print $NF}'`
+dnl		GIT_BRANCH=`git --git-dir=$srcdir/.git symbolic-ref HEAD 2> /dev/null | awk -F/ '{print $NF}'`
+      GIT_BRANCH=`git config --get remote.origin.url 2> /dev/null `
 	fi
 fi
 if test ! -z $GIT_HASH; then
@@ -49,10 +50,12 @@ GMIME_REQUIRED=2.4.0
 GTK_REQUIRED=2.16.0
 GTK3_REQUIRED=3.0.0
 GTKSPELL_REQUIRED=2.0.7
+OPENSSL_REQUIRED=1.0.0
 AC_SUBST(GLIB_REQUIRED)
 AC_SUBST(GMIME_REQUIRED)
 AC_SUBST(GTK_REQUIRED)
 AC_SUBST(GTKSPELL_REQUIRED)
+AC_SUBST(OPENSSL_REQUIRED)
 
 AC_PROG_CXX
 AC_HEADER_STDC
@@ -100,6 +103,16 @@ if test "x$want_gtkspell" = "xyes" ; then
 	                  AC_MSG_RESULT(no)])
 fi
 
+openssl_msg=no
+AC_ARG_WITH(openssl, AC_HELP_STRING([--with-openssl], [Enable OpenSSL support]), [want_openssl=$withval], [want_openssl=no])
+if test "x$want_openssl" = "xyes" ; then
+	PKG_CHECK_MODULES([OPENSSL], [openssl >= $OPENSSL_REQUIRED],
+	                  [openssl_msg=yes
+	                  AC_DEFINE(HAVE_OPENSSL,[1],[OpenSSL 3.0])],
+	                  [openssl_msg=no
+	                  AC_MSG_RESULT(no)])
+fi
+
 dnl Check to see if strftime supports the use of %l and %k
 AC_MSG_CHECKING(for %l and %k support in strftime)
 AC_TRY_RUN([
@@ -181,5 +194,7 @@ Configuration:
         Source code location:	${srcdir}
         Compiler:		${CXX}
         With GtkSpell:          ${gtkspell_msg}
+        With GTK3:              ${gtk_msg}
+        With OpenSSL 3.0:       ${openssl_msg}
 
 "
diff --git a/pan/gui/Makefile.am b/pan/gui/Makefile.am
index 4c22f1c..8f77364 100644
--- a/pan/gui/Makefile.am
+++ b/pan/gui/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I top_srcdir@ @GTKSPELL_CFLAGS@ @GTK_CFLAGS@ @GMIME_CFLAGS@ @GLIB_CFLAGS@ -DPANLOCALEDIR=\""$(panlocaledir)"\"
+AM_CPPFLAGS = -I top_srcdir@ @GTKSPELL_CFLAGS@ @GTK_CFLAGS@ @GMIME_CFLAGS@ @GLIB_CFLAGS@ @OPENSSL_CFLAGS@ -DPANLOCALEDIR=\""$(panlocaledir)"\"
 
 noinst_LIBRARIES = libpangui.a
 
@@ -93,7 +93,8 @@ WINRCOBJ =
 endif
 
 pan_SOURCES = gui.cc pan.cc $(WINRC)
-pan_LDADD = ./libpangui.a $(WINRCOBJ) ../data-impl/libpandata.a ../tasks/libtasks.a ../data/libdata.a ../usenet-utils/libusenetutils.a ../general/libgeneralutils.a ../../uulib/libuu.a @GTKSPELL_LIBS@ @GTK_LIBS@ @GMIME_LIBS@ @GLIB_LIBS@ -lssl -lcrypto
+pan_LDADD = ./libpangui.a $(WINRCOBJ) ../data-impl/libpandata.a ../tasks/libtasks.a ../data/libdata.a ../usenet-utils/libusenetutils.a ../general/libgeneralutils.a \
+            ../../uulib/libuu.a @GTKSPELL_LIBS@ @GTK_LIBS@ @GMIME_LIBS@ @GLIB_LIBS@ @OPENSSL_LIBS@
 
 if HAVE_WIN32
 pan_LDFLAGS = -mwindows
diff --git a/pan/gui/server-ui.cc b/pan/gui/server-ui.cc
index d1664c2..d2743b8 100644
--- a/pan/gui/server-ui.cc
+++ b/pan/gui/server-ui.cc
@@ -328,10 +328,17 @@ pan :: server_edit_dialog_new (Data& data, Queue& queue, GtkWindow * window, con
     HIG::workarea_add_section_divider (t, &row);
     HIG::workarea_add_section_title (t, &row, _("Security"));
     HIG::workarea_add_section_spacer (t, row, 2);
+
     struct { int o; const char * str; } ssl_items[] = {
+#ifdef HAVE_OPENSSL
       { 0, N_("Use Plaintext (Unsecured) Connections") },
       { 1, N_("Use Secure TLS (SSL) Connections") }
+
+#else
+      { 0, N_("Use Plaintext (Unsecured) Connections") }
+#endif
     };
+
     store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT);
     for (unsigned int i(0); i<G_N_ELEMENTS(ssl_items); ++i) {
       GtkTreeIter iter;
diff --git a/pan/tasks/Makefile.am b/pan/tasks/Makefile.am
index 8baff78..47d7459 100644
--- a/pan/tasks/Makefile.am
+++ b/pan/tasks/Makefile.am
@@ -1,5 +1,5 @@
-AM_CPPFLAGS = -I top_srcdir@ @GMIME_CFLAGS@ @GLIB_CFLAGS@
-AM_LDFLAGS = ../../uulib/libuu.a -lz -lssl -lcrypto
+AM_CPPFLAGS = -I top_srcdir@ @GMIME_CFLAGS@ @GLIB_CFLAGS@ @OPENSSL_CFLAGS@
+AM_LDFLAGS = ../../uulib/libuu.a -lz @OPENSSL_LIBS@
 
 noinst_LIBRARIES = libtasks.a
 



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