~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Brian Aker
  • Date: 2008-06-30 19:58:51 UTC
  • Revision ID: brian@tangent.org-20080630195851-mkf52emj04anr5ro
Clean up of configure.in

Show diffs side-by-side

added added

removed removed

Lines of Context:
220
220
# Not critical since the generated file is distributed
221
221
AC_CHECK_PROGS(YACC, ['bison -y -p MYSQL'])
222
222
 
223
 
#check the return type of sprintf
224
 
AC_MSG_CHECKING("return type of sprintf")
225
 
AC_TRY_RUN([
226
 
  int main()
227
 
    {
228
 
      char* s = "hello";
229
 
      char buf[6];
230
 
      if((int)sprintf(buf, s) == strlen(s))
231
 
        return 0;
232
 
      
233
 
      return -1;
234
 
     }
235
 
   ],
236
 
   [AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf])
237
 
   AC_MSG_RESULT("int")],
238
 
   [AC_TRY_RUN([
239
 
 int main()
240
 
   {
241
 
     char* s = "hello";
242
 
     char buf[6];
243
 
     if((char*)sprintf(buf,s) == buf + strlen(s))
244
 
       return 0;
245
 
     return -1;
246
 
   }           ],
247
 
               [AC_DEFINE(SPRINTF_RETURNS_PTR, [1], [Broken sprintf])
248
 
                AC_MSG_RESULT("ptr")],
249
 
               [AC_DEFINE(SPRINTF_RETURNS_GARBAGE, [1], [Broken sprintf])
250
 
                AC_MSG_RESULT("garbage")]
251
 
   )],
252
 
   # Cross compile, assume POSIX
253
 
   [AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf])
254
 
    AC_MSG_RESULT("int (we assume)")]
255
 
)
256
 
 
257
223
AC_PATH_PROG(uname_prog, uname, no)
258
224
 
259
225
# We should go through this and put all the explictly system dependent
473
439
static_nss=""
474
440
STATIC_NSS_FLAGS=""
475
441
OTHER_LIBC_LIB=""
476
 
AC_ARG_WITH(other-libc,
477
 
 [  --with-other-libc=DIR   Link against libc and other standard libraries 
478
 
                          installed in the specified non-standard location 
479
 
                          overriding default. Originally added to be able to
480
 
                          link against glibc 2.2 without making the user 
481
 
                          upgrade the standard libc installation.],
482
 
 [
483
 
   other_libc_include="$withval/include"
484
 
   other_libc_lib="$withval/lib"
485
 
   with_other_libc="yes"
486
 
   enable_shared="no"
487
 
   all_is_static="yes"
488
 
   CFLAGS="$CFLAGS -I$other_libc_include"
489
 
   # There seems to be a feature in gcc that treats system and libc headers
490
 
   # silently when they violatate ANSI C++ standard, but it is strict otherwise
491
 
   # since gcc cannot now recognize that our headers are libc, we work around
492
 
   # by telling it to be permissive. Note that this option only works with
493
 
   # new versions of gcc (2.95.x and above)
494
 
   CXXFLAGS="$CXXFLAGS -fpermissive -I$other_libc_include"
495
 
   if test -f "$other_libc_lib/libnss_files.a"
496
 
   then
497
 
     # libc has been compiled with --enable-static-nss
498
 
     # we need special flags, but we will have to add those later
499
 
     STATIC_NSS_FLAGS="-lc -lnss_files -lnss_dns -lresolv"
500
 
     STATIC_NSS_FLAGS="$STATIC_NSS_FLAGS $STATIC_NSS_FLAGS"
501
 
     OTHER_LIBC_LIB="-static -L$other_libc_lib"
502
 
     static_nss=1
503
 
   else
504
 
     # this is a dirty hack. We if we detect static nss glibc in the special
505
 
     # location, we do not re-direct the linker to get libraries from there
506
 
     # during check. The reason is that if we did, we would have to find a
507
 
     # way to append the special static nss flags to LIBS every time we do
508
 
     # any check - this is definitely feasible, but not worthwhile the risk
509
 
     # of breaking other things. So for our purposes it would be sufficient
510
 
     # to assume that whoever is using static NSS knows what he is doing and
511
 
     # has sensible libraries in the regular location
512
 
     LDFLAGS="$LDFLAGS -static -L$other_libc_lib "
513
 
   fi
514
 
   
515
 
   # When linking against custom libc installed separately, we want to force
516
 
   # all binary builds to be static, including the build done by configure
517
 
   # itself to test for system features.
518
 
   with_mysqld_ldflags="-all-static"
519
 
   with_client_ldflags="-all-static"
520
 
   NOINST_LDFLAGS="-all-static"
521
 
 ],
522
 
 [
523
 
  other_libc_include=
524
 
  other_libc_lib=
525
 
  with_other_libc="no"
526
 
 ]
527
 
)
528
 
