Show
Ignore:
Timestamp:
07/30/06 16:56:41 (2 years ago)
Author:
bart
Message:

* Fixed detection of SysV IPC shared memory and made anonymous mmap
the first selected type. This makes the behaviour of rc1 the
default. anonymous mmap doens't have the problem of shmmax. SysVIPC is
still available!
* Fixed some of the detection test in the configure script that probably
never worked.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • eaccelerator/trunk/config.m4

    r258 r259  
    1111]) 
    1212 
     13dnl  
     14dnl configure options for eAccelerator 
     15dnl  
    1316AC_ARG_WITH(eaccelerator,[],[enable_eaccelerator=$withval]) 
    1417 
     
    122125 
    123126  AC_REQUIRE_CPP() 
     127 
     128dnl 
     129dnl Do some tests for OS support 
     130dnl 
    124131 
    125132  AC_HAVE_HEADERS(unistd.h limits.h sys/param.h sched.h) 
     
    152159 
    153160 
     161dnl Test for union semun 
    154162  AC_MSG_CHECKING(whether union semun is defined in sys/sem.h) 
    155163  AC_TRY_COMPILE([ 
     
    171179  mm_shm_mmap_posix=no 
    172180 
     181dnl sysvipc shared memory 
    173182  AC_MSG_CHECKING(for sysvipc shared memory support) 
    174183  AC_TRY_RUN([#define MM_SEM_NONE 
     
    182191  EA_REMOVE_IPC_TEST() 
    183192 
     193dnl mmap shared memory 
    184194  AC_MSG_CHECKING(for mmap shared memory support) 
    185195  AC_TRY_RUN([#define MM_SEM_NONE 
     
    192202  AC_MSG_RESULT([$msg]) 
    193203 
     204dnl mmap zero shared memory 
    194205  AC_MSG_CHECKING(for mmap on /dev/zero shared memory support) 
    195206  AC_TRY_RUN([#define MM_SEM_NONE 
     
    202213  AC_MSG_RESULT([$msg]) 
    203214 
     215dnl mmap anonymous shared memory 
    204216  AC_MSG_CHECKING(for anonymous mmap shared memory support) 
    205217  AC_TRY_RUN([#define MM_SEM_NONE 
     
    212224  AC_MSG_RESULT([$msg]) 
    213225 
     226dnl posix mmap shared memory support 
    214227  AC_MSG_CHECKING(for posix mmap shared memory support) 
    215228  AC_TRY_RUN([#define MM_SEM_NONE 
     
    222235  AC_MSG_RESULT([$msg]) 
    223236 
     237dnl determine the best type 
    224238  AC_MSG_CHECKING(for best shared memory type) 
    225239  if test "$mm_shm_ipc" = "yes"; then 
     
    243257  AC_MSG_RESULT([$msg]) 
    244258  if test "$msg" = "no" ; then 
    245     AC_MSG_WARN([eaccelerator cannot detect shared memory type, which is required]) 
    246   fi 
    247  
     259    AC_MSG_ERROR([eaccelerator couldn't detect the shared memory type]) 
     260  fi 
     261 
     262dnl 
     263dnl 
     264 
     265dnl spinlock test 
    248266  AC_MSG_CHECKING(for spinlock semaphores support) 
    249267  AC_TRY_RUN([#define MM_SEM_SPINLOCK 
     
    255273  AC_MSG_RESULT([$msg]) 
    256274 
     275oldLIBS="$LIBS" 
     276LIBS="-lpthread" 
     277dnl pthread support 
    257278  AC_MSG_CHECKING(for pthread semaphores support) 
    258279  AC_TRY_RUN([#define MM_SEM_PTHREAD 
     
    264285  AC_MSG_RESULT([$msg]) 
    265286 
     287dnl posix semaphore support 
    266288  AC_MSG_CHECKING(for posix semaphores support) 
    267289  AC_TRY_RUN([#define MM_SEM_POSIX 
     
    273295  AC_MSG_RESULT([$msg]) 
    274296 
     297LIBS="$oldLIBS" 
     298dnl sysvipc semaphore support 
    275299  AC_MSG_CHECKING(for sysvipc semaphores support) 
    276300  AC_TRY_RUN([#define MM_SEM_IPC 
     
    283307  EA_REMOVE_IPC_TEST() 
    284308 
     309dnl fnctl semaphore support 
    285310  AC_MSG_CHECKING(for fcntl semaphores support) 
    286311  AC_TRY_RUN([#define MM_SEM_FCNTL 
     
    292317  AC_MSG_RESULT([$msg]) 
    293318 
     319dnl flock semaphore support 
    294320  AC_MSG_CHECKING(for flock semaphores support) 
    295321  AC_TRY_RUN([#define MM_SEM_FLOCK 
     
    301327  AC_MSG_RESULT([$msg]) 
    302328 
     329dnl Determine the best type 
    303330  AC_MSG_CHECKING(for best semaphores type) 
    304331  if test "$mm_sem_spinlock" = "yes"; then 
     
    329356  AC_MSG_RESULT([$msg]) 
    330357  if test "$msg" = "no" ; then 
    331     AC_MSG_WARN([eaccelerator cannot semaphores type, which is required]) 
     358    AC_MSG_ERROR([eaccelerator cannot semaphores type, which is required]) 
    332359  fi 
    333360