update.
[chise/chise-base.git] / configure.in
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ(2.57)
5 AC_INIT(chise-base, 0.25, chise-en@m17n.org)
6
7 AC_CANONICAL_TARGET
8
9 # Checks for programs.
10 # AC_PROG_CC
11 # AC_PROG_LIBTOOL
12 #  AC_CHECK_PROGS(LIBTOOL, glibtool libtool, libtool, \
13 #       /usr/local/bin:/opt/bin:/sw/bin:/usr/bin:/bin)
14
15 AC_SUBST(ac_configure_args)
16 AC_SUBST(xemacs_configure_args)
17 AC_SUBST(xemacs_site_includes)
18 AC_SUBST(xemacs_site_libraries)
19 AC_SUBST(xemacs_opts)
20 AC_SUBST(cvs_root)
21 AC_SUBST(lemi_cvs_root)
22
23 if test -f CVS/Root; then
24         cvs_root=`cat CVS/Root`
25         lemi_cvs_root=`cat CVS/Root|sed 's/chise/root/'`
26 else
27         cvs_root=':pserver:anonymous@cvs.m17n.org:/cvs/chise'
28         lemi_cvs_root=':pserver:anonymous@cvs.m17n.org:/cvs/root'
29 fi
30
31 xemacs_configure_args=`echo $ac_configure_args \
32                         | sed 's/--with-site-includes/--site-includes/' \
33                         | sed 's/--with-site-libraries/--site-libraries/'`
34
35 # Settings for optional paths
36 AC_ARG_WITH(site_includes,
37   --with-site-includes=PATH List of directories to search first for header files
38 ,
39 #xemacs_site_includes="$with_site_includes"
40 ,
41 if test -d /sw/include; then
42         xemacs_site_includes="/sw/include"
43         xemacs_opts="--with-dialogs=athena --with-widgets=athena --with-athena=3d"
44
45         if test -f /sw/include/db3/db.h; then
46                 xemacs_site_includes="$xemacs_site_includes:/sw/include/db3"
47         elif test -f /sw/include/db4/db.h; then
48                 xemacs_site_includes="$xemacs_site_includes:/sw/include/db4"
49         fi
50         if test x"$with_canna" != x"no"; then
51            if test -d /sw/include/canna; then
52                 xemacs_opts="$xemacs_opts --with-canna"
53            fi
54         fi
55 fi
56 )
57
58 AC_ARG_WITH(site_libraries,
59   --with-site-libraries=PATH List of directories to search first for libraries
60 ,
61 #xemacs_site_libraries="$with_site_libraries"
62 ,
63 if test -d /sw/include; then
64         xemacs_site_libraries="/sw/lib"
65 fi
66 )
67
68 AC_ARG_WITH(canna,
69   --with-canna          Support the Canna input method
70 ,
71 #xemacs_opts="$xemacs_opts --with-canna"
72 ,
73 )
74
75 # Checks for libraries.
76 if test x"$xemacs_site_includes" != x""; then
77         xemacs_opts="$xemacs_opts --site-includes=$xemacs_site_includes"
78 fi
79
80 if test x"$xemacs_site_libraries" != x""; then
81         xemacs_opts="$xemacs_opts --site-libraries=$xemacs_site_libraries"
82 fi
83
84 if test x"$with_canna" != x"no"; then
85    AC_CHECK_LIB(canna,jrKanjiControl,
86    xemacs_opts="$xemacs_opts --with-canna")
87 fi
88
89 os_name=`uname -s`
90 mac_product_name=`sw_vers |grep ProductName|cut -f2`
91 mac_product_version=`sw_vers |grep ProductVersion|cut -f2`
92 mac_product_major_version=`echo $mac_product_version|cut -d'.' -f1`
93 mac_product_minor_version=`echo $mac_product_version|cut -d'.' -f2`
94
95 if test "$os_name" = "Darwin" -a \
96         "$mac_product_name" = "Mac OS X" -a \
97         $mac_product_major_version -eq 10 -a \
98         $mac_product_minor_version -ge 7
99 then
100    xemacs_opts="$xemacs_opts '--ldflags=-Wl,-no_pie'"
101 fi
102
103 # Checks for header files.
104
105 # Checks for typedefs, structures, and compiler characteristics.
106 #AC_C_CONST
107 #AC_C_INLINE
108
109 # Checks for library functions.
110 #AC_FUNC_ALLOCA
111 #AC_FUNC_STRNLEN
112
113 #AC_CHECK_FUNCS(strnlen)
114
115 AC_CONFIG_FILES([Makefile])
116 AC_OUTPUT