AC_SUBST(NOINST_LDFLAGS)
529
442
 
530
443
#
531
444
# Check if we are using Linux and a glibc compiled with static nss
550
463
    )
551
464
AC_SUBST(MYSQL_SERVER_SUFFIX)
552
465
 
553
 
# Set flags if we want to force to use pthreads
554
 
AC_ARG_WITH(pthread,
555
 
    [  --with-pthread          Force use of pthread library.],
556
 
    [ with_pthread=$withval ],
557
 
    [ with_pthread=no ]
558
 
    )
559
 
 
560
 
# Force use of thread libs LIBS
561
 
AC_ARG_WITH(named-thread-libs,
562
 
    [  --with-named-thread-libs=ARG
563
 
                          Use specified thread libraries instead of 
564
 
                          those automatically found by configure.],
565
 
    [ with_named_thread=$withval ],
566
 
    [ with_named_thread=no ]
567
 
    )
568
 
 
569
466
# Force use of a curses libs
570
467
AC_ARG_WITH(named-curses-libs,
571
468
    [  --with-named-curses-libs=ARG
675
572
  AC_MSG_RESULT([no])
676
573
fi
677
574
 
678
 
# If we should allow init-file, skip-grant-table and bootstrap options
679
 
AC_MSG_CHECKING(If we should should enable init-file, skip-grant-table options and bootstrap)
680
 
AC_ARG_ENABLE(grant-options,
681
 
    [  --disable-grant-options Disables the use of --init-file, --skip-grant-tables and --bootstrap options],
682
 
    [ mysql_grant_options_enabled=$enableval ],
683
 
    [ mysql_grant_options_enabled=yes ]
684
 
    )
685
 
if test "$mysql_grant_options_enabled" = "yes"
686
 
then
687
 
  AC_MSG_RESULT([yes])
688
 
else
689
 
  AC_DEFINE([DISABLE_GRANT_OPTIONS], [1],
690
 
            [Disables the use of --init-file, --skip-grant-tables and --bootstrap options])
691
 
  AC_MSG_RESULT([no])
692
 
fi
693
 
 
694
575
MYSQL_SYS_LARGEFILE
695
576
 
696
577
# Types that must be checked AFTER large file support is checked
721
602
AC_CHECK_LIB(event, event_loop, [], [AC_MSG_ERROR(could not find libevent)])
722
603
 
723
604
#--------------------------------------------------------------------
 
605
# Check for libpthread
 
606
#--------------------------------------------------------------------
 
607
 
 
608
AC_CHECK_LIB(pthread, pthread_create, [], [AC_MSG_ERROR(could not find libpthread)])
 
609
 
 
610
#--------------------------------------------------------------------
724
611
# Check for system libraries. Adds the library to $LIBS
725
612
# and defines HAVE_LIBM etc
726
613
#--------------------------------------------------------------------
779
666
#include <ieeefp.h>
780
667
])
781
668
 
782
 
#
783
 
# Some system specific hacks
784
 
#
785
 
 
786
 
MAX_C_OPTIMIZE="-O3"
787
 
MAX_CXX_OPTIMIZE="-O3"
788
 
 
789
 
case $SYSTEM_TYPE in
790
 
  *solaris*)
791
 
    CFLAGS="$CFLAGS -DHAVE_RWLOCK_T"
792
 
    CXXFLAGS="$CXXFLAGS -DHAVE_RWLOCK_T"
793
 
    ;;
794
 
  *darwin*)
795
 
    if test "$ac_cv_prog_gcc" = "yes"
796
 
    then
797
 
      FLAGS="-D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT  -DDONT_DECLARE_CXA_PURE_VIRTUAL"
