Changeset 168


Ignore:
Timestamp:
Mar 15, 2008, 10:02:21 PM (17 years ago)
Author:
katerina
Message:

Zlib autoconf macro, bugfix in sh_strings.c

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.in

    r167 r168  
    16981698sh_portcheck.o: $(srcsrc)/sh_portcheck.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_mem.h $(srcinc)/sh_calls.h $(srcinc)/sh_utils.h $(srcinc)/sh_modules.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h $(srcinc)/CuTest.h
    16991699sh_pthread.o: $(srcsrc)/sh_pthread.c Makefile config_xor.h $(srcinc)/sh_pthread.h $(srcinc)/sh_calls.h $(srcinc)/sh_modules.h
    1700 sh_string.o: $(srcsrc)/sh_string.c Makefile $(srcinc)/sh_string.h $(srcinc)/sh_mem.h
     1700sh_string.o: $(srcsrc)/sh_string.c Makefile $(srcinc)/sh_string.h $(srcinc)/sh_mem.h $(srcinc)/CuTest.h
  • trunk/aclocal.m4

    r156 r168  
    18601860])dnl ACX_PTHREAD
    18611861
     1862
     1863
     1864
     1865dnl Copyright © 2004 Loic Dachary <loic@senga.org>
     1866dnl
     1867dnl This program is free software; you can redistribute it and/or modify
     1868dnl it under the terms of the GNU General Public License as published by
     1869dnl the Free Software Foundation; either version 2 of the License, or (at
     1870dnl your option) any later version.
     1871dnl
     1872dnl Use ZLIB_HOME instead of option
     1873
     1874AC_DEFUN([CHECK_ZLIB],[
     1875
     1876if test "x${ZLIB_HOME}" = "x"; then
     1877        ZLIB_HOME=/usr/local
     1878        if test ! -f "${ZLIB_HOME}/include/zlib.h"
     1879        then
     1880                ZLIB_HOME=/usr
     1881        fi
     1882fi
     1883
     1884zlib_found=no
     1885
     1886ZLIB_OLD_LDFLAGS=$LDFLAGS
     1887ZLIB_OLD_CPPFLAGS=$LDFLAGS
     1888if test "x${ZLIB_HOME}" = "x/usr"; then
     1889        :
     1890else
     1891        LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
     1892        CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
     1893fi
     1894AC_LANG_SAVE
     1895AC_LANG_C
     1896AC_CHECK_LIB(z, inflateEnd, [zlib_cv_libz=yes], [zlib_cv_libz=no])
     1897AC_CHECK_HEADER(zlib.h, [zlib_cv_zlib_h=yes], [zlib_cv_zlib_h=no])
     1898AC_LANG_RESTORE
     1899if test "$zlib_cv_libz" = "yes" -a "$zlib_cv_zlib_h" = "yes"
     1900then
     1901        #
     1902        # If both library and header were found, use them
     1903        #
     1904        AC_CHECK_LIB(z, inflateEnd)
     1905        AC_MSG_CHECKING([zlib in ${ZLIB_HOME}])
     1906        AC_MSG_RESULT(ok)
     1907        zlib_found=yes
     1908else
     1909        #
     1910        # If either header or library was not found, revert and bomb
     1911        #
     1912        AC_MSG_CHECKING(zlib in ${ZLIB_HOME})
     1913        LDFLAGS="$ZLIB_OLD_LDFLAGS"
     1914        CPPFLAGS="$ZLIB_OLD_CPPFLAGS"
     1915        AC_MSG_RESULT(failed)
     1916        AC_MSG_ERROR([zlib not found in ZLIB_HOME, /usr/local, or /usr])
     1917fi
     1918
     1919])
     1920
     1921
    18621922dnl *-*wedit:notab*-*  Please keep this as the last line.
    18631923
  • trunk/configure.ac

    r162 r168  
    875875if test x"${mytclient}" = x-DSH_STANDALONE -o x"${mytclient}" = x-DSH_WITH_CLIENT;
    876876then
     877dnl For threaded modules
    877878        ACX_PTHREAD
    878879        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
     
    880881        LDFLAGS="$PTHREAD_CFLAGS $LDFLAGS"
    881882        CC="$PTHREAD_CC"
     883dnl For MODI_TXT
     884        CHECK_ZLIB()
    882885fi
    883886       
     
    969972        fi
    970973        if test "x${withval}" = "xmysql"; then
     974          if test "x$zlib_found" = "x"
     975          then
     976                CHECK_ZLIB()
     977          fi
    971978          AC_CHECK_PROG(HAVE_MYSQL_CONFIG, mysql_config, yes, no)
    972979          if test "$HAVE_MYSQL_CONFIG" = "yes"; then
    973                 # echo "mysql_config found"
    974980                sh_mysql_libs="`mysql_config --libs`"
    975                 # echo ${sh_mysql_libs}
    976981                sh_mysql_libs="`eval echo ${sh_mysql_libs}`"
    977                 # echo $mysql_libs
    978                 # save_libs="$LIBS"
    979                 # LIBS="$LIBS `mysql_config --libs`"
    980                 # echo $LIBS
    981982                LIBS="$LIBS ${sh_mysql_libs}"
    982                 # echo $LIBS
    983983                sh_mysql_cflags="`mysql_config --cflags`"
    984984                sh_mysql_cflags="`eval echo ${sh_mysql_cflags}`"
    985                 # CFLAGS="$CFLAGS `mysql_config --cflags`"
    986                 # CFLAGS="$CFLAGS ${sh_mysql_cflags}"
    987985                CPPFLAGS="$CPPFLAGS ${sh_mysql_cflags}"
    988986          else
    989                 AC_MSG_CHECKING(for MySQL in /usr /usr/local /usr/local/mysql MYSQL_HOME)
     987                AC_MSG_CHECKING([for MySQL in /usr /usr/local /usr/local/mysql MYSQL_HOME])
    990988                mysql_directory="/usr /usr/local /usr/local/mysql ${MYSQL_HOME}"
    991989
     
    10531051          AC_DEFINE(WITH_MYSQL)
    10541052          AC_DEFINE(WITH_DATABASE)
    1055           AC_CHECK_LIB(z, inflateEnd, [zlib_cv_libz=yes], [zlib_cv_libz=no])
    1056           AC_MSG_CHECKING(for zlib)
    1057           if test "$zlib_cv_libz" = "yes"
     1053          if test "x$zlib_found" = "xyes"
    10581054          then
    10591055                LIBS="$LIBS -lz -lm"
    1060                 AC_MSG_RESULT(ok)
    10611056          else
    1062                 AC_MSG_RESULT(failed)
    10631057                echo
    1064                 echo " Either the mysql or the zlib library was not found"
    1065                 echo " or was unusable. Possible reasons include:"
     1058               
     1059                echo " Mysql library was not found or not useable."
     1060                echo " Possible reasons include:"
    10661061                echo "  - an old, incompatible version compiled from source"
    10671062                echo "  - on Solaris, libmysql is compiled with the Solaris"
     
    10721067                echo " message from the compiler."
    10731068                echo
    1074                 echo " If your mysql and zlib libraries are installed in an"
     1069                echo " If your mysql libraries are installed in an"
    10751070                echo " unusual place, use --with-libs=-L/path/to/libdirectory"
    1076                 echo " where libdirectory is the directory holding libmysql"
    1077                 echo " or libz."
     1071                echo " where libdirectory is the directory holding libmysql."
    10781072                if test x"$enable_static" = xyes; then
    10791073                  echo " Note that for compiling a static binary, you need"
     
    10811075                fi
    10821076                echo
    1083                 AC_MSG_ERROR([libmysql or zlib not found or unuseable])
     1077                AC_MSG_ERROR([libmysql not found or unuseable])
    10841078          fi
    10851079          AC_CHECK_HEADERS(mysql/mysql.h)
  • trunk/depend.dep

    r167 r168  
    6363sh_pthread.o: $(srcsrc)/sh_pthread.c Makefile config_xor.h $(srcinc)/sh_pthread.h $(srcinc)/sh_calls.h $(srcinc)/sh_modules.h
    6464kern_head.o: $(srcsrc)/kern_head.c Makefile config.h $(srcinc)/kern_head.h $(srcinc)/kern_head.h
    65 sh_string.o: $(srcsrc)/sh_string.c Makefile $(srcinc)/sh_string.h $(srcinc)/sh_mem.h
     65sh_string.o: $(srcsrc)/sh_string.c Makefile $(srcinc)/sh_string.h $(srcinc)/sh_mem.h $(srcinc)/CuTest.h
  • trunk/depend.sum

    r167 r168  
    1 3237390887
     12783424603
Note: See TracChangeset for help on using the changeset viewer.