"Fossies" - the Fresh Open Source Software Archive

Member "Celestia-1.6.2.2/configure.ac" (12 Jan 2021, 15059 Bytes) of package /linux/misc/Celestia-1.6.2.2.tar.gz:


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.6.2.1_vs_1.6.2.2.

    1 dnl
    2 dnl Celestia autoconf file
    3 dnl Process this file with autoconf to make a configure script
    4 dnl
    5 
    6 AC_PREREQ(2.57)
    7 AC_INIT([celestia], [1.6.2], [https://github.com/CelestiaProject/Celestia])
    8 AC_CONFIG_SRCDIR(acinclude.m4)
    9 AC_CONFIG_MACRO_DIRS([macros])
   10 
   11 dnl The following section confirms that the user provided necessary option
   12 dnl BEFORE anything is checked.
   13 
   14 AC_ARG_WITH([glut],
   15             AC_HELP_STRING([--with-glut], [Use Glut for the UI]),
   16             ui_glut="yes"; ui_gtk="no"; ui_gnome="no"; ui_kde="no",
   17             ui_glut="no")
   18 
   19 AC_ARG_WITH([gtk],
   20             AC_HELP_STRING([--with-gtk], [Use Gtk for an enhanced GUI]),
   21 	        ui_gtk="yes"; ui_glut="no"; ui_gnome="no"; ui_kde="no",
   22             ui_gtk="no")
   23 
   24 AC_ARG_WITH([gnome],
   25             AC_HELP_STRING([--with-gnome], [Use Gnome for an enhanced GUI]),
   26             ui_gnome="yes"; ui_gtk="yes"; ui_glut="no"; ui_kde="no",
   27             ui_gnome="no")
   28 
   29 AC_ARG_WITH([kde],
   30             AC_HELP_STRING([--with-kde], [Use KDE for an enhanced GUI]),
   31             ui_kde="yes"; ui_glut="no"; ui_gtk="no"; ui_gnome="no",
   32             ui_kde="no")
   33 
   34 dnl Following line left in: great for debugging.
   35 dnl AC_MSG_ERROR([$ui_glut $ui_gtk $ui_gnome $ui_kde])
   36 
   37 dnl Check that an interface was provided
   38 if (test "$ui_glut" != "yes" -a "$ui_gtk" != "yes" -a "$ui_gnome" != "yes" -a "$ui_kde" != "yes"); then
   39 	AC_MSG_ERROR([You must select an interface to build.
   40                   Possible options are:
   41                     --with-glut      GLUT front-end
   42                     --with-gtk       Enhanced GTK GUI
   43                     --with-gnome     GTK GUI with Gnome features
   44                     --with-kde       Enhanced KDE GUI]);
   45 fi
   46 
   47 AC_ARG_ENABLE([cairo],
   48               AC_HELP_STRING([--enable-cairo],
   49                              [use cairo for GTK splash screen]),
   50               enable_cairo="$enableval", enable_cairo="auto")
   51 
   52 AC_ARG_ENABLE([theora],
   53               AC_HELP_STRING([--enable-theora],
   54                              [create Ogg/Theora video]),
   55               enable_theora="$enableval", enable_theora="auto")
   56 
   57 
   58 dnl For KDE interface
   59 AC_CONFIG_AUX_DIR(admin)
   60 
   61 dnl "admin/acinclude.m4.in" generates "acinclude.m4", which has a broken
   62 dnl conditional define for Qt embedded. This does not apply to Celestia
   63 dnl anyway.
   64 include_x11_FALSE='#'
   65 
   66 dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
   67 unset CDPATH
   68 
   69 dnl Check system type
   70 AC_CANONICAL_HOST
   71 dnl Checking host/target/build systems, for make, install etc.
   72 AC_CANONICAL_SYSTEM
   73 dnl Perform program name transformation
   74 AC_ARG_PROGRAM
   75 
   76 AM_INIT_AUTOMAKE([-Wno-portability subdir-objects])
   77 AM_CONFIG_HEADER(config.h)
   78 
   79 AM_PO_SUBDIRS
   80 dnl Specifying the AM_GNU_GETTEXT_VERSION macro causes autopoint to run,
   81 dnl replacing many files from the KDE project in the admin/ directory. We
   82 dnl will leave it out for now.
   83 dnl AM_GNU_GETTEXT_VERSION([0.15])
   84 AM_GNU_GETTEXT([external])
   85 
   86 dnl Checks for programs.
   87 AC_PROG_CC
   88 AC_PROG_CXX
   89 AC_PROG_CPP
   90 AC_PROG_CXXCPP
   91 AC_PROG_INSTALL
   92 AC_PROG_LIBTOOL
   93 
   94 dnl
   95 dnl Compilation options
   96 dnl
   97 
   98 CFLAGS="$CFLAGS -ffast-math -fexpensive-optimizations"
   99 CXXFLAGS="$CXXFLAGS -ffast-math -fexpensive-optimizations"
  100 
  101 AC_MSG_CHECKING([whether to include debugging code])
  102 AC_ARG_ENABLE([debug],
  103               AC_HELP_STRING([--enable-debug],
  104                              [Produce an executable with debugging symbols]), ,
  105               enable_debug="no")
  106 if (test "$enable_debug" = "yes"); then
  107 	CFLAGS="$CFLAGS -g -Wall";
  108 	CXXFLAGS="$CXXFLAGS -g -Wall"
  109 	AC_DEFINE(DEBUG, 1, [Are we debugging ?])
  110 fi
  111 AC_MSG_RESULT($enable_debug)
  112 
  113 AC_MSG_CHECKING([whether to be pedantic])
  114 AC_ARG_ENABLE([pedantic],
  115               AC_HELP_STRING([--enable-pedantic],
  116                              [Enable -pedantic when compiling]), ,
  117               enable_pedantic="no")
  118 if (test "$enable_pedantic" = "yes"); then
  119 	CFLAGS="$CFLAGS -ansi -pedantic";
  120 	CXXFLAGS="$CXXFLAGS -pedantic"
  121 fi
  122 AC_MSG_RESULT($enable_pedantic)
  123 
  124 AC_MSG_CHECKING([whether to do profiling])
  125 AC_ARG_ENABLE([profile],
  126               AC_HELP_STRING([--enable-profile],
  127                              [Produce a profiled executable[default=no]]), ,
  128               enable_profile="no")
  129 if (test "$enable_profile" = "yes"); then
  130 	CFLAGS="$CFLAGS -pg";
  131 	CXXFLAGS="$CXXFLAGS -pg"
  132 else
  133 	if (test "$enable_debug" != "yes"); then
  134 		dnl  must be set here instead of above because -pg and
  135 		dnl -fomit-frame-pointer are incompatible
  136 		CFLAGS="$CFLAGS -fomit-frame-pointer";
  137 		CXXFLAGS="$CXXFLAGS -fomit-frame-pointer"
  138 	fi
  139 fi
  140 AC_MSG_RESULT($enable_profile)
  141 
  142 
  143 dnl
  144 dnl GL and GLUT libs
  145 dnl
  146 
  147 AC_ARG_WITH([gl-libs],
  148             AC_HELP_STRING([--with-gl-libs=DIR],
  149                            [Specify OpenGL library location]),
  150             LIBS="$LIBS -L$withval")
  151 
  152 AC_ARG_WITH([gl-inc],
  153             AC_HELP_STRING([--with-gl-inc=DIR],
  154                            [Specify OpenGL header file location]),
  155             CXXFLAGS="$CXXFLAGS -I$withval")
  156 
  157 AC_ARG_WITH([glut-libs],
  158             AC_HELP_STRING([--with-glut-libs=DIR],
  159                            [Specify GLUT library location]),
  160             LIBS="$LIBS -L$withval")
  161 
  162 AC_ARG_WITH([glut-inc],
  163             AC_HELP_STRING([--with-glut-inc=DIR],
  164                            [Specify GLUT header file location]),
  165             CXXFLAGS="$CXXFLAGS -I$withval")
  166 
  167 
  168 dnl
  169 dnl SPICE lib
  170 dnl
  171 
  172 AC_ARG_WITH([cspice-dir],
  173             AC_HELP_STRING([--with-cspice-dir=DIR], [Specify SPICE directory location]),
  174             SPICE_CFLAGS="-I$withval/include -DUSE_SPICE";
  175             SPICE_LIBS="$withval/lib/cspice.a")
  176 
  177 AC_SUBST(SPICE_CFLAGS)
  178 AC_SUBST(SPICE_LIBS)
  179 AM_CONDITIONAL(ENABLE_SPICE, test "$SPICE_LIBS" != "")
  180 
  181 AC_MSG_CHECKING([whether to enable GLUT])
  182 if (test "$ui_glut" != "no"); then
  183 	AC_MSG_RESULT(yes)
  184 else
  185 	AC_MSG_RESULT(no)
  186 fi
  187 
  188 AC_MSG_CHECKING([whether to enable GTK])
  189 if (test "$ui_gtk" != "no"); then
  190 	AC_MSG_RESULT(yes)
  191 else
  192 	AC_MSG_RESULT(no)
  193 fi
  194 
  195 AC_MSG_CHECKING([whether to enable Gnome])
  196 if (test "$ui_gnome" != "no"); then
  197 	AC_MSG_RESULT(yes)
  198 else
  199 	AC_MSG_RESULT(no)
  200 fi
  201 
  202 AC_MSG_CHECKING([whether to enable KDE])
  203 if (test "$ui_kde" != "no"); then
  204 	AC_MSG_RESULT(yes)
  205 else
  206 	AC_MSG_RESULT(no)
  207 fi
  208 
  209 
  210 AC_CHECK_COMPILERS
  211 
  212 dnl (Copied from Pidgin's configure.ac)
  213 dnl FreeBSD doesn't have libdl, dlopen is provided by libc
  214 AC_CHECK_FUNC(dlopen, DL_LIBS="", [AC_CHECK_LIB(dl, dlopen, DL_LIBS="-ldl")])
  215 AC_SUBST(DL_LIBS)
  216 
  217 dnl Check for zlib -- libGL requires it.
  218 AC_CHECK_LIB(z, deflate, ,
  219              [AC_MSG_ERROR([zlib not found.])])
  220 
  221 dnl Check for OpenGL headers first.
  222 AC_CHECK_HEADERS(GL/gl.h, ,
  223                  [AC_MSG_ERROR([No gl.h found. See INSTALL file for help.])])
  224 
  225 dnl Check for OpenGL. Taken partly from the plib sources.
  226 AC_CHECK_LIB(GL, glNewList, GL_LIBS="-lGL")
  227 AC_SUBST(GL_LIBS)
  228 
  229 if (test "x$ac_cv_lib_GL_glNewList" = "xno"); then
  230 	dnl Check for MesaGL.
  231 	AC_CHECK_LIB(MesaGL, glNewList, ,
  232 	             [AC_MSG_ERROR([GL library was not found])])
  233 fi
  234 
  235 dnl Check for GLU headers.
  236 AC_CHECK_HEADERS(GL/glu.h, ,
  237                  [AC_MSG_ERROR([No glu.h found. See INSTALL file for help.])])
  238 AC_CHECK_LIB(GLU, gluLookAt)
  239 
  240 if (test "x$ac_cv_lib_GLU_gluLookAt" = "xno"); then
  241 	dnl Check for MesaGLU.
  242 	AC_CHECK_LIB(MesaGLU, gluLookAt, ,
  243 	             [AC_MSG_ERROR([GLU library was not found])])
  244 fi
  245 
  246 PKG_PROG_PKG_CONFIG
  247 
  248 if (test "$ui_glut" = "yes"); then
  249 	dnl Check for GLUT headers first.
  250 	AC_CHECK_HEADERS(GL/glut.h, ,
  251 	                 [AC_MSG_ERROR([No glut.h found. See INSTALL file for help.])])
  252 
  253 	dnl Check for GLUT.
  254 	AC_CHECK_LIB(glut, glutKeyboardUpFunc, ,
  255 	             [AC_MSG_ERROR([GLUT library version >= 3.7 not found])])
  256 fi
  257 AM_CONDITIONAL(ENABLE_GLUT, test "$ui_glut" = "yes")
  258 
  259 dnl Default GConf to FALSE
  260 dnl (this is a silly trick to make configure behave)
  261 AM_CONDITIONAL(GCONF_SCHEMAS_INSTALL, test "x" = "y")
  262 
  263 if (test "$ui_gtk" != "no"); then
  264 	dnl GNOME is an extension to the GTK options
  265 	if (test "$ui_gnome" = "yes"); then
  266 		PKG_CHECK_MODULES(GTK, libgnomeui-2.0 gtk+-2.0 >= 2.6 gtkglext-1.0)
  267 		AM_GCONF_SOURCE_2
  268 		AC_DEFINE(GNOME, 1, [Use Gnome Flag])
  269 	else
  270 		dnl Otherwise, vanilla GTK
  271 		PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6 gtkglext-1.0)
  272 	fi
  273 
  274 	dnl Check for cairo. Default to trying yes. Want this structure to not
  275 	dnl fail when not found if not explicitly enabled.
  276 	if (test "x$enable_cairo" != "xno"); then
  277 		PKG_CHECK_MODULES(CAIRO, cairo, enable_cairo="yes",
  278 		                  if (test "x$enable_cairo" = "xauto"); then
  279 		                      enable_cairo="no"
  280 		                  else
  281 		                      AC_ERROR([Cairo not found (explicitly enabled)!])
  282 		                  fi)
  283 	fi
  284 
  285         check_theora="yes"
  286 
  287 	if (test "x$enable_cairo" = "xyes"); then
  288 		AC_DEFINE(CAIRO, 1, [Use Cairo for Splash])
  289 	fi
  290 fi
  291 
  292 dnl If all the GTK tests succeeded, safe to enable GTK
  293 AM_CONDITIONAL(ENABLE_GTK, test "$ui_gtk" = "yes")
  294 AM_CONDITIONAL(ENABLE_GNOME, test "$ui_gnome" = "yes")
  295 
  296 
  297 dnl
  298 dnl KDE
  299 dnl
  300 
  301 dnl Make certain ARTS is not conditionally defined, like GConf for Gnome
  302 AM_CONDITIONAL(include_ARTS, test "x" = "y")
  303 
  304 if (test "$ui_kde" != "no"); then
  305 	dnl KDE_SET_PREFIX
  306 	AC_ENABLE_SHARED(yes)
  307 	AC_ENABLE_STATIC(no)
  308 
  309 	KDE_PROG_LIBTOOL
  310 	AM_KDE_WITH_NLS
  311 
  312 	dnl KDE_USE_QT(3)
  313 	AC_PATH_KDE
  314 
  315         check_theora="yes"
  316 fi
  317 AM_CONDITIONAL(ENABLE_KDE, test "$ui_kde" = "yes")
  318 
  319 if (test "$check_theora" = "yes"); then
  320 	dnl Check for theora. Default to trying yes. Want this structure to not
  321 	dnl fail when not found if not explicitly enabled.
  322 	if (test "x$enable_theora" != "xno"); then
  323 		PKG_CHECK_MODULES(THEORA, theora, enable_theora="yes",
  324 		                  if (test "x$enable_theora" = "xauto"); then
  325 		                      enable_theora="no"
  326 		                  else
  327 		                      AC_ERROR([Theora not found (explicitly enabled)!])
  328 		                  fi)
  329 	fi
  330 
  331 	if (test "x$enable_theora" = "xyes"); then
  332 		AC_DEFINE(THEORA, 1, [Use OGG Theora for video])
  333 	fi
  334 fi
  335 AM_CONDITIONAL(ENABLE_THEORA, test "$enable_theora" = "yes")
  336 
  337 dnl Check for JPEG library.
  338 AC_CHECK_LIB(jpeg, jpeg_start_decompress, ,
  339              [AC_MSG_ERROR([jpeg library not found])])
  340 
  341 
  342 dnl Check for PNG library.
  343 AC_CHECK_LIB(png, png_create_info_struct,,
  344              [AC_MSG_ERROR([png library not found])])
  345 
  346 
  347 dnl Checks for header files.
  348 
  349 AC_HEADER_STDC
  350 AC_CHECK_HEADERS(byteswap.h)
  351 AC_C_BIGENDIAN
  352 
  353 dnl Establish the main data directory (defined in Makefiles)
  354 PKGDATADIR='${datadir}'/$PACKAGE
  355 AC_SUBST(PKGDATADIR)
  356 
  357 enable_hipparcos="no"
  358 AC_ARG_ENABLE([hipparcos-dir],
  359               AC_HELP_STRING([--enable-hipparcos-dir=DIR],
  360                              [Specify location of HIPPARCOS/TYCHO stardata]),
  361               HIPDIR="$enableval",HIPDIR="$PKGDATADIR")
  362 AC_SUBST(HIPDIR)
  363 AC_MSG_CHECKING([whether we can create a new star database])
  364 if (test -f "$HIPDIR/hip_main.dat"); then
  365 	enable_hipparcos="yes"
  366 fi
  367 AC_MSG_RESULT($enable_hipparcos)
  368 AM_CONDITIONAL(ENABLE_HIPPARCOS, test "x$enable_hipparcos" = "xyes")
  369 
  370 
  371 AC_ARG_WITH([lua],
  372             AC_HELP_STRING([--with-lua],
  373                            [Use Lua for Celestia Extension Language support]),
  374             enable_lua="$withval",
  375             enable_lua="auto")
  376 
  377 if (test "$enable_lua" != "no"); then
  378 	LUA_VER=0
  379 	PKG_CHECK_MODULES(LUA, lua5.3 >= 5.3.0, LUA_VER=0x050300, [
  380 	PKG_CHECK_MODULES(LUA, lua >= 5.3.0, LUA_VER=0x050300, [
  381 	PKG_CHECK_MODULES(LUA, lua5.2 >= 5.2.0, LUA_VER=0x050200, [
  382 	PKG_CHECK_MODULES(LUA, lua >= 5.2.0, LUA_VER=0x050200, [
  383 	PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1.0, LUA_VER=0x050100, [
  384 	PKG_CHECK_MODULES(LUA, lua >= 5.1.0, LUA_VER=0x050100, AC_MSG_RESULT([no])) ]
  385 	) ] ) ] ) ] ) ] )
  386 	if (test "$LUA_VER" = "0"); then
  387 		if (test "x$enable_lua" != "xauto"); then
  388 			AC_ERROR([Lua not found (explicitly enabled)!])
  389 		else
  390 			enable_lua="no"
  391 		fi
  392 	else
  393 		enable_lua="yes"
  394 	fi
  395 fi
  396 
  397 if (test "$enable_lua" = "yes"); then
  398 	LUA_CFLAGS="$LUA_CFLAGS $LUALIB_CFLAGS -DLUA_VER=$LUA_VER -DCELX"
  399 fi
  400 
  401 AM_CONDITIONAL(ENABLE_CELX, test "$enable_lua" != "no")
  402 
  403 
  404 AC_CONFIG_FILES([ Makefile ])
  405 AC_CONFIG_FILES([ src/Makefile ])
  406 AC_CONFIG_FILES([ src/celutil/Makefile ])
  407 AC_CONFIG_FILES([ src/celmath/Makefile ])
  408 AC_CONFIG_FILES([ src/cel3ds/Makefile ])
  409 AC_CONFIG_FILES([ src/celtxf/Makefile ])
  410 AC_CONFIG_FILES([ src/celengine/Makefile ])
  411 AC_CONFIG_FILES([ src/celestia/Makefile ])
  412 AC_CONFIG_FILES([ data/Makefile ])
  413 AC_CONFIG_FILES([ extras/Makefile ])
  414 AC_CONFIG_FILES([ extras-standard/Makefile ])
  415 AC_CONFIG_FILES([ extras-standard/cassini/Makefile ])
  416 AC_CONFIG_FILES([ extras-standard/cassini/models/Makefile ])
  417 AC_CONFIG_FILES([ extras-standard/cassini/data/Makefile ])
  418 AC_CONFIG_FILES([ extras-standard/mir/Makefile ])
  419 AC_CONFIG_FILES([ extras-standard/mir/models/Makefile ])
  420 AC_CONFIG_FILES([ extras-standard/galileo/Makefile ])
  421 AC_CONFIG_FILES([ extras-standard/galileo/models/Makefile ])
  422 AC_CONFIG_FILES([ extras-standard/galileo/data/Makefile ])
  423 AC_CONFIG_FILES([ extras-standard/hubble/Makefile ])
  424 AC_CONFIG_FILES([ extras-standard/hubble/models/Makefile ])
  425 AC_CONFIG_FILES([ extras-standard/iss/Makefile ])
  426 AC_CONFIG_FILES([ extras-standard/iss/models/Makefile ])
  427 AC_CONFIG_FILES([ extras-standard/iss/textures/Makefile ])
  428 AC_CONFIG_FILES([ extras-standard/iss/textures/medres/Makefile ])
  429 AC_CONFIG_FILES([ textures/Makefile ])
  430 AC_CONFIG_FILES([ textures/lores/Makefile ])
  431 AC_CONFIG_FILES([ textures/medres/Makefile ])
  432 AC_CONFIG_FILES([ textures/hires/Makefile ])
  433 AC_CONFIG_FILES([ models/Makefile ])
  434 AC_CONFIG_FILES([ shaders/Makefile ])
  435 AC_CONFIG_FILES([ fonts/Makefile ])
  436 AC_CONFIG_FILES([ src/celestia/res/Makefile ])
  437 AC_CONFIG_FILES([ src/celestia/kde/Makefile ])
  438 AC_CONFIG_FILES([ src/celestia/kde/data/Makefile ])
  439 AC_CONFIG_FILES([ src/celestia/kde/doc/Makefile ])
  440 AC_CONFIG_FILES([ src/celestia/kde/doc/celestia/Makefile ])
  441 AC_CONFIG_FILES([ src/celestia/gtk/Makefile ])
  442 AC_CONFIG_FILES([ src/celestia/gtk/data/Makefile ])
  443 AC_CONFIG_FILES([ po/Makefile.in ])
  444 AC_CONFIG_FILES([ po2/Makefile.in ])
  445 AC_CONFIG_FILES([ locale/Makefile ])
  446 AC_CONFIG_FILES([ scripts/Makefile ])
  447 AC_OUTPUT()
  448 
  449 AC_MSG_RESULT()
  450 AC_MSG_RESULT()
  451 AC_MSG_RESULT(***************************************************************)
  452 AC_MSG_RESULT(** Celestia configuration complete. Now do a 'make' followed **)
  453 AC_MSG_RESULT(** by 'make install'                                         **)
  454 AC_MSG_RESULT(***************************************************************)
  455 AC_MSG_RESULT()
  456 
  457 if (test "$ui_glut" = "yes"); then
  458 	AC_MSG_RESULT([Front-End: GLUT]);
  459 fi
  460 
  461 if (test "$ui_gtk" = "yes" -a "$ui_gnome" = "no"); then
  462 	AC_MSG_RESULT([Front-End: GTK]);
  463 fi
  464 
  465 if (test "$ui_gnome" = "yes"); then
  466 	AC_MSG_RESULT([Front-End: Gnome]);
  467 fi
  468 
  469 if (test "$ui_kde" = "yes"); then
  470 	AC_MSG_RESULT([Front-End: KDE]);
  471 fi
  472 
  473 if (test "$ui_gtk" = "yes" -o "$ui_gnome" = "yes"); then
  474 	AC_MSG_RESULT([Use Cairo: $enable_cairo]);
  475 fi
  476 
  477 AC_MSG_RESULT([Use Lua: $enable_lua]);
  478 
  479 if (test "$LUA_VER" = "0x050000"); then
  480 	AC_MSG_RESULT([    Warning: Lua 5.1 is not available on your system, Lua 5.0 will be used
  481     instead but it may not be fully compatible with existing CELX scripts.
  482     It is recommanded that you install Lua 5.0 and rerun configure.]);
  483 fi
  484 
  485 AC_MSG_RESULT([Use Theora: $enable_theora]);
  486 
  487 AC_MSG_RESULT()