"Fossies" - the Fresh Open Source Software Archive

Member "genius-1.0.24/configure.ac" (8 Apr 2018, 13305 Bytes) of package /linux/misc/genius-1.0.24.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "configure.ac": 1.0.23_vs_1.0.24.

    1 AC_INIT([genius], [1.0.24])
    2 #AX_IS_RELEASE([git-directory])
    3 AX_IS_RELEASE([always])
    4 AC_CONFIG_SRCDIR([src/calc.c])
    5 AM_INIT_AUTOMAKE([dist-xz])
    6 
    7 AC_CONFIG_MACRO_DIRS([m4])
    8 
    9 AM_CONFIG_HEADER(config.h)
   10 
   11 dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
   12 AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS")
   13 
   14 AM_MAINTAINER_MODE
   15 
   16 AC_PROG_INTLTOOL([0.21])
   17 
   18 dnl ================= Requirements ================================================
   19 
   20 GTK_REQUIRED=2.20.0
   21 GLIB_REQUIRED=2.26.0
   22 PANGO_REQUIRED=1.22.0
   23 GTKSOURCEVIEW_REQUIRED=0.3.0
   24 GTKSOURCEVIEW2_REQUIRED=2.0.2
   25 GIO_REQUIRED=2.16.0
   26 
   27 dnl ===============================================================================
   28 
   29 AC_ARG_ENABLE(extra-gcc-optimization,
   30 [  --disable-extra-gcc-optimization  Compile without extra GCC optimization (if using GCC)],
   31 use_extraopt="$enableval",use_extraopt=yes)
   32 AC_PROG_CC
   33 if test "x$GCC" = "xyes" -a "x$use_extraopt" = "xyes" ; then
   34 	echo "Turning on extra gcc flags -finline-functions -frename-registers"
   35 	CFLAGS="-finline-functions -frename-registers $CFLAGS"
   36 fi
   37 AC_ISC_POSIX
   38 AC_HEADER_STDC
   39 AM_PROG_LEX
   40 AM_PROG_LIBTOOL
   41 AC_PROG_YACC
   42 
   43 AM_BINRELOC
   44 
   45 AX_COMPILER_FLAGS([WARN_CFLAGS],[WARN_LDFLAGS])
   46 
   47 dnl ================= Translation Stuff ==============================================
   48 
   49 GETTEXT_PACKAGE=genius
   50 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",[gettext package name])
   51 AC_SUBST(GETTEXT_PACKAGE)
   52 
   53 ALL_LINGUAS="ar az bs ca cs da de dz el en_CA en_GB eo es eu fr ga gl hi hr hu id it ja ko lv mk ml nb ne nl oc pa pt_BR pt ro ru rw sl sq sr@latin sr sv zh_CN zh_TW"
   54 AM_GLIB_GNU_GETTEXT
   55 
   56 dnl ===============================================================================
   57 
   58 AC_SUBST(CFLAGS)
   59 AC_SUBST(CPPFLAGS)
   60 AC_SUBST(LDFLAGS)
   61 
   62 # glib-genmarshal
   63 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
   64 
   65 dnl Check for termcap
   66 AC_CHECK_LIB(termcap, tgetent,[TERMCAP_LIB="-ltermcap"],
   67 	     [AC_CHECK_LIB(ncurses, tgetent,
   68                            [TERMCAP_LIB="-lncurses"
   69                             AC_DEFINE(USE_NCURSES,[1], [Use ncurses library])
   70                             AC_CHECK_HEADER(ncurses/curses.h, [
   71 					    AC_DEFINE(INC_NCURSES,[1],[ncurses include])])], [
   72 			   AC_MSG_ERROR(Termcap library not found)])])
   73 AC_SUBST(TERMCAP_LIB)
   74 
   75 dnl Check for readline
   76 AC_CHECK_LIB(readline,readline, [READLINE_LIB="-lreadline"],
   77 	     AC_MSG_ERROR(Readline library not found),
   78 	     $TERMCAP_LIB)
   79 AC_SUBST(READLINE_LIB)
   80 
   81 GMP_LIB=""
   82 AC_CHECK_LIB(gmp, __gmpz_init_set,[GMP_LIB=-lgmp], [
   83 	AC_CHECK_LIB(gmp2, __gmpz_init_set_d,[GMP_LIB=-lgmp2
   84 		AC_DEFINE(HAVE_GMP2_INCLUDE_DIR,[1],[Have gmp2 include directory])],
   85 		AC_MSG_ERROR(GMP Library not found))])
   86 AC_SUBST(GMP_LIB)
   87 
   88 AC_CHECK_LIB(mpfr, mpfr_j0, [],
   89 	[AC_MSG_ERROR([New enough MPFR (2.3.0+) not found, see http://www.mpfr.org])],
   90 	"$GMP_LIB")
   91 
   92 # No schemas yet so ignore this section for now
   93 #AC_PATH_PROG(GCONFTOOL, gconftool-2)
   94 #dnl Specify the gconf configuration source,
   95 #dnl default to xml::$(sysconfdir)/gconf/gconf.xml.defaults
   96 #
   97 #GCONF_CONFIG_SOURCE=
   98 #
   99 #AC_ARG_ENABLE(gconf-source, [  --enable-gconf-source=sourceaddress Where to install schema files.], GCONF_CONFIG_SOURCE=$enable_gconf_source,)
  100 #if test "x$GCONF_CONFIG_SOURCE" = "x"; then
  101 #        GCONF_CONFIG_SOURCE="xml::\${sysconfdir}/gconf/gconf.xml.defaults"
  102 #fi
  103 #
  104 #AC_SUBST(GCONF_CONFIG_SOURCE)
  105 #AC_SUBST(INSTALL_GCONF_CONFIG_SOURCE)
  106 
  107 AC_ARG_ENABLE(gtksourceview,
  108 [  --disable-gtksourceview Do not use GtkSourceView library even if detected],
  109 use_gtksourceview="$enableval",use_gtksourceview=yes)
  110 
  111 AC_ARG_ENABLE(gnome,
  112 [  --disable-gnome         Compile without the GNOME frontend (no GUI, no plotting)],
  113 use_gnome="$enableval",use_gnome=yes)
  114 
  115 # Used for the 'genius' binary
  116 PKG_CHECK_MODULES(GENIUS_NOGUI, glib-2.0 >= $GLIB_REQUIRED gmodule-2.0 >= $GLIB_REQUIRED)
  117 AC_SUBST(GENIUS_NOGUI_CFLAGS)
  118 AC_SUBST(GENIUS_NOGUI_LIBS)
  119 
  120 # glib
  121 PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED)
  122 AC_SUBST(GLIB_CFLAGS)
  123 AC_SUBST(GLIB_LIBS)
  124 
  125 GENIUS_MODULES="gtk+-2.0 >= $GTK_REQUIRED gio-2.0 >= $GIO_REQUIRED"
  126 
  127 if test "x$use_gnome" = "xyes" ; then
  128   echo " 
  129 Testing for presence of GNOME (GTK and GIO is enough) and GtkSourceView:
  130 Note:
  131       You can compile without GNOME by using the --disable-gnome option
  132 "
  133   PKG_CHECK_MODULES(GENIUS, $GENIUS_MODULES)
  134 
  135   if test "x$use_gtksourceview" = "xyes" ; then
  136     PKG_CHECK_MODULES(GSV, gtksourceview-2.0 >= $GTKSOURCEVIEW2_REQUIRED, have_gtksourceview2=yes, have_gtksourceview2=no)
  137 
  138     if test "x$have_gtksourceview2" != "xyes"; then
  139       PKG_CHECK_MODULES(GSV, gtksourceview-1.0 >= $GTKSOURCEVIEW_REQUIRED, have_gtksourceview=yes, have_gtksourceview=no)
  140     fi
  141 
  142     if test "x$have_gtksourceview2" = "xyes"; then
  143       AC_DEFINE(HAVE_GTKSOURCEVIEW,[1],[have gtksourceview])
  144       AC_DEFINE(HAVE_GTKSOURCEVIEW2,[1],[have gtksourceview2])
  145     elif test "x$have_gtksourceview" = "xyes"; then
  146       AC_DEFINE(HAVE_GTKSOURCEVIEW,[1],[have gtksourceview])
  147     else
  148       use_gtksourceview=no
  149     fi
  150   else
  151     PKG_CHECK_MODULES(GENIUS, $GENIUS_MODULES)
  152   fi
  153 
  154   VICIOUS_MODULES="gtk+-2.0 >= $GTK_REQUIRED"
  155   VICIOUS_UI_LIBS="libviciousui.a"
  156   
  157   GNOME_GENIUS="gnome-genius\$(EXEEXT)"
  158   GENIUS_READLINE_HELPER_FIFO="genius-readline-helper-fifo\$(EXEEXT)"
  159   GNOME_GENIUS_DESKTOP_IN="gnome-genius.desktop.in"
  160 
  161 else
  162   use_gtksourceview=no
  163   VICIOUS_MODULES="glib-2.0 >= $GLIB_REQUIRED gmodule-2.0 >= $GLIB_REQUIRED"
  164   VICIOUS_UI_LIBS=
  165   GENIUS_CFLAGS="$GENIUS_NOGUI_CFLAGS"
  166   GENIUS_LIBS="$GENIUS_NOGUI_LIBS"
  167   GNOME_GENIUS=
  168   GENIUS_READLINE_HELPER_FIFO=
  169   GNOME_GENIUS_DESKTOP_IN=
  170 fi
  171 
  172 AC_SUBST(VICIOUS_UI_LIBS)
  173 AC_SUBST(GENIUS_CFLAGS)
  174 AC_SUBST(GENIUS_LIBS)
  175 AC_SUBST(GSV_CFLAGS)
  176 AC_SUBST(GSV_LIBS)
  177 AC_SUBST(GNOME_GENIUS)
  178 AC_SUBST(GENIUS_READLINE_HELPER_FIFO)
  179 AC_SUBST(GNOME_GENIUS_DESKTOP_IN)
  180 
  181 # This is used for vicious-extensions
  182 PKG_CHECK_MODULES(VICIOUS, $VICIOUS_MODULES)
  183 AC_SUBST(VICIOUS_CFLAGS)
  184 AC_SUBST(VICIOUS_LIBS)
  185 
  186 dnl ******************************
  187 dnl More compiler warnings
  188 dnl ******************************
  189 
  190 dnl Warnings done above
  191 
  192 #AC_ARG_ENABLE(more-warnings,
  193 #[  --enable-more-warnings  Maximum compiler warnings],
  194 #set_more_warnings="$enableval",[
  195 #if test -f $srcdir/.git/config; then
  196 #	is_cvs_version=true
  197 #	set_more_warnings=yes
  198 #else
  199 #	set_more_warnings=no
  200 #fi
  201 #])
  202 #warning_flags=
  203 #realsave_CFLAGS="$CFLAGS"
  204 #AC_MSG_CHECKING(for more warnings)
  205 #if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
  206 #	AC_MSG_RESULT(yes)
  207 #	warning_flags="-Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
  208 #	CFLAGS="$warning_flags $CFLAGS"
  209 #
  210 #	for option in -Wno-sign-compare; do
  211 #		SAVE_CFLAGS="$CFLAGS"
  212 #		CFLAGS="$CFLAGS $option"
  213 #		AC_MSG_CHECKING([whether gcc understands $option])
  214 #		AC_TRY_COMPILE([], [],
  215 #			has_option=yes,
  216 #			has_option=no,)
  217 #		CFLAGS="$SAVE_CFLAGS"
  218 #		AC_MSG_RESULT($has_option)
  219 #		if test $has_option = yes; then
  220 #		  warning_flags="$warning_flags $option"
  221 #		fi
  222 #		unset has_option
  223 #		unset SAVE_CFLAGS
  224 #	done
  225 #	unset option
  226 #else
  227 #	AC_MSG_RESULT(no)
  228 #fi
  229 #CFLAGS="$realsave_CFLAGS"
  230 #EXTRA_WARNING_CFLAGS="$warning_flags"
  231 #	-DG_DISABLE_DEPRECATED \
  232 #	-DGDK_PIXBUF_DISABLE_DEPRECATED \
  233 #	-DGDK_DISABLE_DEPRECATED \
  234 #	-DGTK_DISABLE_DEPRECATED \
  235 #	-DGNOME_DISABLE_DEPRECATED \
  236 #
  237 #AC_SUBST(EXTRA_WARNING_CFLAGS)
  238 
  239 dnl wordexp check, we use glob otherwise but that's not perfect
  240 dnl warn the user, we do this on the end so that the user notices
  241 AC_CHECK_FUNC(wordexp,AC_DEFINE(HAVE_WORDEXP,[1],[Have the wordexp function]),
  242   	      [AC_MSG_WARN([*** You don't have wordexp, glob will be used instead ***])])
  243 
  244 AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache)
  245 if test -z "$GTK_UPDATE_ICON_CACHE"; then
  246     AC_MSG_ERROR([Could not find gtk-update-icon-cache])
  247 fi
  248 
  249 #dnl scrollkeeper checks 
  250 #AC_ARG_ENABLE([scrollkeeper],
  251 #	[AC_HELP_STRING([--disable-scrollkeeper],
  252 #		[do not make updates to the scrollkeeper database])],,
  253 #		enable_scrollkeeper=yes)
  254 #AM_CONDITIONAL([ENABLE_SK],[test "$enable_scrollkeeper" = "yes"])
  255 #
  256 #AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config,no)
  257 #if test x$SCROLLKEEPER_CONFIG = xno; then
  258 #  AC_MSG_ERROR(Couldn't find scrollkeeper-config. Please install the scrollkeeper package)
  259 #fi
  260 
  261 dnl mime checks
  262 AC_ARG_ENABLE(update-mimedb,
  263 	AC_HELP_STRING([--disable-update-mimedb],
  264 		[do not update mime database after installation]),,
  265 		enable_update_mimedb=yes)
  266 AM_CONDITIONAL(ENABLE_UPDATE_MIMEDB, test x$enable_update_mimedb = xyes)
  267 
  268 
  269 ####
  270 # VTE STUFF, this is all temporary pending a port to gtk 3.0 in the star trek future
  271 
  272 AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
  273 AC_DEFINE_UNQUOTED(VTE_DEFAULT_EMULATION,"xterm",[The default terminal type to be emulated.])
  274 VTE_DEFAULT_EMULATION="xterm"
  275 AC_SUBST(VTE_DEFAULT_EMULATION)
  276 
  277 # Check for headers.
  278 AC_CHECK_HEADERS(sys/select.h sys/syslimits.h sys/termios.h sys/un.h sys/wait.h stropts.h termios.h wchar.h)
  279 AC_HEADER_TIOCGWINSZ
  280 
  281 # Check for PTY handling functions.
  282 AC_CHECK_FUNCS([cfmakeraw fork setsid setpgid getpgid getpt grantpt unlockpt ptsname ptsname_r tcgetattr tcsetattr])
  283 
  284 # Pull in the right libraries for various functions which might not be
  285 # bundled into an exploded libc.
  286 AC_CHECK_FUNC(socket,[have_socket=1],AC_CHECK_LIB(socket,socket,[have_socket=1; LIBS="$LIBS -lsocket"]))
  287 AC_CHECK_FUNC(socketpair,[have_socketpair=1],AC_CHECK_LIB(socket,socketpair,[have_socketpair=1; LIBS="$LIBS -lsocket"]))
  288 AC_CHECK_FUNC(recvmsg,[have_recvmsg=1],AC_CHECK_LIB(socket,recvmsg,[have_recvmsg=1; LIBS="$LIBS -lsocket -lnsl"]))
  289 if test x$have_socket = x1 ; then
  290 	AC_DEFINE(HAVE_SOCKET,1,[Define if you have the socket function.])
  291 fi
  292 if test x$have_socketpair = x1 ; then
  293 	AC_DEFINE(HAVE_SOCKETPAIR,1,[Define if you have the socketpair function.])
  294 fi
  295 if test x$have_recvmsg = x1 ; then
  296 	AC_DEFINE(HAVE_RECVMSG,1,[Define if you have the recvmsg function.])
  297 fi
  298 AC_CHECK_FUNC(floor,,AC_CHECK_LIB(m,floor,LIBS=["$LIBS -lm"]))
  299 AC_CHECK_FUNCS([ceil floor])
  300 
  301 # Look for tgetent
  302 
  303 AC_CHECK_FUNC([tgetent],[vte_cv_termcap_lib=libc],
  304   [AC_CHECK_LIB([ncurses],[tgetent],[vte_cv_termcap_lib=libncurses],
  305     [AC_CHECK_LIB([tinfo],[tgetent],[vte_cv_termcap_lib=libtinfo],
  306       [AC_CHECK_LIB([curses],[tgetent],[vte_cv_termcap_lib=libcurses],
  307         [AC_CHECK_LIB([termcap],[tgetent],[vte_cv_termcap_lib=libtermcap],
  308           [vte_cv_termcap_lib=])])])])])
  309 
  310 case "$vte_cv_termcap_lib" in
  311   libc)       # FIXME: which headers to include here?
  312               ;;
  313   libncurses) # We need ncurses.h and term.h, or ncurses/curses.h and ncurses/term.h
  314               AC_CHECK_HEADERS([ncurses.h term.h],[],
  315                 [AC_CHECK_HEADERS([ncurses/curses.h ncurses/term.h],[],
  316                   [AC_MSG_ERROR([ncurses headers not found])])])
  317               LIBS="-lncurses $LIBS"
  318               ;;
  319   libtinfo)   # Need ncurses/curses.h and ncurses/term.h
  320               AC_CHECK_HEADERS([ncurses.h term.h],[],
  321                 [AC_CHECK_HEADERS([ncurses/curses.h ncurses/term.h],[],
  322                   [AC_MSG_ERROR([ncurses headers not found])])])
  323               LIBS="-ltinfo $LIBS"
  324               ;;
  325   libcurses)  # Need curses.h and term.h
  326               AC_CHECK_HEADERS([curses.h term.h],[],
  327                 [AC_MSG_ERROR([curses headers not found])],
  328                 [[#ifdef HAVE_CURSES_H
  329                   #include <curses.h>
  330                   #endif]])
  331               LIBS="-lcurses $LIBS"
  332               ;;
  333   libtermcap) # Need termcap.h
  334               AC_CHECK_HEADERS([termcap.h],[],
  335                 [AC_MSG_ERROR([termcap headers not found])])
  336               LIBS="-ltermcap $LIBS"
  337               ;;
  338   *)          AC_MSG_ERROR([tgetent not found in any library]) ;;
  339 esac
  340 
  341 # Search for the required modules.
  342 
  343 # We have a direct dependency on X11 on gdk-x11, see bug #613525
  344 AC_MSG_CHECKING([for GDK target])
  345 GDK_TARGET="$($PKG_CONFIG --variable target gdk-2.0)"
  346 AC_MSG_RESULT([$GDK_TARGET])
  347 case "$GDK_TARGET" in
  348   x11) PLATFORM_PKGS="x11 cairo-xlib" ;;
  349   *) PLATFORM_PKGS="" ;;
  350 esac
  351 
  352 VTE_PKGS="glib-2.0 >= $GLIB_REQUIRED gobject-2.0 pango >= $PANGO_REQUIRED gtk+-2.0 >= $GTK_REQUIRED gobject-2.0 gio-2.0 gio-unix-2.0 $PLATFORM_PKGS"
  353 PKG_CHECK_MODULES([VTE],[$VTE_PKGS])
  354 AC_SUBST([VTE_PKGS])
  355 
  356 wcs_funcs_includes="
  357 #ifdef HAVE_STRING_H
  358 # if !STDC_HEADERS && HAVE_MEMORY_H
  359 #  include <memory.h>
  360 # endif
  361 # include <string.h>
  362 #else
  363 # ifdef HAVE_STRINGS_H
  364 #  include <strings.h>
  365 # endif
  366 #endif
  367 #ifdef HAVE_WCHAR_H
  368 # include <wchar.h>
  369 #endif
  370 "
  371 
  372 AC_CHECK_TYPES(wint_t, AC_DEFINE(HAVE_WINT_T, , [Defined when the wint_t type is supported]), ,$wcs_funcs_includes)
  373 
  374 
  375 ########
  376 
  377 AC_OUTPUT([
  378 genius.spec
  379 Makefile
  380 src/Makefile
  381 lib/Makefile
  382 lib/calculus/Makefile
  383 lib/combinatorics/Makefile
  384 lib/equation_solving/Makefile
  385 lib/functions/Makefile
  386 lib/linear_algebra/Makefile
  387 lib/misc/Makefile
  388 lib/sets/Makefile
  389 lib/number_theory/Makefile
  390 lib/statistics/Makefile
  391 lib/symbolic/Makefile
  392 lib/commutative_algebra/Makefile
  393 ve/Makefile
  394 vte/Makefile
  395 vte/src/Makefile
  396 vte/termcaps/Makefile
  397 gtkextra/Makefile
  398 examples/Makefile
  399 pixmaps/Makefile
  400 pixmaps/8x8/Makefile
  401 pixmaps/16x16/Makefile
  402 pixmaps/22x22/Makefile
  403 pixmaps/24x24/Makefile
  404 pixmaps/32x32/Makefile
  405 pixmaps/48x48/Makefile
  406 pixmaps/256x256/Makefile
  407 pixmaps/scalable/Makefile
  408 po/Makefile.in
  409 help/Makefile
  410 ])
  411 
  412 echo "
  413 Configuration:
  414 
  415 	Source code location:	     ${srcdir}
  416 	Compiler:		     ${CC} 
  417 	GNOME frontend:		     ${use_gnome}
  418 	Using GtkSourceView:	     ${use_gtksourceview}
  419 "