798
 
      CFLAGS="$CFLAGS $FLAGS"
799
 
      CXXFLAGS="$CXXFLAGS $FLAGS"
800
 
      MAX_C_OPTIMIZE="-O"
801
 
    fi
802
 
    ;;
803
 
  *freebsd*|*dragonfly*)
804
 
    AC_MSG_WARN([Adding fix for interrupted reads])
805
 
    OSVERSION=`sysctl -a | grep osreldate | awk '{ print $2 }'`
806
 
    if test "$OSVERSION" -gt "480100" && \
807
 
       test "$OSVERSION" -lt "500000" || \
808
 
       test "$OSVERSION" -gt "500109"
809
 
    then
810
 
       CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000"
811
 
    else
812
 
       CFLAGS="$CFLAGS -DHAVE_BROKEN_REALPATH"
813
 
       CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000 -DHAVE_BROKEN_REALPATH"
814
 
    fi
815
 
    ;;
816
 
  *netbsd*)
817
 
    AC_MSG_WARN([Adding flag -Dunix])
818
 
    CFLAGS="$CFLAGS -Dunix"
819
 
    CXXFLAGS="$CXXFLAGS -Dunix"
820
 
    OVERRIDE_MT_LD_ADD="\$(top_srcdir)/mit-pthreads/obj/libpthread.a"
821
 
    ;;
822
 
esac
823
 
 
824
 
 
825
 
#---START: Used in for client configure
826
 
# Check if we threads are in libc or if we should use
827
 
# -lpthread, -lpthreads or mit-pthreads
828
 
# We have to check libc last because else it fails on Solaris 2.6
829
 
 
830
 
with_posix_threads="no"
831
 
# Search thread lib on Linux
832
 
if test "$with_named_thread" = "no"
833
 
then
834
 
    AC_MSG_CHECKING("Linux threads")
835
 
    if test "$TARGET_LINUX" = "true"
836
 
    then
837
 
        AC_MSG_RESULT("starting")
838
 
        # use getconf to check glibc contents
839
 
        AC_MSG_CHECKING("getconf GNU_LIBPTHREAD_VERSION")
840
 
        case `getconf GNU_LIBPTHREAD_VERSION | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` in
841
 
        NPTL* )
842
 
                AC_MSG_RESULT("NPTL")
843
 
                AC_DEFINE([HAVE_NPTL], [1], [NPTL threads implementation])
844
 
                with_named_thread="-lpthread"
845
 
                ;;
846
 
        LINUXTHREADS* )
847
 
                AC_MSG_RESULT("Linuxthreads")
