Changeset 1015

Show
Ignore:
Timestamp:
03/14/08 18:12:13 (9 months ago)
Author:
alonbl
Message:

New build system

Location:
branches/alonbl/build
Files:
8 added
7 removed
35 modified

Legend:

Unmodified
Added
Removed
  • branches/alonbl/build

    • Property svn:ignore
      •  

        old new  
         1Makefile 
         2Makefile.in 
         3core 
         4archive 
         5acinclude.m4 
         6aclocal.m4 
         7autom4te.cache 
         8compile 
         9confdefs.h 
         10config.* 
         11configure 
         12conftest 
         13conftest.c 
         14depcomp 
         15install-sh 
         16libtool 
         17libtool.m4 
         18ltmain.sh 
         19missing 
         20mkinstalldirs 
         21so_locations 
         22stamp-h* 
         23 
        124.deps 
        225.libs 
         
        1942*.rej 
        2043*.u 
         44*.rc 
         45*.pc 
        2146*~ 
        22 Makefile 
        23 Makefile.in 
        24 core 
        25 gmon.out 
        26 archive 
        27 acinclude.m4 
        28 aclocal.m4 
        29 autom4te.cache 
        30 compile 
        31 confdefs.h 
        32 config.cache 
        33 config.guess 
        34 config.h 
        35 config.h.in 
        36 config.log 
        37 config.status 
        38 config.sub 
        39 configure 
        40 conftest 
        41 conftest.c 
        42 depcomp 
        43 install-sh 
        44 libtool 
        45 libtool.m4 
        46 ltmain.sh 
        47 missing 
        48 mkinstalldirs 
        49 so_locations 
        50 stamp-h* 
         47*.gz 
         48*.bz2 
         49*.[0-9] 
         50*.html 
         51*.gif 
         52*.css 
         53*.out 
         54*.loT 
         55 
         56ChangeLog 
         57doxygen.conf 
         58reader.conf 
         59openct_serial 
         60openct.hald 
         61openct_usb 
         62openct_pcmcia 
         63init-script 
         64openct.conf 
         65types.h 
         66ifdhandler 
         67ifdproxy 
         68openct-tool 
         69openct-control 
  • branches/alonbl/build/Makefile.am

    r806 r1015  
    11# Process this file with automake to create Makefile.in 
     2# 
     3AUTOMAKE_OPTIONS = foreign 1.10 
     4ACLOCAL_AMFLAGS = -I aclocal 
    25 
    3 SUBDIRS = . aclocal etc macos src  
    4 DIST_SUBDIRS = . aclocal doc etc macos src  
     6MAINTAINERCLEANFILES = \ 
     7        Makefile.in config.h.in config.h.in~ configure \ 
     8        install-sh ltmain.sh missing mkinstalldirs \ 
     9        compile depcomp config.log config.status \ 
     10        config.guess config.sub acinclude.m4 aclocal.m4 
    511 
    6 EXTRA_DIST = LGPL-2.1 NEWS TODO bootstrap depcomp \ 
     12DEPCLEANFILES = config.log configure 
     13 
     14SUBDIRS = aclocal etc macos src doc 
     15 
     16doc_DATA = NEWS 
     17 
     18dist_noinst_DATA = LGPL-2.1 NEWS TODO bootstrap depcomp \ 
    719        solaris/Makefile.client solaris/Makefile.server solaris/README \ 
    820        solaris/checkinstall.in solaris/devices-openct-fabric.xml-dist \ 
     
    1123        solaris/preremove solaris/proto 
    1224 
    13 MAINTAINERCLEANFILES = \ 
    14         Makefile.in config.h.in configure \ 
    15         install-sh ltmain.sh missing mkinstalldirs \ 
    16         compile depcomp config.log config.status \ 
    17         config.guess config.sub acinclude.m4 aclocal.m4 
    18  
    19 DEPCLEANFILES = config.log configure 
    20  
    21 AUTOMAKE_OPTIONS = foreign 1.5 
    22 ACLOCAL_AMFLAGS = -I aclocal 
  • branches/alonbl/build/aclocal

    • Property svn:ignore
      •  

        old new  
         1Makefile 
         2Makefile.in 
         3core 
         4archive 
         5acinclude.m4 
         6aclocal.m4 
         7autom4te.cache 
         8compile 
         9confdefs.h 
         10config.* 
         11configure 
         12conftest 
         13conftest.c 
         14depcomp 
         15install-sh 
         16libtool 
         17libtool.m4 
         18ltmain.sh 
         19missing 
         20mkinstalldirs 
         21so_locations 
         22stamp-h* 
         23 
        124.deps 
        225.libs 
         
        1942*.rej 
        2043*.u 
         44*.rc 
         45*.pc 
        2146*~ 
        22 Makefile 
        23 Makefile.in 
        24 core 
        25 gmon.out 
         47*.gz 
         48*.bz2 
         49*.[0-9] 
         50*.html 
         51*.gif 
         52*.css 
         53*.out 
         54*.loT 
         55 
         56ChangeLog 
         57doxygen.conf 
         58reader.conf 
         59openct_serial 
         60openct.hald 
         61openct_usb 
         62openct_pcmcia 
         63init-script 
         64openct.conf 
         65types.h 
         66ifdhandler 
         67ifdproxy 
         68openct-tool 
         69openct-control 
  • branches/alonbl/build/aclocal/Makefile.am

    r769 r1015  
    1 # Process this file with automake to create Makefile.in 
    2  
    31MAINTAINERCLEANFILES = Makefile.in 
    42 
    5 EXTRA_DIST = ac_compile_check_sizeof.m4 ac_create_stdint_h.m4 \ 
    6         acx_pthread.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 pkg.m4 
     3dist_noinst_DATA = ac_create_stdint_h.m4 \ 
     4        acx_pthread.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 
  • branches/alonbl/build/aclocal/ac_create_stdint_h.m4

    r359 r1015  
    1616dnl int_least32_t.. int_fast32_t.. intmax_t 
    1717dnl which may or may not rely on the definitions of other files, 
    18 dnl or using the AC_COMPILE_CHECK_SIZEOF macro to determine the actual 
     18dnl or using the AC_CHECK_SIZEOF macro to determine the actual 
    1919dnl sizeof each type. 
    2020dnl 
     
    9090 
    9191if test "$ac_cv_header_stdint_x" = "no-file" ; then 
    92    AC_COMPILE_CHECK_SIZEOF(char) 
    93    AC_COMPILE_CHECK_SIZEOF(short) 
    94    AC_COMPILE_CHECK_SIZEOF(int) 
    95    AC_COMPILE_CHECK_SIZEOF(long) 
    96    AC_COMPILE_CHECK_SIZEOF(void*) 
     92   AC_CHECK_SIZEOF(char) 
     93   AC_CHECK_SIZEOF(short) 
     94   AC_CHECK_SIZEOF(int) 
     95   AC_CHECK_SIZEOF(long) 
     96   AC_CHECK_SIZEOF(void*) 
    9797   ac_cv_header_stdint_test="yes" 
    9898else 
  • branches/alonbl/build/configure.ac

    r1011 r1015  
    11dnl -*- mode: m4; -*- 
    2 dnl Process this file with autoconf to produce a configure script. 
    3  
    4 # Require autoconf 2.52 
    5 AC_PREREQ(2.52) 
    6 AC_INIT([openct], [0.6.14-svn]) 
    7 AM_INIT_AUTOMAKE 
    8 AM_CONFIG_HEADER(config.h) 
    9  
    10 AC_CONFIG_SRCDIR(src/ifd/ifdhandler.c) 
     2 
     3AC_PREREQ([2.60]) 
     4 
     5define([PACKAGE_VERSION_MAJOR], [0]) 
     6define([PACKAGE_VERSION_MINOR], [6]) 
     7define([PACKAGE_VERSION_FIX], [14]) 
     8 
     9AC_INIT([openct], [PACKAGE_VERSION_MAJOR.PACKAGE_VERSION_MINOR.PACKAGE_VERSION_FIX-svn]) 
     10AC_CONFIG_AUX_DIR([.]) 
     11AM_CONFIG_HEADER([config.h]) 
     12AM_INIT_AUTOMAKE([${PACKAGE_NAME}], [${PACKAGE_VERSION}]) 
     13 
     14OPENCT_VERSION_MAJOR="PACKAGE_VERSION_MAJOR" 
     15OPENCT_VERSION_MINOR="PACKAGE_VERSION_MINOR" 
     16OPENCT_VERSION_FIX="PACKAGE_VERSION_FIX" 
    1117 
    1218# LT Version numbers, remember to change them just *before* a release. 
     
    1521#   (Interfaces added:                  AGE++) 
    1622#   (Interfaces removed:                AGE=0) 
    17 OPENCT_LT_CURRENT=1 
    18 OPENCT_LT_REVISION=0 
    19 OPENCT_LT_AGE=0 
    20  
    21 AC_SUBST(OPENCT_LT_CURRENT) 
    22 AC_SUBST(OPENCT_LT_REVISION) 
    23 AC_SUBST(OPENCT_LT_AGE) 
     23OPENCT_LT_CURRENT="1" 
     24OPENCT_LT_REVISION="0" 
     25OPENCT_LT_AGE="0" 
     26 
     27AC_CONFIG_SRCDIR(src/ifd/ifdhandler.c) 
    2428 
    2529AC_CANONICAL_HOST 
    2630AC_PROG_CC 
     31PKG_PROG_PKG_CONFIG 
    2732AC_C_BIGENDIAN 
    2833 
     34AC_MSG_CHECKING([svn checkout]) 
     35if test -e packaged; then 
     36        svn_checkout="no" 
     37else 
     38        svn_checkout="yes" 
     39fi 
     40AC_MSG_RESULT([${svn_checkout}]) 
     41 
    2942dnl Check for some target-specific stuff 
    30 case "$host" in 
    31 *-*-hpux*) 
    32         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE_EXTENDED" 
     43case "${host}" in 
     44        *-*-hpux*) 
     45                CPPFLAGS="${CPPFLAGS} -D_HPUX_SOURCE -D_XOPEN_SOURCE_EXTENDED" 
    3346        ;; 
    34 *-*-solaris*) 
    35         CPPFLAGS="$CPPFLAGS -I/usr/sfw/include -I/usr/local/include" 
    36         LDFLAGS="$LDFLAGS -L/usr/sfw/lib -R/usr/sfw/lib -L/usr/local/lib -R/usr/local/lib" 
    37         need_dash_r=1 
     47        *-*-solaris*) 
     48                CPPFLAGS="${CPPFLAGS} -I/usr/local/include" 
     49                LDFLAGS="${LDFLAGS} -L/usr/local/lib -R/usr/local/lib" 
     50                need_dash_r="1" 
    3851        ;; 
    39 *-*-sunos4*) 
    40         CPPFLAGS="$CPPFLAGS -DSUNOS4" 
     52        *-*-sunos4*) 
     53                CPPFLAGS="${CPPFLAGS} -DSUNOS4" 
    4154        ;; 
    42 *-*-aix*) 
    43         CPPFLAGS="$CPPFLAGS -I/usr/local/include" 
    44         LDFLAGS="$LDFLAGS -L/usr/local/lib" 
    45         if (test "$LD" != "gcc" && test -z "$blibpath"); then 
    46                 blibpath="/usr/lib:/lib:/usr/local/lib" 
    47         fi 
     55        *-*-aix*) 
     56                CPPFLAGS="${CPPFLAGS} -I/usr/local/include" 
     57                LDFLAGS="${LDFLAGS} -L/usr/local/lib" 
     58                if test "${LD}" != "gcc" -a -z "${blibpath}"; then 
     59                        blibpath="/usr/lib:/lib:/usr/local/lib" 
     60                fi 
    4861        ;; 
    49 *-*-osf*) 
    50         CPPFLAGS="$CPPFLAGS -D_POSIX_PII_SOCKET" 
     62        *-*-osf*) 
     63                CPPFLAGS="${CPPFLAGS} -D_POSIX_PII_SOCKET" 
    5164        ;; 
    52 *-*-linux*) 
    53         ;; 
    54 *-*-darwin*) 
    55         LIBS="$LIBS -Wl,-framework,CoreFoundation" 
    56         if test "$GCC" = "yes"; then 
    57                 CFLAGS="$CFLAGS -no-cpp-precomp" 
    58         fi 
     65        *-*-darwin*) 
     66                LIBS="${LIBS} -Wl,-framework,CoreFoundation" 
     67                if test "${GCC}" = "yes"; then 
     68                        CFLAGS="${CFLAGS} -no-cpp-precomp" 
     69                fi 
    5970        ;; 
    6071esac 
    6172 
    62 AC_ARG_WITH(common-dir, 
    63         AC_HELP_STRING([--with-common-dir=PATH], [Specify path for common installation libraries]), 
    64         [ 
    65                 if test "x$withval" != "xno" ; then 
    66                         trycommondir=$withval 
    67                 fi 
    68         ] 
    69 ) 
    70  
    71 saved_LDFLAGS="$LDFLAGS" 
    72 saved_CPPFLAGS="$CPPFLAGS" 
    73 AC_CACHE_CHECK([for common directory], ac_cv_commondir, [ 
    74         for commondir in $trycommondir "" /usr/local /usr/pkg /opt ; do 
    75                 # Skip directories if they don't exist 
    76                 if test ! -z "$commondir" -a ! -d "$commondir/" ; then 
    77                         continue; 
    78                 fi 
    79                 CPPFLAGS="$saved_CPPFLAGS" 
    80                 LDFLAGS="$saved_LDFLAGS" 
    81  
    82                 if test ! -z "$commondir" -a "x$commondir" != "x/usr"; then 
    83                         LDFLAGS="-L$commondir/lib $saved_LDFLAGS" 
    84                         if test ! -z "$need_dash_r" ; then 
    85                                 LDFLAGS="-R$commondir/lib $LDFLAGS" 
    86                         fi 
    87                         CPPFLAGS="-I$commondir/include $saved_CPPFLAGS" 
    88                 fi 
    89                 break; 
    90         done 
    91  
    92         if test -z "$commondir" ; then 
    93                 commondir="(system)" 
    94         fi 
    95         ac_cv_commondir=$commondir 
    96 ]) 
    97  
    98 dnl Options 
    99 AM_MAINTAINER_MODE 
     73rootlibdir="/lib${libdir##*/lib}" 
     74usrlibdir="/usr/lib${libdir##*/lib}" 
     75usrsbindir="/usr/sbin${libdir##*/sbin}" 
     76 
     77full_sysconfdir=`eval eval eval eval eval echo "${sysconfdir}" | sed "s#NONE#${prefix}#" | sed "s#NONE#${ac_default_prefix}#"` 
     78full_localstatedir=`eval eval eval eval eval echo "${localstatedir}" | sed "s#NONE#${prefix}#" | sed "s#NONE#${ac_default_prefix}#"` 
     79 
     80AC_ARG_ENABLE( 
     81        [strict], 
     82        [AC_HELP_STRING([--enable-strict], [enable strict compile mode [[default=disabled]]])], 
     83        , 
     84        [enable_strict="no"] 
     85) 
     86 
     87AC_ARG_ENABLE( 
     88        [pedantic], 
     89        [AC_HELP_STRING([--enable-pedantic], [enable pedantic compile mode [[desfault=disabled]]])], 
     90        , 
     91        [enable_pedantic="no"] 
     92) 
     93 
     94AC_ARG_ENABLE( 
     95        [doc], 
     96        [AC_HELP_STRING([--enable-doc], [enable installation of documents. [[default=disabled]]])], 
     97        , 
     98        [enable_doc="no"] 
     99) 
     100 
     101AC_ARG_ENABLE( 
     102        [api-doc], 
     103        [AC_HELP_STRING([--enable-api-doc], [enable generation and installation of api documents. [[default=disabled]]])], 
     104        , 
     105        [enable_api_doc="no"] 
     106) 
     107 
     108AC_ARG_ENABLE( 
     109        [pcsc], 
     110        [AC_HELP_STRING([--enable-pcsc], [enable pcsc support. [[default=disabled]]])], 
     111        , 
     112        [enable_pcsc="no"] 
     113) 
     114 
     115AC_ARG_ENABLE( 
     116        [usb], 
     117        [AC_HELP_STRING([--enable-usb], [enable usb support. [[default=disabled]]])], 
     118        , 
     119        [enable_usb="no"] 
     120) 
     121 
     122AC_ARG_ENABLE( 
     123        [debug], 
     124        [AC_HELP_STRING([--enable-debug], [enable debug messages. [[default=no]]])], 
     125        [test "${enableval}" = "yes" && AC_DEFINE([DEBUG], [1], [Enable debug messages.])] 
     126) 
     127 
     128AC_ARG_ENABLE( 
     129        [sunray], 
     130        [AC_HELP_STRING([--enable-sunray], [enable sunray support. [[default=no]]])], 
     131        [test "${enableval}" = "yes" && AC_DEFINE([sunray], [1], [Enable sunray support.])] 
     132) 
     133 
     134AC_ARG_ENABLE( 
     135        [sunrayclient], 
     136        [AC_HELP_STRING([--enable-sunrayclient], [enable sunray client support. [[default=no]]])], 
     137        [test "${enableval}" = "yes" && AC_DEFINE(sunrayclient, 1, [Enable sunray client support.])] 
     138) 
     139 
     140AC_ARG_WITH( 
     141        [bundle-dir], 
     142        [AC_HELP_STRING([--with-bundle-dir=PATH], [install bundle file for pcsc-lite to PATH [[not installed]]])], 
     143        [ 
     144                if test "${withval}" = "yes"; then 
     145                        bundledir="\$(libdir)" 
     146                else 
     147                        bundledir="${withval}" 
     148                fi 
     149        ], 
     150        [bundledir="no"] 
     151) 
     152 
     153AC_ARG_WITH( 
     154        [udev-dir], 
     155        [AC_HELP_STRING([--with-udev-dir=PATH], [install udev files into PATH [[not installed]]])], 
     156        [ 
     157                if test "${withval}" = "yes"; then 
     158                        udevdir="\$(libdir)/udev" 
     159                else 
     160                        udevdir="${withval}" 
     161                fi 
     162        ], 
     163        [udevdir="no"] 
     164) 
     165 
     166AC_ARG_WITH( 
     167        [hotplug-dir], 
     168        [AC_HELP_STRING([--with-hotplug-dir=PATH], [install hotplug files into PATH [[not installed]]])], 
     169        [ 
     170                if test "${withval}" = "yes"; then 
     171                        hotplugdir="\$(sysconfdir)/hotplug/usb" 
     172                else 
     173                        hotplugdir="${withval}" 
     174                fi 
     175        ], 
     176        [hotplugdir="no"] 
     177) 
     178 
     179AC_ARG_ENABLE( 
     180        [ifd-dir], 
     181        [AC_HELP_STRING([--with-ifd-dir], [ifd directory. [[default=/usr/lib/ifd]]])], 
     182        [ifddir="${withval}"], 
     183        [ifddir="${usrlibdir}/ifd"] 
     184) 
    100185 
    101186dnl Checks for programs. 
     
    103188AC_PROG_INSTALL 
    104189AC_PROG_LN_S 
     190AC_PROG_MKDIR_P 
     191AC_PROG_SED 
    105192AC_PROG_MAKE_SET 
    106 AM_PROG_LEX 
    107  
    108 dnl Special check for pthread support. 
    109 ACX_PTHREAD( 
    110 [ 
    111  AC_DEFINE(HAVE_PTHREAD,1, 
    112   [Define if you have POSIX threads libraries and header files.]) 
    113 ], [ 
    114  AC_MSG_ERROR([POSIX thread support required]) 
    115 ]) 
    116 LIBS="$PTHREAD_LIBS $LIBS" 
    117 CFLAGS="$CFLAGS $PTHREAD_CFLAGS" 
    118 CC="$PTHREAD_CC" 
    119193 
    120194dnl Add libtool support. 
    121195AM_PROG_LIBTOOL 
     196 
     197AC_CHECK_PROGS([DOXYGEN],[doxygen]) 
     198test "${enable_api_doc}" = "yes" -a -z "${DOXYGEN}" && AC_MSG_ERROR([doxygen is required for api doc]) 
     199 
     200dnl These required for svn checkout 
     201AC_ARG_VAR([XSLTPROC], [xsltproc utility]) 
     202AC_ARG_VAR([SVN], [subversion utility]) 
     203AC_ARG_VAR([WGET], [wget utility]) 
     204AC_ARG_VAR([WGET_OPTS], [wget options]) 
     205AC_ARG_VAR([TR], [tr utility]) 
     206AC_CHECK_PROGS([XSLTPROC],[xsltproc]) 
     207AC_CHECK_PROGS([SVN],[svn]) 
     208AC_CHECK_PROGS([WGET],[wget]) 
     209AC_CHECK_PROGS([TR],[tr]) 
     210test -z "${WGET_OPTS}" && WGET_OPTS="-nv" 
     211 
     212dnl svn checkout dependencies 
     213if test "${svn_checkout}" = "yes"; then 
     214        AC_MSG_CHECKING([XSLTPROC requirement]) 
     215        if test -n "${XSLTPROC}"; then 
     216                AC_MSG_RESULT([ok]) 
     217        else 
     218                if test "${enable_doc}" = "yes"; then 
     219                        AC_MSG_ERROR([Missing XSLTPROC svn build with doc]) 
     220                else 
     221                        AC_MSG_WARN(["make dist" will not work]) 
     222                fi 
     223        fi 
     224 
     225        AC_MSG_CHECKING([svn doc build dependencies]) 
     226        if test -n "${SVN}" -a -n "${TR}" -a -n "${WGET}"; then 
     227                AC_MSG_RESULT([ok]) 
     228        else 
     229                if test "${enable_doc}" = "yes"; then 
     230                        AC_MSG_ERROR([Missing SVN, TR or WGET for svn doc build]) 
     231                else 
     232                        AC_MSG_WARN(["make dist" will not work]) 
     233                fi 
     234        fi 
     235fi 
    122236 
    123237dnl Checks for header files. 
    124238AC_HEADER_STDC 
    125239AC_HEADER_SYS_WAIT 
    126 AC_CHECK_HEADERS([errno.h fcntl.h malloc.h stdlib.h string.h strings.h sys/time.h unistd.h getopt.h dlfcn.h sys/poll.h]) 
     240AC_CHECK_HEADERS([ \ 
     241        errno.h fcntl.h malloc.h stdlib.h string.h \ 
     242        strings.h sys/time.h unistd.h getopt.h \ 
     243        dlfcn.h sys/poll.h 
     244]) 
    127245 
    128246dnl Checks for typedefs, structures, and compiler characteristics. 
     
    140258dnl C Compiler features 
    141259AC_C_INLINE 
    142 if test "$GCC" = "yes"; then 
    143         CFLAGS="-Wall $CFLAGS" 
    144 fi 
    145  
    146 dnl use ltdl 
     260 
     261dnl See if socket() is found from libsocket 
     262AC_CHECK_LIB( 
     263        [socket], 
     264        [socket], 
     265        [ 
     266                LIBS="${LIBS} -lsocket" 
     267                AC_CHECK_LIB( 
     268                        [resolv], 
     269                        [res_query], 
     270                        [LIBS="${LIBS} -lresolv"] 
     271                ) 
     272        ] 
     273) 
     274 
     275AC_ARG_VAR([LTLIB_CFLAGS], [C compiler flags for libltdl]) 
     276AC_ARG_VAR([LTLIB_LIBS], [linker flags for libltdl]) 
    147277if test -z "${LTLIB_LIBS}"; then 
    148     AC_ARG_VAR([LTLIB_CFLAGS], [C compiler flags for libltdl]) 
    149     AC_ARG_VAR([LTLIB_LIBS], [linker flags for libltdl]) 
    150  
    151     AC_CHECK_LIB( 
    152         [ltdl], 
    153         [lt_dlopen], 
    154         [LTLIB_LIBS="-lltdl"], 
    155         [AC_MSG_ERROR([ltdl1 not found, please install libltdl and/or libtool])]) 
    156  
    157     AC_CHECK_HEADER( 
    158         [ltdl.h], 
    159         , 
    160         [AC_MSG_ERROR([ltdl.h not found, please install libltdl and/or libtool])] 
    161     ) 
    162 fi 
    163 AC_SUBST([LTLIB_CFLAGS]) 
    164 AC_SUBST([LTLIB_LIBS]) 
    165  
    166 dnl See if socket() is found from libsocket 
    167 AC_CHECK_LIB(socket, socket, [LIBS="$LIBS -lsocket" ac_cv_func_socket_in_lsocket=yes], ac_cv_func_socket_in_lsocket=no) 
    168  
    169 AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage], 
    170                 ac_cv_have_ss_family_in_struct_ss, [ 
    171         AC_TRY_COMPILE( 
     278        AC_CHECK_LIB( 
     279                [ltdl], 
     280                [lt_dlopen], 
     281                [LTLIB_LIBS="-lltdl"], 
     282                [AC_MSG_ERROR([ltdl not found, please install libltdl and/or libtool])] 
     283        ) 
     284fi 
     285saved_CFLAGS="${CFLAGS}" 
     286CFLAGS="${CFLAGS} ${LTLIB_CFLAGS}" 
     287AC_CHECK_HEADER( 
     288        [ltdl.h], 
     289        , 
     290        [AC_MSG_ERROR([ltdl.h not found, please install libltdl and/or libtool])] 
     291) 
     292CFLAGS="${saved_CFLAGS}" 
     293 
     294AC_MSG_CHECKING([struct sockaddr_storage::ss_family]) 
     295AC_TRY_COMPILE( 
     296        [ 
     297#include <sys/types.h> 
     298#include <sys/socket.h> 
     299        ], 
     300        [ 
     301struct sockaddr_storage s; 
     302s.ss_family = 1; 
     303        ], 
     304        [AC_MSG_RESULT([ok])], 
     305        [AC_TRY_COMPILE( 
    172306                [ 
    173307#include <sys/types.h> 
    174308#include <sys/socket.h> 
    175309                ], 
    176                 [ struct sockaddr_storage s; s.ss_family = 1; ], 
    177                 [ ac_cv_have_ss_family_in_struct_ss="yes" ], 
    178                 [ ac_cv_have_ss_family_in_struct_ss="no" ], 
     310                [ 
     311struct sockaddr_storage s; 
     312s.__ss_family = 1; 
     313                ], 
     314                [ 
     315                        AC_MSG_RESULT([hack]) 
     316                        AC_DEFINE_UNQUOTED([ss_family], [__ss_family], [sockaddr_storage.ss_family wrapper]) 
     317                ], 
     318