2007-12-30 17:41:49 +01:00
|
|
|
dnl ---- configure.ac for main programs
|
|
|
|
|
|
|
|
AC_INIT(configure.ac)
|
|
|
|
AC_CONFIG_SUBDIRS(libltdl)
|
|
|
|
GB_INIT(main)
|
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
AM_PROG_CC_C_O
|
|
|
|
|
|
|
|
dnl ---- Check for internationalization library
|
|
|
|
|
|
|
|
GB_COMPONENT(
|
|
|
|
intl,
|
|
|
|
INTL,
|
|
|
|
[external internationalization library],
|
|
|
|
[],
|
2009-07-07 13:53:20 +02:00
|
|
|
[GB_FIND(libintl.h, /opt/local /usr/local /usr, include)],
|
|
|
|
[GB_FIND(libintl.$SHLIBEXT, /opt/local /usr/local /usr /, lib)],
|
2007-12-30 17:41:49 +01:00
|
|
|
[-lintl],
|
|
|
|
[],
|
2008-04-10 14:06:14 +02:00
|
|
|
[This library may be located inside the system C library, so let's go on...])
|
2007-12-30 17:41:49 +01:00
|
|
|
|
|
|
|
dnl ---- Check for charset conversion library
|
|
|
|
|
|
|
|
GB_COMPONENT(
|
|
|
|
conv,
|
|
|
|
CONV,
|
|
|
|
[optional external charset conversion library],
|
|
|
|
[],
|
2009-07-07 13:53:20 +02:00
|
|
|
[GB_FIND(iconv.h, /opt/local /usr/local /usr, include)],
|
|
|
|
[GB_FIND(libiconv.$SHLIBEXT, /opt/local /usr/local /usr, lib)],
|
2007-12-30 17:41:49 +01:00
|
|
|
[-liconv],
|
|
|
|
[],
|
2008-04-10 14:06:14 +02:00
|
|
|
[This library may be located inside the system C library, so let's go on...])
|
2007-12-30 17:41:49 +01:00
|
|
|
|
|
|
|
dnl ---- Check for gettext library
|
|
|
|
|
2008-04-12 00:36:53 +02:00
|
|
|
if test "x$GETTEXT_LIB" != x; then
|
|
|
|
|
2007-12-30 17:41:49 +01:00
|
|
|
GB_COMPONENT(
|
|
|
|
gettext,
|
|
|
|
GETTEXT,
|
|
|
|
[external gettext library],
|
|
|
|
[],
|
|
|
|
[],
|
2009-07-07 13:53:20 +02:00
|
|
|
[GB_FIND(libgettextlib.$SHLIBEXT, /opt/local /usr/local /usr, lib)],
|
2008-01-18 14:43:10 +01:00
|
|
|
[-lgettextlib],
|
2007-12-30 17:41:49 +01:00
|
|
|
[],
|
2008-04-12 00:36:53 +02:00
|
|
|
[This library may be located inside the system C library, so let's go on...])
|
|
|
|
|
|
|
|
fi
|
2007-12-30 17:41:49 +01:00
|
|
|
|
2008-01-17 22:39:26 +01:00
|
|
|
dnl ---- Check for ffi library
|
|
|
|
|
2009-06-29 00:19:42 +02:00
|
|
|
GB_COMPONENT_SEARCH(
|
2008-01-17 22:39:26 +01:00
|
|
|
ffi,
|
|
|
|
FFI,
|
|
|
|
[foreign function interface],
|
|
|
|
[],
|
2008-02-26 09:23:51 +01:00
|
|
|
libffi,
|
2009-06-29 00:19:42 +02:00
|
|
|
[GB_FIND(ffi.h, /usr/local /usr/local/lib /usr /usr/lib /usr/lib/gcc/*/*, include ffi/include)],
|
|
|
|
[GB_FIND(libffi.$SHLIBEXT, /usr/local /usr, lib)],
|
|
|
|
[-lffi])
|
2008-01-17 22:39:26 +01:00
|
|
|
|
2009-07-07 13:53:20 +02:00
|
|
|
if test -z "$FFI_LIB"; then
|
|
|
|
GB_COMPONENT(
|
|
|
|
ffi,
|
|
|
|
FFI,
|
|
|
|
[foreign function interface],
|
|
|
|
[],
|
|
|
|
[GB_FIND(ffi.h, /opt/local /usr/local /usr/local/lib /usr /usr/lib /usr/lib/gcc/*/*, include ffi/include)],
|
|
|
|
[GB_FIND(libffi.$SHLIBEXT, /usr/local /usr, lib)],
|
|
|
|
[-lffi])
|
|
|
|
fi
|
|
|
|
|
2008-02-26 09:23:51 +01:00
|
|
|
dnl ---- Remove DISABLED file that could have been generated before
|
|
|
|
|
|
|
|
rm -f DISABLED
|
|
|
|
|
2007-12-30 17:41:49 +01:00
|
|
|
dnl ---- Should I use libtool to load shared libraries in gbi and gbx ?
|
|
|
|
|
2008-03-31 21:04:28 +02:00
|
|
|
if test "$SYSTEM" != "CYGWIN"; then
|
2007-12-30 17:41:49 +01:00
|
|
|
AC_DEFINE(DONT_USE_LTDL, 1, [Do not use libtool to load shared libraries])
|
2009-05-15 19:57:29 +02:00
|
|
|
if test "$SYSTEM" != "OPENBSD" && test "$SYSTEM" != "FREEBSD"; then
|
2008-03-31 21:04:28 +02:00
|
|
|
DL_LIB="-ldl"
|
|
|
|
else
|
|
|
|
DL_LIB=""
|
|
|
|
fi
|
2007-12-30 17:41:49 +01:00
|
|
|
else
|
|
|
|
DL_LIB=$LIBLTDL
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(DL_LIB)
|
|
|
|
|
|
|
|
dnl ---- Check for Portland scripts
|
|
|
|
|
|
|
|
AC_CHECK_PROGS(XDG_UTILS, [xdg-mime xdg-icon-resource], [])
|
|
|
|
|
|
|
|
dnl ---- Other options
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(
|
|
|
|
preloading,
|
2009-03-01 17:38:44 +01:00
|
|
|
[ --enable-preloading enable preloading (default: no)],
|
2007-12-30 17:41:49 +01:00
|
|
|
gambas_preloading=$enableval,
|
2009-03-01 17:38:44 +01:00
|
|
|
gambas_preloading=no
|
2007-12-30 17:41:49 +01:00
|
|
|
)
|
|
|
|
|
2008-03-21 03:43:16 +01:00
|
|
|
if test "$SYSTEM" != "CYGWIN"; then
|
|
|
|
if test "$gambas_preloading" = "yes"; then
|
|
|
|
AC_DEFINE(DO_PRELOADING, 1, allows shared library preloading )
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
if test "$gambas_preloading" = "yes"; then
|
|
|
|
AC_MSG_WARN([Preloading is disabled on this system])
|
|
|
|
fi
|
2007-12-30 17:41:49 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
dnl ---- Create makefiles
|
|
|
|
|
|
|
|
AC_OUTPUT( \
|
|
|
|
Makefile \
|
|
|
|
share/Makefile \
|
|
|
|
gbc/Makefile \
|
|
|
|
gbx/Makefile \
|
|
|
|
lib/Makefile \
|
|
|
|
lib/debug/Makefile \
|
|
|
|
lib/eval/Makefile \
|
|
|
|
lib/db/Makefile \
|
|
|
|
lib/vb/Makefile \
|
|
|
|
lib/compress/Makefile \
|
|
|
|
lib/option/Makefile \
|
|
|
|
lib/draw/Makefile \
|
|
|
|
lib/gui/Makefile \
|
2009-01-13 01:42:55 +01:00
|
|
|
lib/image/Makefile \
|
2007-12-30 17:41:49 +01:00
|
|
|
)
|