848
 
                AC_DEFINE([HAVE_LINUXTHREADS], [1], 
849
 
                      [Whether we are using Xavier Leroy's LinuxThreads])
850
 
                with_named_thread="-lpthread"
851
 
                ;;
852
 
        * )
853
 
                AC_MSG_RESULT("unknown")
854
 
                ;;
855
 
        esac
856
 
        if test "$with_named_thread" = "no"
857
 
        then
858
 
          # old method, check headers
859
 
          # Look for LinuxThreads.
860
 
          AC_MSG_CHECKING("LinuxThreads in header file comment")
861
 
          res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
862
 
          if test "$res" -gt 0
863
 
          then
864
 
            AC_MSG_RESULT("Found")
865
 
            AC_DEFINE([HAVE_LINUXTHREADS], [1],
866
 
                  [Whether we are using Xavier Leroy's LinuxThreads])
867
 
            # Linux 2.0 sanity check
868
 
            AC_TRY_COMPILE([#include <sched.h>], [int a = sched_get_priority_min(1);], ,
869
 
                  AC_MSG_ERROR([Syntax error in sched.h. Change _P to __P in the /usr/include/sched.h file. See the Installation chapter in the Reference Manual]))
870
 
            # RedHat 5.0 does not work with dynamic linking of this. -static also
871
 
            # gives a speed increase in linux so it does not hurt on other systems.
872
 
            with_named_thread="-lpthread"
873
 
          else
874
 
            AC_MSG_RESULT("Not found")
875
 
            # If this is a linux machine we should barf
876
 
            AC_MSG_ERROR([This is a Linux system without a working getconf, 
877
 
and Linuxthreads was not found. Please install it (or a new glibc) and try again.  
878
 
See the Installation chapter in the Reference Manual for more information.])
879
 
          fi
880
 
        else
881
 
            AC_MSG_RESULT("no need to check headers")
882
 
        fi
883
 
        
884
 
        AC_MSG_CHECKING("for pthread_create in -lpthread")
885
 
        ac_save_LIBS="$LIBS"
886
 
        LIBS="$LIBS -lpthread"
887
 
        AC_TRY_LINK( [#include <pthread.h>],
888
 
              [ (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ],
889
 
              AC_MSG_RESULT("yes"),
890
 
              [ AC_MSG_RESULT("no")
891
 
                AC_MSG_ERROR([
892
 
This is a Linux system claiming to support threads, either Linuxthreads or NPTL, but linking a test program failed.  
893
 
Please install one of these (or a new glibc) and try again.  
894
 
See the Installation chapter in the Reference Manual for more information.]) ]
895
 
              )
896
 
        LIBS="$ac_save_LIBS"
897
 
    else
898
 
        AC_MSG_RESULT("no")
899
 
    fi  # "$TARGET_LINUX" 
900
 
fi  # "$with_named_thread" = "no" -a "$with_mit_threads" = "no"
901
 
 
902
 
# Use library named -lpthread
903
 
if test "$with_named_thread" = "no" -a "$with_pthread" = "yes"
904
 
then
905
 
    with_named_thread="-lpthread"
906
 
fi
907
 
 
908
 
#---END:
909
 
 
910
 
# Hack for Solaris >= 2.5
911
 
# We want both the new and the old interface
912
 
 
913
 
if test "$with_named_thread" = "no"
914
 
then
915
 
  AC_MSG_CHECKING("Solaris threads")
916
 
  if test -f /usr/lib/libpthread.so -a -f /usr/lib/libthread.so
917
 
  then
918
 
    with_named_thread="-lpthread -lthread"
919
 
    AC_MSG_RESULT("yes")
920
 
  else
921
 
    AC_MSG_RESULT("no")
922
 
  fi
923
 
fi
924
 
 
925
 
# Should we use named pthread library ?
926
 
AC_MSG_CHECKING("named thread libs:")
927
 
if test "$with_named_thread" != "no"
928
 
then
929
 
  LIBS="$with_named_thread $LIBS $with_named_thread"
930
 
  CLIENT_THREAD_LIBS="$with_named_thread"
931
 
  with_posix_threads="yes"
932
 
  AC_MSG_RESULT("$with_named_thread")
933
 
else
934
 
  AC_MSG_RESULT("no")
935
 
  # pthread_create is in standard libraries (As in BSDI 3.0)
936
 
  AC_MSG_CHECKING("for pthread_create in -libc");
937
 
  AC_TRY_LINK(
938
 
  [#include <pthread.h>],
939
 
  [ (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ],
940
 
  with_posix_threads=yes, with_posix_threads=no)
941
 
  AC_MSG_RESULT("$with_posix_threads")
942
 
  if test "$with_posix_threads" = "no"
943
 
  then
944
 
    AC_MSG_CHECKING("for pthread_create in -lpthread")
945
 
    ac_save_LIBS="$LIBS"
946
 
    LIBS="$LIBS -lpthread"
947
 
    CLIENT_THREAD_LIBS="-lpthread"
948
 
    AC_TRY_LINK(
949
 
    [#include <pthread.h>],
950
 
    [ (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ],
951
 
    with_posix_threads=yes, with_posix_threads=no)
952
 
    AC_MSG_RESULT("$with_posix_threads")
953
 
    if test "$with_posix_threads" = "no"
954
 
    then
955
 
      LIBS=" $ac_save_LIBS -lpthreads"
956
 
      CLIENT_THREAD_LIBS="-lpthreads"
957
 
      AC_MSG_CHECKING("for pthread_create in -lpthreads")
958
 
      AC_TRY_LINK(
959
 
      [#include <pthread.h>],
960
 
      [ pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ],
961
 
      with_posix_threads=yes, with_posix_threads=no)
962
 
      AC_MSG_RESULT("$with_posix_threads")
963
 
      if test "$with_posix_threads" = "no"
964
 
      then
965
 
        # This is for FreeBSD
966
 
        LIBS="$ac_save_LIBS -pthread"
967
 
        CLIENT_THREAD_LIBS="-pthread"
968
 
        AC_MSG_CHECKING("for pthread_create in -pthread")
969
 
        AC_TRY_LINK(
970
 
        [#include <pthread.h>],
971
 
        [ pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ],
972
 
        with_posix_threads=yes, with_posix_threads=no)
973
 
        AC_MSG_RESULT("$with_posix_threads")
974
 
      fi
975
 
    fi
976
 
  fi
977
 
fi
978
 
 
979
 
#---START: Used in for client configure
980
 
# Must be checked after, because strtok_r may be in -lpthread
981
 
# On AIX strtok_r is in libc_r
982
 
 
983
 
my_save_LIBS="$LIBS"
984
 
AC_CHECK_LIB(pthread,strtok_r)
985
 
LIBS="$my_save_LIBS"
986
 
if test "$ac_cv_lib_pthread_strtok_r" = "no"
987
 
then
988
 
  AC_CHECK_LIB(c_r,strtok_r)
989
 
  case "$with_osf32_threads---$target_os" in
990
 
    # Don't keep -lc_r in LIBS; -pthread handles it magically
991
 
    yes---* | *---freebsd* | *---hpux*) LIBS="$my_save_LIBS" ;;
992
 
 
993
 
  esac
994
 
  AC_CHECK_FUNCS(strtok_r pthread_init)
995
 
else
996
 
  AC_CHECK_FUNCS(strtok_r)
997
 
fi
998
 
#---END:
999
 
 
1000
 
# dlopen, dlerror
1001
 
case "$with_mysqld_ldflags " in
1002
 
 
1003
 
  *"-all-static "*)
1004
 
    # No need to check for dlopen when mysqld is linked with
1005
 
    # -all-static as it won't be able to load any functions.
1006
 
    # NOTE! It would be better if it was possible to test if dlopen
1007
 
    # can be used, but a good way to test it couldn't be found
1008
 
 
1009
 
    ;;
1010
 
 
1011
 
  *)
1012
 
    # Check for dlopen, needed for user definable functions
1013
 
    # This must be checked after threads on AIX
1014
 
    # We only need this for mysqld, not for the clients.
1015
 
 
1016
 
    my_save_LIBS="$LIBS"
1017
 
    LIBS=""
1018
 
    AC_CHECK_LIB(dl,dlopen)
1019
 
    LIBDL=$LIBS
1020
 
    LIBS="$my_save_LIBS"
1021
 
    AC_SUBST(LIBDL)
1022
 
 
1023
 
    my_save_LIBS="$LIBS"
1024
 
    LIBS="$LIBS $LIBDL"
1025
 
    AC_CHECK_FUNCS(dlopen dlerror)
1026
 
    LIBS="$my_save_LIBS"
1027
 
 
1028
 
    ;;
1029
 
esac
 
669
 
 
670
my_save_LIBS="$LIBS"
 
671
LIBS=""
 
672
AC_CHECK_LIB(dl,dlopen)
 
673
LIBDL=$LIBS
 
674
LIBS="$my_save_LIBS"
 
675
AC_SUBST(LIBDL)
 
676
 
 
677
my_save_LIBS="$LIBS"
 
678
LIBS="$LIBS $LIBDL"
 
679
AC_CHECK_FUNCS(dlopen dlerror)
 
680
LIBS="$my_save_LIBS"
 
681
 
 
682
AC_CHECK_FUNCS(strtok_r)
1030
683
 
1031
684
 
1032
685
# System characteristics
1127
780
  fi
1128
781
fi
1129
782
 
1130
 
AC_ARG_WITH([atomic-ops],
1131
 
            AC_HELP_STRING([--with-atomic-ops=rwlocks|smp|up],
1132
 
            [Implement atomic operations using pthread rwlocks or atomic CPU
1133
 
             instructions for multi-processor (default) or uniprocessor
1134
 
             configuration]), , [with_atomic_ops=smp])
1135
 
case "$with_atomic_ops" in
1136
 
  "up") AC_DEFINE([MY_ATOMIC_MODE_DUMMY], [1],
1137
 
                  [Assume single-CPU mode, no concurrency]) ;;
1138
 
  "rwlocks") AC_DEFINE([MY_ATOMIC_MODE_RWLOCKS], [1],
1139
 
                  [Use pthread rwlocks for atomic ops]) ;;
1140
 
  "smp") ;;
1141
 
   *) AC_MSG_ERROR(["$with_atomic_ops" is not a valid value for --with-atomic-ops]) ;;
1142
 
esac
1143
 
 
1144
 
AC_CACHE_CHECK([whether the compiler provides atomic builtins],
1145
 
               [mysql_cv_gcc_atomic_builtins], [AC_TRY_RUN([
1146
 
  int main()
1147
 
  {
1148
 
    int foo= -10; int bar= 10;
1149
 
    if (!__sync_fetch_and_add(&foo, bar) || foo)
1150
 
      return -1;
1151
 
    bar= __sync_lock_test_and_set(&foo, bar);
1152
 
    if (bar || foo != 10)
1153
 
      return -1;
1154
 
    bar= __sync_val_compare_and_swap(&bar, foo, 15);
1155
 
    if (bar)
1156
 
      return -1;
1157
 
    return 0;
1158
 
  }
1159
 
], [mysql_cv_gcc_atomic_builtins=yes],
1160
 
   [mysql_cv_gcc_atomic_builtins=no],
1161
 
   [mysql_cv_gcc_atomic_builtins=no])])
1162
 
 
1163
 
if test "x$mysql_cv_gcc_atomic_builtins" = xyes; then
1164
 
  AC_DEFINE(HAVE_GCC_ATOMIC_BUILTINS, 1,
1165
 
            [Define to 1 if compiler provides atomic builtins.])
1166
 
fi
1167
 
 
1168
 
# Force static compilation to avoid linking problems/get more speed
1169
 
AC_ARG_WITH(mysqld-ldflags,
1170
 
    [  --with-mysqld-ldflags   Extra linking arguments for mysqld],
1171
 
    [MYSQLD_EXTRA_LDFLAGS=$withval],
1172
 
    [MYSQLD_EXTRA_LDFLAGS=])
1173
 
AC_SUBST(MYSQLD_EXTRA_LDFLAGS)
1174
 
 
1175
 
AC_ARG_WITH(client-ldflags,
1176
 
    [  --with-client-ldflags   Extra linking arguments for clients],
1177
 
    [CLIENT_EXTRA_LDFLAGS=$withval],
1178
 
    [CLIENT_EXTRA_LDFLAGS=])
1179
 
AC_SUBST(CLIENT_EXTRA_LDFLAGS)
1180
 
 
1181
 
AC_ARG_WITH(mysqld-libs,
1182
 
    [  --with-mysqld-libs   Extra libraries to link with for mysqld],
1183
 
    [MYSQLD_EXTRA_LIBS=$withval],
1184
 
    [MYSQLD_EXTRA_LIBS=])
1185
 
AC_SUBST(MYSQLD_EXTRA_LIBS)
1186
 
 
1187
 
AC_ARG_WITH(lib-ccflags,
1188
 
    [  --with-lib-ccflags      Extra CC options for libraries],
1189
 
    [LIB_EXTRA_CCFLAGS=$withval],
1190
 
    [LIB_EXTRA_CCFLAGS=])
1191
 
AC_SUBST(LIB_EXTRA_CCFLAGS)
1192
 
 
1193
 
# Avoid stupid bug on some OS 
1194
 
AC_ARG_WITH(low-memory,
1195
 
    [  --with-low-memory       Try to use less memory to compile to avoid 
1196
 
                          memory limitations.],
1197
 
    [with_lowmem=$withval],
1198
 
    [with_lowmem=no])
1199
 
if test "$with_lowmem" = "yes"
1200
 
then
1201
 
  if test "$ac_cv_prog_gcc" = "yes" 
1202
 
  then 
1203
 
    LM_CFLAGS="-fno-inline"
1204
 
  else
1205
 
    LM_CFLAGS="-O0"
1206
 
  fi
1207
 
else
1208
 
  LM_CFLAGS=""
1209
 
fi
1210
 
AC_SUBST(LM_CFLAGS)
1211
 
 
1212
783
AC_ARG_WITH(comment,
1213
784
    [  --with-comment          Comment about compilation environment.],
1214
785
    [with_comment=$withval],