configure.ac
author J. Ali Harlow <ali@juiblex.co.uk>
Fri May 20 11:20:22 2016 +0100 (2016-05-20)
changeset 18 30dd8888a271
parent 16 579831f324c7
child 20 07699c96ba7b
permissions -rw-r--r--
catalog subsystem should cope with being called with different lua states

whelk 0.3.2 was assuming that lua state would always be the same. If it
wasn't then there would be no cat admin metatable registered in the second
lua state but whelk would just assume that there was causing things to go
wrong. We now use luaL_newmetatable() to test for whether a metatable was
already registered and take the appropriate actions if it wasn't.
     1 #                                               -*- Autoconf -*-
     2 # Process this file with autoconf to produce a configure script.
     3 
     4 AC_INIT([whelk],[0.3.3],[ali@juiblex.co.uk])
     5 AC_PREREQ(2.59)
     6 AC_CONFIG_AUX_DIR([config])
     7 AC_CONFIG_SRCDIR([whelk/whelk.c])
     8 AC_CONFIG_HEADER([config.h])
     9 AC_CONFIG_FILES([Makefile
    10 whelk.pc
    11 whelk/Makefile
    12 ])
    13 AM_INIT_AUTOMAKE(no-define)
    14 AC_CANONICAL_HOST
    15 case $host_os in
    16     mingw*)
    17         host_mingw="yes"
    18         ;;
    19     *)
    20         host_mingw=""
    21         ;;
    22 esac
    23 AM_CONDITIONAL(WHELK_MINGW,[test -n "$host_mingw"])
    24 
    25 # libtool versioning - this applies to all libraries in this package
    26 #
    27 # See http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91 for details
    28 #
    29 LT_CURRENT=2
    30 LT_REVISION=1
    31 LT_AGE=2
    32 AC_SUBST(LT_CURRENT)
    33 AC_SUBST(LT_REVISION)
    34 AC_SUBST(LT_AGE)
    35 
    36 ##################################################
    37 # Checks for programs.
    38 ##################################################
    39 AC_PROG_CC
    40 AC_LIBTOOL_WIN32_DLL
    41 AC_PROG_LIBTOOL
    42 PKG_PROG_PKG_CONFIG
    43 
    44 ##################################################
    45 # Checks for header files.
    46 ##################################################
    47 AC_HEADER_STDC
    48 case $host_os in
    49     mingw*)
    50 	AC_CHECK_HEADERS([softpub.h],[],[],
    51 	  [#include <windows.h>
    52 	  ])
    53 	AC_CHECK_HEADERS([mscat.h],[],[],
    54 	  [#include <windows.h>
    55 	  ])
    56 	;;
    57 esac
    58 
    59 ##################################################
    60 # Checks for typedefs, structures, and compiler characteristics.
    61 ##################################################
    62 
    63 ##################################################
    64 # Checks for libraries.
    65 ##################################################
    66 case $host_os in
    67     mingw*)
    68 	EXTRA_LIBS="-lole32 -lsetupapi"
    69 	EXTRA_BUILD_LIBS="-Wl,-luuid"
    70 	EXTRA_PRIVATE_LIBS="-luuid"
    71         ;;
    72     *)
    73 	EXTRA_LIBS=""
    74 	EXTRA_BUILD_LIBS=""
    75 	EXTRA_PRIVATE_LIBS=""
    76         ;;
    77 esac
    78 AC_SUBST(EXTRA_LIBS)
    79 AC_SUBST(EXTRA_BUILD_LIBS)
    80 AC_SUBST(EXTRA_PRIVATE_LIBS)
    81 PKG_CHECK_MODULES(LUA,[lua])
    82 lua_binary_version=`$PKG_CONFIG --variable V lua`
    83 AC_SUBST([LUA_BINARY_VERSION],[$lua_binary_version])
    84 
    85 ##################################################
    86 # Checks for library functions.
    87 ##################################################
    88 case $host_os in
    89     mingw*)
    90 	save_libs="$LIBS"
    91 	LIBS="-lsetupapi $LIBS"
    92 	AC_CHECK_FUNCS_ONCE([SetupUninstallOEMInfW])
    93 	LIBS="$save_libs"
    94 	;;
    95 esac
    96 
    97 ##################################################
    98 # Checks for processor independent files.
    99 ##################################################
   100 
   101 ##################################################
   102 # Generate the various configured files
   103 ##################################################
   104 AC_OUTPUT