1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-moduledir = ${libdir}/gtk-2.0/2.4.0/immodules
+moduledir = ${libdir}/gtk-2.0/${GTK_BINARY_VERSION}/immodules
## Makefile.am for gtk+/modules/input
if PLATFORM_WIN32
no_undefined = -no-undefined
@@ -6,11 +6,11 @@
SUBDIRS = po
-INCLUDES = @GTK_DEP_CFLAGS@ -I/usr/include/wnn -DIM_LOCALEDIR=\"${datadir}/locale\"
+INCLUDES = @GTK_DEP_CFLAGS@ -DIM_LOCALEDIR=\"${datadir}/locale\"
DEPS =
-LDADDS = @GTK_DEP_LIBS@ -lcrypt
+LDADDS = @GTK_DEP_LIBS@
EXTRA_DIST= \
im-freewnn.spec
@@ -38,7 +38,7 @@
candwin.h \
candwin.c
-im_freewnn_la_LIBADD = $(LDADDS) -lcrypt
+im_freewnn_la_LIBADD = $(LDADDS)
module_LTLIBRARIES = \
im-freewnn.la
--- a/configure.in
+++ b/configure.in
@@ -21,8 +21,10 @@
GTK_DEP_CFLAGS=`pkg-config gtk+-2.0 --cflags`
GTK_DEP_LIBS=`pkg-config gtk+-2.0 --libs`
+GTK_BINARY_VERSION=`pkg-config gtk+-2.0 --variable=gtk_binary_version`
AC_SUBST(GTK_DEP_CFLAGS)
AC_SUBST(GTK_DEP_LIBS)
+AC_SUBST(GTK_BINARY_VERSION)
LT_RELEASE=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION
LT_CURRENT=2
@@ -48,11 +50,9 @@
AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
dnl FreeWnn check
-ldflags_backup="$LDFLAGS"
-LDFLAGS="$LDFLAGS -lcrypt"
AC_CHECK_HEADER(wnn/jlib.h,,)
+AC_CHECK_LIB(crypt, crypt,,)
AC_CHECK_LIB(wnn, jl_open_lang,,)
-LDFLAGS="$ldflags_backup"
AC_OUTPUT([
Makefile
--- a/freewnn-modewin.h
+++ b/freewnn-modewin.h
@@ -23,7 +23,7 @@
#include <gtk/gtk.h>
-#include <jllib.h>
+#include <wnn/jllib.h>
#include "freewnn-register-win.h"
#include "freewnn-config.h"
--- a/freewnn-register-win.c
+++ b/freewnn-register-win.c
@@ -18,7 +18,7 @@
*
*/
-#include <jllib.h>
+#include <wnn/jllib.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
--- a/freewnn-register-win.h
+++ b/freewnn-register-win.h
@@ -22,7 +22,7 @@
#define _FREEWNN_REGIST_WIN
#include <gtk/gtk.h>
-#include <jllib.h>
+#include <wnn/jllib.h>
typedef struct _FreeWnnRegisterWin FreeWnnRegisterWin;
--- a/freewnn-utils.h
+++ b/freewnn-utils.h
@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
-#include <jllib.h>
+#include <wnn/jllib.h>
#include <glib.h>
w_char* char2wchar(unsigned char* str);
--- a/im-freewnn.h
+++ b/im-freewnn.h
@@ -26,7 +26,7 @@
#include <gtk/gtk.h>
#include <gtk/gtkimmodule.h>
-#include <jllib.h>
+#include <wnn/jllib.h>
#include "freewnn-modewin.h"
#include "freewnn-utils.h"
|