Changeset 3067

Show
Ignore:
Timestamp:
12/03/07 19:38:40
Author:
pvanhoof
Message:

2007-12-02 Philip Van Hoof <pvanhoof@gnome.org>

        • Merging with trunk
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/pvanhoof/bs/ChangeLog

    r3055 r3067  
     12007-12-02  Philip Van Hoof  <pvanhoof@gnome.org> 
     2 
     3        * Merging with trunk 
     4 
    152007-12-02  Philip Van Hoof  <pvanhoof@gnome.org> 
    26 
  • devel/pvanhoof/bs/libtinymailui-mozembed/mozilla-preferences.cpp

    r2835 r3067  
    2323 
    2424#include <stdlib.h> 
     25 
     26#ifdef XPCOM_GLUE 
     27#include <gtkmozembed_glue.cpp> 
     28#endif 
     29 
    2530#ifdef HAVE_MOZILLA_1_9 
    2631#include <gtkmozembed_common.h> 
     
    111116    gchar *profile_path; 
    112117    gchar *useragent; 
     118 
     119#ifdef XPCOM_GLUE 
     120    nsresult rv; 
     121    static const GREVersionRange greVersion = { 
     122      "1.9a", PR_TRUE, 
     123      "2", PR_TRUE 
     124    }; 
     125    char xpcomLocation[4096]; 
     126    rv = GRE_GetGREPathWithProperties(&greVersion, 1, nsnull, 0, xpcomLocation, 4096); 
     127    if (NS_FAILED (rv)) 
     128    { 
     129      g_warning ("Could not determine locale!\n"); 
     130      return; 
     131    } 
     132 
     133    // Startup the XPCOM Glue that links us up with XPCOM. 
     134    rv = XPCOMGlueStartup(xpcomLocation); 
     135    if (NS_FAILED (rv)) 
     136    { 
     137      g_warning ("Could not determine locale!\n"); 
     138      return; 
     139    } 
     140 
     141    rv = GTKEmbedGlueStartup(); 
     142    if (NS_FAILED (rv)) 
     143    { 
     144      g_warning ("Could not determine locale!\n"); 
     145      return; 
     146    } 
     147 
     148    char *lastSlash = strrchr(xpcomLocation, '/'); 
     149    if (lastSlash) 
     150      *lastSlash = '\0'; 
     151 
     152    gtk_moz_embed_set_path(xpcomLocation); 
     153 
     154#else // XPCOM_GLUE 
    113155#ifdef HAVE_MOZILLA_1_9 
    114156    gtk_moz_embed_set_path (MOZILLA_HOME); 
    115157#else 
    116158    gtk_moz_embed_set_comp_path (MOZILLA_HOME); 
    117 #endif 
     159#endif // HAVE_MOZILLA_1_9 
     160#endif // XPCOM_GLUE 
    118161 
    119162    home_path = getenv ("HOME"); 
  • devel/pvanhoof/bs/m4/moz.m4

    r2910 r3067  
    22[ 
    33 
    4 mozilla_nspr="no" 
    5 AC_MSG_CHECKING(Mozilla NSPR pkg-config module name) 
    6 mozilla_nspr_pcs="nspr mozilla-nspr firefox-nspr xulrunner-nspr microb-engine-nspr" 
    7 for pc in $mozilla_nspr_pcs; do 
    8         if $PKG_CONFIG --exists $pc; then 
    9                 mozilla_nspr=$pc 
    10                 break; 
    11         fi 
    12 done 
     4AC_MSG_CHECKING(Mozilla nspr pkg-config module) 
     5AC_ARG_WITH([mozilla-nspr-pc], 
     6  AS_HELP_STRING([--with-mozilla-nspr-pc=NAME], [name of nspr pkg-config module]), 
     7      [mozilla_nspr=$with_mozilla_nspr_pc], 
     8      [mozilla_nspr="no" 
     9       for pc in nspr mozilla-nspr firefox-nspr xulrunner-nspr microb-engine-nspr; do 
     10           if $PKG_CONFIG --exists $pc; then 
     11               mozilla_nspr=$pc 
     12               break 
     13           fi 
     14       done]) 
    1315AC_MSG_RESULT($mozilla_nspr) 
    1416 
    15 mozilla_nss="no" 
    16 AC_MSG_CHECKING(Mozilla NSS pkg-config module name) 
    17 mozilla_nss_pcs="nss mozilla-nss firefox-nss xulrunner-nss microb-engine-nss" 
    18 for pc in $mozilla_nss_pcs; do 
    19         if $PKG_CONFIG --exists $pc; then 
    20                 mozilla_nss=$pc 
    21                 break; 
    22         fi 
    23 done 
     17AC_MSG_CHECKING(Mozilla nss pkg-config module) 
     18AC_ARG_WITH([mozilla-nss-pc], 
     19  AS_HELP_STRING([--with-mozilla-nss-pc=NAME], [name of nss pkg-config module]), 
     20      [mozilla_nss=$with_mozilla_nss_pc], 
     21      [mozilla_nss="no" 
     22       for pc in nss mozilla-nss firefox-nss xulrunner-nss microb-engine-nss; do 
     23           if $PKG_CONFIG --exists $pc; then 
     24               mozilla_nss=$pc 
     25               break 
     26           fi 
     27       done]) 
    2428AC_MSG_RESULT($mozilla_nss) 
    2529 
    26 mozilla_xpcom="no" 
     30AC_MSG_CHECKING(Mozilla xpcom pkg-config module) 
     31AC_ARG_WITH([mozilla-xpcom-pc], 
     32  AS_HELP_STRING([--with-mozilla-xpcom-pc=NAME], [name of xpcom pkg-config module]), 
     33      [mozilla_xpcom=$with_mozilla_xpcom_pc], 
     34      [mozilla_xpcom="no" 
     35       for pc in libxul-embedding xpcom mozilla-xpcom firefox-xpcom xulrunner-xpcom microb-engine-xpcom; do 
     36           if $PKG_CONFIG --exists $pc; then 
     37               mozilla_xpcom=$pc 
     38               break 
     39           fi 
     40       done]) 
     41AC_MSG_RESULT($mozilla_xpcom) 
     42 
     43AC_MSG_CHECKING(Mozilla home) 
    2744mozilla_home="no" 
    28 AC_MSG_CHECKING(Mozilla XPCOM pkg-config module name) 
    29 mozilla_xpcom_pcs="xpcom mozilla-xpcom firefox-xpcom xulrunner-xpcom microb-engine-xpcom" 
    30 for pc in $mozilla_xpcom_pcs; do 
    31         if $PKG_CONFIG --exists $pc; then 
    32                 mozilla_xpcom=$pc 
    33                 mozilla_home="`$PKG_CONFIG --variable=libdir $pc`" 
    34                 break; 
    35         fi 
    36 done 
    37 AC_MSG_RESULT($mozilla_xpcom) 
     45if test x$mozilla_xpcom != xno; then 
     46    mozilla_home="`$PKG_CONFIG --variable=libdir $mozilla_xpcom`" 
     47fi 
    3848AC_MSG_RESULT($mozilla_home) 
    3949 
    40 mozilla_gtkmozembed="no" 
    41 AC_MSG_CHECKING(Mozilla gtkmozembed pkg-config module name) 
    42 mozilla_gtkmozembed_pcs="gtkmozembed mozilla-gtkmozembed firefox-gtkmozembed xulrunner-gtkmozembed microb-engine-gtkembedmoz gtkembedmoz" 
    43 for pc in $mozilla_gtkmozembed_pcs; do 
    44         if $PKG_CONFIG --exists $pc; then 
    45                 mozilla_gtkmozembed=$pc 
    46                 break; 
    47         fi 
    48 done 
     50AC_MSG_CHECKING(Mozilla gtkmozembed pkg-config module) 
     51AC_ARG_WITH([mozilla-gtkmozembed-pc], 
     52  AS_HELP_STRING([--with-mozilla-gtkmozembed-pc=NAME], [name of gtkmozembed pkg-config module]), 
     53      [mozilla_gtkmozembed=$with_mozilla_gtkmozembed_pc], 
     54      [mozilla_gtkmozembed="no" 
     55       for pc in libxul-embedding gtkmozembed mozilla-gtkmozembed firefox-gtkmozembed xulrunner-gtkmozembed microb-engine-gtkembedmoz gtkembedmoz; do 
     56           if $PKG_CONFIG --exists $pc; then 
     57               mozilla_gtkmozembed=$pc 
     58               break 
     59           fi 
     60       done]) 
    4961AC_MSG_RESULT($mozilla_gtkmozembed) 
    5062 
    5163#Detect Mozilla XPCom version 
    52 if test x$mozilla_xpcom != x; then 
     64if test x$mozilla_xpcom != xno; then 
    5365 
    5466   AC_MSG_CHECKING(Mozilla xpcom engine version) 
     
    5668   #of the engine we use. 
    5769   mozilla_xpcom_includedir="`$PKG_CONFIG --variable=includedir $mozilla_xpcom`" 
     70   mozilla_xpcom_includetype="unstable" 
    5871 
     72   # append /stable or /unstable for mozilla >= 1.9 
     73   if test -d $mozilla_xpcom_includedir/$mozilla_xpcom_includetype; then 
     74       mozilla_xpcom_includedir="$mozilla_xpcom_includedir/$mozilla_xpcom_includetype" 
     75   fi 
    5976   if test -f $mozilla_xpcom_includedir/mozilla-config.h 
    6077   then 
     
    88105AM_CONDITIONAL([HAVE_MOZILLA_1_8],[test "$mozilla_major_version" = "1" -a "$mozilla_minor_version" -ge "8"]) 
    89106AM_CONDITIONAL([HAVE_MOZILLA_1_9],[test "$mozilla_major_version" = "1" -a "$mozilla_minor_version" -ge "9"]) 
    90 AC_DEFINE([MOZEMBED_MOZILLA_VERSION],["$mozilla_version"],[Detected mozilla engine version for mozembed]) 
     107AC_DEFINE([MOZEMBED_MOZILLA_VERSION],"$mozilla_version",[Detected mozilla engine version for mozembed]) 
    91108 
    92109]) 
    93110 
     111dnl vim:syntax=m4