From 48004a534a4d02c25962233b4e275530f4b8b15a Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Thu, 6 May 2004 13:29:20 +0000 Subject: Check for nsIPassword.h 2004-05-06 Christian Persch * configure.in: Check for nsIPassword.h * embed/mozilla/mozilla-embed-single.cpp: Allow compilation without nsIPassword (mozilla wallet extension). --- ChangeLog | 10 ++++++++++ configure.in | 4 ++++ embed/mozilla/mozilla-embed-single.cpp | 15 ++++++++++----- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index b70b13b1a..d8bf9be08 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2004-05-06 Christian Persch + + * configure.in: + + Check for nsIPassword.h + + * embed/mozilla/mozilla-embed-single.cpp: + + Allow compilation without nsIPassword (mozilla wallet extension). + 2004-05-06 Christian Persch * embed/mozilla/EphyBrowser.cpp: diff --git a/configure.in b/configure.in index b8e93841f..5f1ad8f60 100644 --- a/configure.in +++ b/configure.in @@ -175,6 +175,10 @@ AC_CHECK_FILE([$MOZILLA_INCLUDE_ROOT/pipnss/nsIX509Cert.h], [AC_DEFINE(HAVE_MOZILLA_PSM, 1, [Define if you have the mozilla psm headers installed])]) +AC_CHECK_FILE([$MOZILLA_INCLUDE_ROOT/nsIPassword.h], + [AC_DEFINE(HAVE_NSIPASSWORD_H, 1, + [Define if mozilla nsIPassword header is available])]) + MOZILLA_WARN_CXXFLAGS="-Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor" AC_SUBST(MOZILLA_WARN_CXXFLAGS) diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp index 693c39bec..939ebd2bb 100644 --- a/embed/mozilla/mozilla-embed-single.cpp +++ b/embed/mozilla/mozilla-embed-single.cpp @@ -50,17 +50,19 @@ #include #include #include -#include -#include -#include #include #include +#include #include #include #include #include #include +#ifdef HAVE_NSIPASSWORD_H +#include +#endif + #ifdef ALLOW_PRIVATE_API // FIXME: For setting the locale. hopefully gtkmozembed will do itself soon #include @@ -432,8 +434,8 @@ init_services (MozillaEmbedSingle *single) /* Pre initialization */ mozilla_init_home (); mozilla_init_profile (); - - /* Fire up the best */ + + /* Fire up the beast */ gtk_moz_embed_push_startup (); /* Until gtkmozembed does this itself */ @@ -649,6 +651,8 @@ static GList * impl_list_passwords (EphyPasswordManager *manager) { GList *passwords = NULL; + +#ifdef HAVE_NSIPASSWORD_H nsresult rv; nsCOMPtr passwordManager = @@ -684,6 +688,7 @@ impl_list_passwords (EphyPasswordManager *manager) passwords = g_list_prepend (passwords, p); } +#endif return passwords; } -- cgit v1.2.3