[82] | 1 | dnl |
---|
| 2 | dnl Configuring mecab |
---|
| 3 | dnl process this file with autoconf to generate 'configure'. |
---|
| 4 | dnl $Id: template.configure.ac,v 1.4 2008-04-18 12:36:26 shirok Exp $ |
---|
| 5 | dnl |
---|
| 6 | |
---|
| 7 | AC_PREREQ(2.54) |
---|
| 8 | AC_INIT(mecab, 1.0, shiro@acm.org) |
---|
| 9 | dnl If you want to use the system name (OS, architecture, etc) in the |
---|
| 10 | dnl configure, uncomment the following line. In such a case, you need |
---|
| 11 | dnl to copy config.guess and config.sub from automake distribution. |
---|
| 12 | dnl AC_CANONICAL_SYSTEM |
---|
| 13 | |
---|
| 14 | dnl Replace @LOCAL_PATHS@ by --with-local option. |
---|
| 15 | AC_ARG_WITH(local, |
---|
| 16 | AC_HELP_STRING([--with-local=PATH:PATH...], |
---|
| 17 | [For each PATH, add PATH/include to the include search |
---|
| 18 | paths and PATH/lib to the library search paths. Useful if you have some |
---|
| 19 | libraries installed in non-standard places. ]), |
---|
| 20 | [ |
---|
| 21 | case $with_local in |
---|
| 22 | yes|no|"") ;; #no effect |
---|
| 23 | *) LOCAL_PATHS=$with_local ;; |
---|
| 24 | esac |
---|
| 25 | ]) |
---|
| 26 | AC_SUBST(LOCAL_PATHS) |
---|
| 27 | |
---|
| 28 | dnl Set up gauche related commands. The commands are set by scanning |
---|
| 29 | dnl PATH. You can override them by "GOSH=/my/gosh ./configure" etc. |
---|
| 30 | AC_PATH_PROG([GOSH], gosh) |
---|
| 31 | AC_PATH_PROG([GAUCHE_CONFIG], gauche-config) |
---|
| 32 | AC_PATH_PROG([GAUCHE_PACKAGE], gauche-package) |
---|
| 33 | AC_PATH_PROG([GAUCHE_INSTALL], gauche-install) |
---|
| 34 | AC_PATH_PROG([GAUCHE_CESCONV], gauche-cesconv) |
---|
| 35 | |
---|
| 36 | dnl Usually these parameters are set by AC_PROG_CC, but we'd rather use |
---|
| 37 | dnl the same one as Gauche has been compiled with. |
---|
| 38 | SOEXT=`$GAUCHE_CONFIG --so-suffix` |
---|
| 39 | OBJEXT=`$GAUCHE_CONFIG --object-suffix` |
---|
| 40 | EXEEXT=`$GAUCHE_CONFIG --executable-suffix` |
---|
| 41 | AC_SUBST(SOEXT) |
---|
| 42 | AC_SUBST(OBJEXT) |
---|
| 43 | AC_SUBST(EXEEXT) |
---|
| 44 | |
---|
| 45 | ac_default_prefix=`$GAUCHE_CONFIG --prefix` |
---|
| 46 | |
---|
| 47 | GAUCHE_PKGINCDIR=`$GAUCHE_CONFIG --pkgincdir` |
---|
| 48 | GAUCHE_PKGLIBDIR=`$GAUCHE_CONFIG --pkglibdir` |
---|
| 49 | GAUCHE_PKGARCHDIR=`$GAUCHE_CONFIG --pkgarchdir` |
---|
| 50 | AC_SUBST(GAUCHE_PKGINCDIR) |
---|
| 51 | AC_SUBST(GAUCHE_PKGLIBDIR) |
---|
| 52 | AC_SUBST(GAUCHE_PKGARCHDIR) |
---|
| 53 | |
---|
| 54 | dnl Check for headers. |
---|
| 55 | dnl Add your macro calls to check required headers, if you have any. |
---|
| 56 | |
---|
| 57 | dnl Check for other programs. |
---|
| 58 | dnl Add your macro calls to check existence of programs, if you have any. |
---|
| 59 | |
---|
| 60 | dnl Check for libraries |
---|
| 61 | dnl Add your macro calls to check required libraries, if you have any. |
---|
| 62 | |
---|
| 63 | dnl Creating gpd (gauche package description) file |
---|
| 64 | GAUCHE_PACKAGE_CONFIGURE_ARGS="`echo ""$ac_configure_args"" | sed 's/[\\""\`\$]/\\\&/g'`" |
---|
| 65 | AC_MSG_NOTICE([creating ${PACKAGE_NAME}.gpd]) |
---|
| 66 | $GAUCHE_PACKAGE make-gpd "$PACKAGE_NAME" \ |
---|
| 67 | -version "$PACKAGE_VERSION" \ |
---|
| 68 | -configure "./configure $GAUCHE_PACKAGE_CONFIGURE_ARGS" |
---|
| 69 | |
---|
| 70 | dnl Output |
---|
| 71 | echo $PACKAGE_VERSION > VERSION |
---|
| 72 | AC_OUTPUT(Makefile) |
---|
| 73 | |
---|