├── .gitignore ├── LICENSE ├── Makefile.in ├── README.markdown ├── c ├── Makefile.in ├── check_cherly.c ├── check_double_link.c ├── check_lru.c ├── cherly.c ├── cherly.h ├── cherly_drv.c ├── common.h ├── config.h ├── double_link.c ├── double_link.h ├── lru.c ├── lru.h └── suite.c ├── configure ├── configure.in ├── ebin └── cherly.app ├── erl ├── Makefile.in ├── cherly.erl └── cherly_app.erl ├── etest └── test_cherly.erl └── releases └── cherly.rel /.gitignore: -------------------------------------------------------------------------------- 1 | autom4te.cache/* 2 | c/Makefile 3 | erl/Makefile 4 | ebin/*.beam 5 | priv/*.so 6 | c/*.o 7 | config.log 8 | config.status 9 | c/test_suite 10 | releases/cherly-*/* -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | ---------------------------------------------------------------------------- 2 | "THE BEER-WARE LICENSE" (Revision 42): 3 | Cliff Moon wrote this project. As long as you retain this notice you 4 | can do whatever you want with this stuff. If we meet some day, and you think 5 | this stuff is worth it, you can buy me a beer in return Cliff Moon. 6 | ---------------------------------------------------------------------------- 7 | 8 | -------------------------------------------------------------------------------- /Makefile.in: -------------------------------------------------------------------------------- 1 | PACKAGE_NAME = @PACKAGE_NAME@ 2 | PACKAGE_VERSION = @PACKAGE_VERSION@ 3 | RELDIR = releases/$(PACKAGE_NAME)-$(PACKAGE_VERSION) 4 | 5 | ifeq ($(shell uname),Linux) 6 | ARCH = linux 7 | else 8 | ARCH = macosx 9 | endif 10 | 11 | all: 12 | (cd c;$(MAKE)) 13 | (cd erl;$(MAKE)) 14 | 15 | clean: 16 | (cd c;$(MAKE) clean) 17 | (cd erl;$(MAKE) clean) 18 | 19 | test: 20 | (cd c; $(MAKE) test) 21 | (cd erl; $(MAKE) test) 22 | 23 | install: all 24 | (cd c; $(MAKE) install) 25 | (cd erl; $(MAKE) install) 26 | 27 | debug: 28 | (cd c;$(MAKE) debug) 29 | (cd erl;$(MAKE) debug) 30 | 31 | release: all 32 | mkdir -p $(RELDIR) 33 | cp -r ebin $(RELDIR)/ 34 | cp -r priv $(RELDIR)/ 35 | mkdir -p $(RELDIR)/src 36 | cp -r erl/*.erl $(RELDIR)/src/ 37 | cp -r c/*.c $(RELDIR)/src 38 | cp -r c/*.h $(RELDIR)/src 39 | sed s/?VERSION/$(PACKAGE_VERSION)/ releases/cherly.rel > $(RELDIR)/cherly.rel 40 | sed s/?VERSION/$(PACKAGE_VERSION)/ ebin/cherly.app > $(RELDIR)/ebin/cherly.app 41 | cd $(RELDIR); erl -pa ./ebin -eval "systools:make_script(\"cherly\", [local])." -eval "systools:make_tar(\"cherly\")." -s erlang halt -------------------------------------------------------------------------------- /README.markdown: -------------------------------------------------------------------------------- 1 | Cherly 2 | ======= 3 | 4 | Cherly (sher-lee) is an in-VM caching library for Erlang. It is implemented as a linked in driver and the main lookup mechanism is Judy arrays. There's almost no copying or reallocation of binary data involved, so cherly should be blindingly fast. Cherly is designed for the needs of Dynomite, but it can live as a caching library in its own right. 5 | 6 | Surely you can't be serious? 7 | 8 | How To Use 9 | ======= 10 | 11 | {ok, C} = cherly:start(128), %start takes 1 argument, the maximum cache size in bytes 12 | cherly:put(C, "key", <<"value">>), %keys are strings and values are binaries or lists of binaries 13 | case cherly:get(C, "key") of 14 | not_found -> io:format("don't got it!~n"); 15 | {ok, Value} -> io:format("we got our value: ~p~n", [Value]) 16 | end, 17 | cherly:put(C, "key2", [<<"value1">>, <<"value2">>]), 18 | {ok, [Value1, Value2]} = cherly;get(C, "key2"), 19 | io:format("got back out ~p~n", [[Value1, Value2]]). 20 | 21 | Frequently Used Questions 22 | ======= 23 | 24 | * Why not use ETS to do this? 25 | 26 | > ETS is a fine hashtable, and plenty fast. However building an LRU around it proved surprisingly difficult. After playing around a bunch, the best way to go about it was to put the entire thing in a port driver. 27 | 28 | * How does the LRU work? 29 | 30 | > Right now it's a doubly linked list. Lookups cause a node in the list to get unlinked and sent to the head of the list. Ejecting items off of the LRU's tail happens when new keys come in and the cache is out of space. All these operations are O(1) which is rad. 31 | 32 | * Why does cherly just deal with binaries? 33 | 34 | > Cherly is very specific in its designed use case: storing possibly large binary values in memory with as little overhead as possible. Since I'm expecting that some binaries could be up to 1MB in size and possibly more, causing the ERTS to copy the actual bytes in and out of the port driver is unacceptable. Therefore cherly uses the outputv callback and the driver_outputv function in order to transfer binaries by reference instead of by value. This means that cherly does not need a slab allocator or anything silly like that. The binaries are already allocated. Cherly simply needs to increment the reference count and hang on to it for as long as needed. 35 | 36 | Dependencies 37 | ======= 38 | 39 | * Runtime 40 | 41 | Judy >= 1.0.4: http://judy.sourceforge.net/ 42 | Erlang >= R12B-3 43 | 44 | * Build (test) 45 | 46 | Check >= 0.9.5 http://check.sourceforge.net/ 47 | 48 | 49 | Installation 50 | ======== 51 | 52 | * From source: 53 | 54 | ./configure && make 55 | sudo make install 56 | 57 | * From a release tarball: 58 | 59 | sudo mv cherly-0.0.1-osx.tar.gz /usr/lib/erlang/releases/ 60 | erl -boot start_sasl -eval "release_handler:unpack_release(\"cherly-0.0.1-osx\")." -s erlang halt 61 | -------------------------------------------------------------------------------- /c/Makefile.in: -------------------------------------------------------------------------------- 1 | SHELL = /bin/sh 2 | VPATH = @srcdir@ 3 | 4 | top_srcdir = @top_srcdir@ 5 | srcdir = @srcdir@ 6 | prefix = @prefix@ 7 | exec_prefix = @exec_prefix@ 8 | bindir = $(exec_prefix)/bin 9 | infodir = $(prefix)/info 10 | libdir = $(prefix)/lib/gnudl 11 | mandir = $(prefix)/man/man1 12 | CFLAGS = $(CPPFLAGS) @CFLAGS@ @JUDY_CFLAGS@ 13 | 14 | ifeq ($(shell uname),Linux) 15 | ARCH = linux 16 | LDFLAGS = $(LDFLAGS_COMMON) -shared 17 | else 18 | ARCH = macosx 19 | LDFLAGS = $(LDFLAGS_COMMON) -dynamic -bundle -undefined suppress -flat_namespace 20 | endif 21 | 22 | CC = @CC@ 23 | CPPFLAGS = @CPPFLAGS@ 24 | LIBS = @LIBS@ 25 | TEST_SOURCES := $(wildcard check_*.c) 26 | TEST_OBJECTS := $(patsubst %.c,%.o,$(TEST_SOURCES)) 27 | UNDER_TEST := $(patsubst check_%.c,%.o,$(TEST_SOURCES)) 28 | PACKAGE_NAME = @PACKAGE_NAME@ 29 | PACKAGE_VERSION = @PACKAGE_VERSION@ 30 | 31 | OUTPUTFILES := $(patsubst %_drv.c, ../priv/%_drv.so, $(wildcard *_drv.c)) 32 | 33 | DEFS = -DHAVE_CONFIG_H 34 | 35 | ERLDIR = @ERLDIR@ 36 | 37 | 38 | all: $(OUTPUTFILES) 39 | 40 | debug: 41 | $(MAKE) DEBUG=-DDEBUG 42 | 43 | .SUFFIXES: .o .c .h 44 | 45 | ../priv/%_drv.so: %_drv.o cherly.o double_link.o lru.o 46 | mkdir -p ../priv 47 | $(CC) $(CFLAGS) $(DEFS) $(DEBUG) $(LDFLAGS) @JUDY_LIBS@ -o $@ $^ @LIBEI@ 48 | 49 | test_suite: suite.o $(TEST_OBJECTS) $(UNDER_TEST) 50 | $(CC) $(CFLAGS) $(DEFS) $(DEBUG) @JUDY_LIBS@ -lcheck -o $@ $^ @LIBEI@ 51 | 52 | test: test_suite 53 | $(MAKE) TEST=-DTEST 54 | ./test_suite 55 | 56 | test-dbg: test_suite 57 | $(MAKE) TEST=-DTEST 58 | gdb test_suite 59 | 60 | test_%.o: test_%.c %.o 61 | $(CC) $(CFLAGS) $(DEFS) $(DEBUG) -c $< 62 | 63 | .c.o: 64 | $(CC) $(CFLAGS) $(DEFS) $(DEBUG) -c $< 65 | 66 | clean: 67 | rm -rf *.o *.a $(OUTPUTFILES) 68 | 69 | install: 70 | install -d $(ERLDIR)/lib/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/priv 71 | cp -r `pwd`/../priv $(ERLDIR)/lib/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/ 72 | 73 | package: 74 | install -d `pwd`/../.pkgtmp/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/priv 75 | cp -r `pwd`/../priv/* `pwd`/../.pkgtmp/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/priv -------------------------------------------------------------------------------- /c/check_cherly.c: -------------------------------------------------------------------------------- 1 | #include "cherly.h" 2 | #include 3 | #include "common.h" 4 | 5 | START_TEST(basic_get_and_put) 6 | { cherly_t cherly; 7 | char* stuff = "stuff"; 8 | 9 | cherly_init(&cherly, 0, 120); 10 | fail_unless(NULL == cherly_get(&cherly, "noexist", 7)); 11 | cherly_put(&cherly, "exist", 5, stuff, 5, NULL); 12 | fail_unless(NULL == cherly_get(&cherly, "noexist", 7)); 13 | fail_unless(stuff == cherly_get(&cherly, "exist", 5)); 14 | cherly_destroy(&cherly); 15 | } 16 | END_TEST 17 | 18 | START_TEST(put_already_there) 19 | { 20 | cherly_t cherly; 21 | char* stuff = "stuff"; 22 | char* otherstuff = "blah"; 23 | 24 | cherly_init(&cherly, 0, 120); 25 | cherly_put(&cherly, "exist", 5, stuff, 5, NULL); 26 | fail_unless(10 == cherly_size(&cherly)); 27 | cherly_put(&cherly, "exist", 5, otherstuff, 4, NULL); 28 | cherly_destroy(&cherly); 29 | } 30 | END_TEST 31 | 32 | START_TEST(put_beyond_limit) 33 | { 34 | cherly_t cherly; 35 | 36 | cherly_init(&cherly, 0, 12); 37 | cherly_put(&cherly, "one", 3, "one", 3, NULL); 38 | cherly_put(&cherly, "two", 3, "two", 3, NULL); 39 | cherly_put(&cherly, "three", 5, "three", 5, NULL); 40 | fail_unless(1 == cherly_items_length(&cherly), "cherly length was %d", cherly_items_length(&cherly)); 41 | fail_unless(10 == cherly_size(&cherly), "cherly size was %d", cherly_size(&cherly)); 42 | } 43 | END_TEST 44 | 45 | Suite * cherly_suite(void) { 46 | Suite *s = suite_create("cherly.c"); 47 | 48 | /* Core test case */ 49 | TCase *tc_core = tcase_create("Core"); 50 | tcase_add_test(tc_core, basic_get_and_put); 51 | tcase_add_test(tc_core, put_already_there); 52 | tcase_add_test(tc_core, put_beyond_limit); 53 | suite_add_tcase(s, tc_core); 54 | 55 | return s; 56 | } -------------------------------------------------------------------------------- /c/check_double_link.c: -------------------------------------------------------------------------------- 1 | #include "double_link.h" 2 | #include "stdlib.h" 3 | #include 4 | #include "common.h" 5 | 6 | START_TEST(create_and_remove) 7 | { 8 | d_list_t *list; 9 | d_node_t *node; 10 | int i; 11 | 12 | list = d_list_create(); 13 | node = d_node_create(NULL); 14 | fail_unless(node != NULL, NULL); 15 | d_list_push(list, node); 16 | fail_unless(1 == d_list_size(list), NULL); 17 | 18 | for(i=0; i<5; i++) { 19 | node = d_node_create(NULL); 20 | d_list_push(list, node); 21 | } 22 | fail_unless(6 == d_list_size(list), NULL); 23 | } 24 | END_TEST 25 | 26 | Suite * double_link_suite(void) { 27 | Suite *s = suite_create ("double_link.c"); 28 | 29 | /* Core test case */ 30 | TCase *tc_core = tcase_create ("Core"); 31 | tcase_add_test (tc_core, create_and_remove); 32 | suite_add_tcase (s, tc_core); 33 | 34 | return s; 35 | } -------------------------------------------------------------------------------- /c/check_lru.c: -------------------------------------------------------------------------------- 1 | #include "lru.h" 2 | #include "stdlib.h" 3 | #include "stdio.h" 4 | #include 5 | #include "common.h" 6 | 7 | START_TEST(create_and_insert) { 8 | lru_t *lru; 9 | 10 | lru = lru_create(); 11 | fail_unless(NULL != lru->list); 12 | lru_insert(lru, "key", 3, "value", 5, NULL); 13 | fail_unless(NULL != lru->list->head); 14 | lru_destroy(lru); 15 | } 16 | END_TEST 17 | 18 | START_TEST(touch) { 19 | lru_t *lru; 20 | lru_item_t * one; 21 | 22 | lru = lru_create(); 23 | one = lru_insert(lru, "one", 3, "one", 3, NULL); 24 | lru_insert(lru, "two", 3, "two", 3, NULL); 25 | lru_insert(lru, "three", 5, "three", 5, NULL); 26 | lru_touch(lru, one); 27 | fail_unless(one == (lru_item_t*)lru->list->head->data); 28 | lru_destroy(lru); 29 | } 30 | END_TEST 31 | 32 | START_TEST(eject_one) { 33 | lru_t *lru; 34 | int ejected = 0; 35 | 36 | lru = lru_create(); 37 | lru_insert(lru, "one", 3, "one", 3, NULL); 38 | lru_insert(lru, "two", 3, "two", 3, NULL); 39 | lru_insert(lru, "three", 5, "three", 5, NULL); 40 | ejected = lru_eject_by_size(lru, 3, NULL, NULL); 41 | dprintf("ejected %d\n", ejected); 42 | fail_unless(ejected > 0); 43 | } 44 | END_TEST 45 | 46 | START_TEST(eject_multiple) { 47 | lru_t *lru; 48 | int ejected = 0; 49 | lru_item_t *three; 50 | mark_point(); 51 | lru = lru_create(); 52 | mark_point(); 53 | lru_insert(lru, "one", 3, "one", 3, NULL); 54 | lru_insert(lru, "two", 3, "two", 3, NULL); 55 | three = lru_insert(lru, "three", 5, "three", 5, NULL); 56 | ejected = lru_eject_by_size(lru, 12, NULL, NULL); 57 | dprintf("test ejected %d\n", ejected); 58 | fail_unless((lru_item_t*)lru->list->head->data == three); 59 | fail_unless(ejected == 12); 60 | lru_destroy(lru); 61 | } 62 | END_TEST 63 | 64 | Suite * lru_suite(void) { 65 | Suite *s = suite_create("lru.c"); 66 | 67 | TCase *tc_core = tcase_create("Core"); 68 | tcase_add_test(tc_core, create_and_insert); 69 | tcase_add_test(tc_core, touch); 70 | tcase_add_test(tc_core, eject_one); 71 | tcase_add_test(tc_core, eject_multiple); 72 | suite_add_tcase(s, tc_core); 73 | 74 | return s; 75 | } -------------------------------------------------------------------------------- /c/cherly.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "cherly.h" 3 | #include "common.h" 4 | 5 | static void cherly_eject_callback(cherly_t *cherly, char *key, int length); 6 | 7 | void cherly_init(cherly_t *cherly, int options, unsigned long max_size) { 8 | cherly->judy = NULL; 9 | cherly->lru = lru_create(); 10 | cherly->size = 0; 11 | cherly->items_length = 0; 12 | cherly->max_size = max_size; 13 | } 14 | 15 | // node -> item -> value 16 | 17 | void cherly_put(cherly_t *cherly, char *key, int length, void *value, int size, DestroyCallback destroy) { 18 | PWord_t PValue; 19 | lru_item_t * item; 20 | 21 | dprintf("inserting with keylen %d vallen %d\n", length, size); 22 | JHSG(PValue, cherly->judy, key, length); 23 | if (NULL != PValue) { 24 | item = (lru_item_t*)*PValue; 25 | dprintf("removing an existing value\n"); 26 | cherly_remove(cherly, lru_item_key(item), lru_item_keylen(item)); 27 | } 28 | 29 | if (cherly->size + size > cherly->max_size) { 30 | dprintf("projected new size %d is more than max %d\n", cherly->size + size, cherly->max_size); 31 | cherly->size -= lru_eject_by_size(cherly->lru, (length + size) - (cherly->max_size - cherly->size), (EjectionCallback)cherly_eject_callback, cherly); 32 | } 33 | 34 | item = lru_insert(cherly->lru, key, length, value, size, destroy); 35 | 36 | JHSI(PValue, cherly->judy, key, length); 37 | *PValue = (Word_t)item; 38 | cherly->size += lru_item_size(item); 39 | dprintf("new cherly size is %d\n", cherly->size); 40 | cherly->items_length++; 41 | } 42 | 43 | void * cherly_get(cherly_t *cherly, char *key, int length) { 44 | PWord_t PValue; 45 | lru_item_t * item; 46 | 47 | JHSG(PValue, cherly->judy, key, length); 48 | 49 | if (NULL == PValue) { 50 | return NULL; 51 | } else { 52 | item = (lru_item_t *)*PValue; 53 | lru_touch(cherly->lru, item); 54 | return lru_item_value(item); 55 | } 56 | } 57 | 58 | static void cherly_eject_callback(cherly_t *cherly, char *key, int length) { 59 | PWord_t PValue; 60 | lru_item_t *item; 61 | int ret; 62 | 63 | JHSG(PValue, cherly->judy, key, length); 64 | if (NULL == PValue) { 65 | return; 66 | } 67 | item = (lru_item_t*)*PValue; 68 | 69 | JHSD(ret, cherly->judy, key, length); 70 | if (ret) { 71 | cherly->items_length--; 72 | cherly->size -= lru_item_size(item); 73 | } 74 | } 75 | 76 | void cherly_remove(cherly_t *cherly, char *key, int length) { 77 | PWord_t PValue; 78 | int ret; 79 | lru_item_t *item; 80 | 81 | JHSG(PValue, cherly->judy, key, length); 82 | 83 | if (NULL == PValue) { 84 | return; 85 | } 86 | 87 | item = (lru_item_t *)*PValue; 88 | lru_remove_and_destroy(cherly->lru, item); 89 | cherly->size -= lru_item_size(item); 90 | cherly->items_length--; 91 | JHSD(ret, cherly->judy, key, length); 92 | } 93 | 94 | 95 | 96 | void cherly_destroy(cherly_t *cherly) { 97 | Word_t bytes; 98 | dprintf("judy %p\n", cherly->judy); 99 | JHSFA(bytes, cherly->judy); 100 | dprintf("called JHSFA\n"); 101 | lru_destroy(cherly->lru); 102 | dprintf("lru destroy\n"); 103 | } -------------------------------------------------------------------------------- /c/cherly.h: -------------------------------------------------------------------------------- 1 | #ifndef __CHERLY__ 2 | #define __CHERLY__ 3 | 4 | #include 5 | #include "lru.h" 6 | 7 | #define cherly_size(cherly) ((cherly)->size) 8 | #define cherly_items_length(cherly) ((cherly)->items_length) 9 | #define cherly_max_size(cherly) ((cherly)->max_size) 10 | 11 | typedef struct _cherly_t { 12 | Pvoid_t judy; 13 | lru_t *lru; 14 | unsigned long size; 15 | unsigned long items_length; 16 | unsigned long max_size; 17 | } cherly_t; 18 | 19 | void cherly_init(cherly_t *cherly, int options, unsigned long max_size); 20 | void * cherly_get(cherly_t *cherly, char * key, int length); 21 | void cherly_put(cherly_t *cherly, char * key, int length, void *value, int size, DestroyCallback); 22 | void cherly_remove(cherly_t *cherly, char * key, int length); 23 | void cherly_destroy(cherly_t *cherly); 24 | 25 | #endif -------------------------------------------------------------------------------- /c/cherly_drv.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include "cherly.h" 7 | #include "common.h" 8 | 9 | #define read_int32(s) ((((int)(((unsigned char*) (s))[0])) << 24) | \ 10 | (((int)(((unsigned char*) (s))[1])) << 16) | \ 11 | (((int)(((unsigned char*) (s))[2])) << 8) | \ 12 | (((int)(((unsigned char*) (s))[3])))) 13 | 14 | #define INIT 'i' 15 | #define GET 'g' 16 | #define PUT 'p' 17 | #define REMOVE 'r' 18 | #define SIZE 's' 19 | #define ITEMS 't' 20 | 21 | static ErlDrvData start(ErlDrvPort port, char *cmd); 22 | static void stop(ErlDrvData handle); 23 | static void outputv(ErlDrvData handle, ErlIOVec *ev); 24 | static void destroy(char * key, int keylen, void * value, int vallen); 25 | static void send_long(ErlDrvPort port, long num); 26 | static void send_atom(ErlDrvPort port, char* atom); 27 | static void print_ev(ErlIOVec *vec); 28 | 29 | ErlIOVec* copy_io_vec(ErlIOVec *src); 30 | char* io_vec2str(ErlIOVec *src, int skip, int length); 31 | 32 | static ErlDrvEntry cherly_driver_entry = { 33 | NULL, /* init */ 34 | start, 35 | stop, 36 | NULL, /* output */ 37 | NULL, /* ready_input */ 38 | NULL, /* ready_output */ 39 | "cherly_drv", /* the name of the driver */ 40 | NULL, /* finish */ 41 | NULL, /* handle */ 42 | NULL, /* control */ 43 | NULL, /* timeout */ 44 | outputv, /* outputv */ 45 | NULL, /* ready_async */ 46 | NULL, /* flush */ 47 | NULL, /* call */ 48 | NULL, /* event */ 49 | ERL_DRV_EXTENDED_MARKER, /* ERL_DRV_EXTENDED_MARKER */ 50 | ERL_DRV_EXTENDED_MAJOR_VERSION, /* ERL_DRV_EXTENDED_MAJOR_VERSION */ 51 | ERL_DRV_EXTENDED_MAJOR_VERSION, /* ERL_DRV_EXTENDED_MINOR_VERSION */ 52 | ERL_DRV_FLAG_USE_PORT_LOCKING /* ERL_DRV_FLAGs */ 53 | }; 54 | 55 | typedef struct _cherly_drv_t { 56 | ErlDrvPort port; 57 | cherly_t* cherly; 58 | } cherly_drv_t; 59 | 60 | DRIVER_INIT(cherly_driver) { 61 | return &cherly_driver_entry; 62 | } 63 | 64 | static ErlDrvData start(ErlDrvPort port, char *cmd) { 65 | cherly_drv_t *cherly_drv = (cherly_drv_t*)driver_alloc(sizeof(cherly_drv_t)); 66 | cherly_drv->port = port; 67 | cherly_drv->cherly = driver_alloc(sizeof(cherly_t)); 68 | dprintf("starting a new cherly\n"); 69 | return (ErlDrvData) cherly_drv; 70 | } 71 | 72 | static void stop(ErlDrvData handle) { 73 | cherly_drv_t *cherly_drv; 74 | dprintf("handle %p\n", handle); 75 | cherly_drv = (cherly_drv_t *)handle; 76 | cherly_destroy(cherly_drv->cherly); 77 | driver_free(cherly_drv->cherly); 78 | driver_free(cherly_drv); 79 | } 80 | 81 | static void init(cherly_drv_t *cherly_drv, ErlIOVec *ev) { 82 | SysIOVec *iov; 83 | int index = 0; 84 | long options; 85 | unsigned long max_size; 86 | 87 | iov = &ev->iov[1]; 88 | dprintf("ev->vsize %d\n", ev->vsize); 89 | dprintf("iov %p\n", iov); 90 | dprintf("iov base %p\n", iov->iov_base); 91 | ei_decode_version(&iov->iov_base[1], &index, NULL); 92 | ei_decode_tuple_header(&iov->iov_base[1], &index, NULL); 93 | ei_decode_long(&iov->iov_base[1], &index, &options); 94 | ei_decode_ulong(&iov->iov_base[1], &index, &max_size); 95 | dprintf("cherly init %d\n", max_size); 96 | cherly_init(cherly_drv->cherly, options, max_size); 97 | } 98 | 99 | static void get(cherly_drv_t *cherly_drv, ErlIOVec *ev) { 100 | char *key; 101 | ErlIOVec *value; 102 | int length = 0; 103 | 104 | print_ev(ev); 105 | 106 | length = read_int32(&(ev->binv[1]->orig_bytes[1])); 107 | key = io_vec2str(ev, 5, length); 108 | dprintf("key = %c%c%c\n", key[0], key[1], key[2]); 109 | 110 | value = (ErlIOVec *) cherly_get(cherly_drv->cherly, key, length); 111 | dprintf("get value %p\n", value); 112 | dprintf("ev %p\n", ev); 113 | driver_free(key); 114 | dprintf("freed\n"); 115 | if (NULL != value) { 116 | print_ev(value); 117 | driver_outputv(cherly_drv->port, "", 0, value, 0); 118 | } else { 119 | dprintf("value was NULL\n"); 120 | send_atom(cherly_drv->port, "not_found"); 121 | } 122 | } 123 | 124 | static void put(cherly_drv_t *cherly_drv, ErlIOVec *ev) { 125 | ErlDrvBinary *bin = NULL; 126 | char* copied_key; 127 | ErlIOVec *copied_vec; 128 | int length = 0; 129 | int v=0; 130 | 131 | print_ev(ev); 132 | dprintf("ev size %d\n", ev->size); 133 | dprintf("iovec %p\n", ev); 134 | //need to copy the key here 135 | while (NULL == bin && v < ev->vsize) { 136 | dprintf("v %d\n", v); 137 | bin = ev->binv[v++]; 138 | } 139 | 140 | dprintf("v is %d\n", v); 141 | for(v = 0; v < ev->vsize; v++) { 142 | if (NULL != ev->binv[v]) { 143 | driver_binary_inc_refc(ev->binv[v]); 144 | } 145 | } 146 | length = read_int32(&bin->orig_bytes[1]); 147 | dprintf("length is %d\n", length); 148 | copied_key = io_vec2str(ev, 5, length); 149 | dprintf("here\n"); 150 | copied_vec = copy_io_vec(ev); 151 | dprintf("copied_key %p\n", copied_key); 152 | cherly_put(cherly_drv->cherly, copied_key, length, copied_vec, copied_vec->size, &destroy); 153 | } 154 | 155 | static void chd_remove(cherly_drv_t *cherly_drv, ErlIOVec *ev) { 156 | char * key; 157 | int length; 158 | 159 | length = read_int32(&(ev->binv[1]->orig_bytes[1])); 160 | key = io_vec2str(ev, 5, length); 161 | 162 | cherly_remove(cherly_drv->cherly, key, length); 163 | driver_free(key); 164 | } 165 | 166 | static void size(cherly_drv_t *cherly_drv, ErlIOVec *ev) { 167 | int size = cherly_size(cherly_drv->cherly); 168 | send_long(cherly_drv->port, size); 169 | } 170 | 171 | static void items(cherly_drv_t *cherly_drv, ErlIOVec *ev) { 172 | int length = cherly_items_length(cherly_drv->cherly); 173 | send_long(cherly_drv->port, length); 174 | } 175 | 176 | static void outputv(ErlDrvData handle, ErlIOVec *ev) { 177 | cherly_drv_t *cherly_drv = (cherly_drv_t *)handle; 178 | char command; 179 | 180 | //command will come thru in the first binary 181 | command = ev->iov[1].iov_base[0]; 182 | 183 | switch(command) { 184 | case INIT: 185 | init(cherly_drv, ev); 186 | break; 187 | case GET: 188 | get(cherly_drv, ev); 189 | break; 190 | case PUT: 191 | put(cherly_drv, ev); 192 | break; 193 | case REMOVE: 194 | chd_remove(cherly_drv, ev); 195 | break; 196 | case SIZE: 197 | size(cherly_drv, ev); 198 | break; 199 | case ITEMS: 200 | items(cherly_drv, ev); 201 | break; 202 | } 203 | } 204 | 205 | static void print_ev(ErlIOVec *ev) { 206 | #ifdef DEBUG 207 | int i=0; 208 | char *tmp; 209 | ErlDrvBinary *bin; 210 | if (NULL == ev) { 211 | dprintf("NULL"); 212 | return; 213 | } 214 | dprintf("["); 215 | for(i=0; ivsize; i++) { 216 | bin = ev->binv[i]; 217 | if (NULL == bin) { 218 | dprintf("NULL "); 219 | continue; 220 | } 221 | if (bin->orig_size == 0) { 222 | dprintf("\"\" "); 223 | } else { 224 | tmp = malloc(sizeof(char) * (bin->orig_size+1)); 225 | strncpy(tmp, bin->orig_bytes, bin->orig_size); 226 | dprintf("\"%s\" ", tmp); 227 | free(tmp); 228 | } 229 | } 230 | dprintf("]\n"); 231 | #endif 232 | } 233 | 234 | static void send_long(ErlDrvPort port, long num) { 235 | ei_x_buff x; 236 | 237 | ei_x_new_with_version(&x); 238 | ei_x_encode_long(&x, num); 239 | driver_output(port, x.buff, x.index); 240 | ei_x_free(&x); 241 | } 242 | 243 | static void send_atom(ErlDrvPort port, char *atom) { 244 | ErlDrvTermData spec[] = {ERL_DRV_PORT, driver_mk_port(port), ERL_DRV_ATOM, driver_mk_atom(atom), ERL_DRV_TUPLE, 2}; 245 | driver_output_term(port, spec, 6); 246 | } 247 | 248 | static void destroy(char * key, int keylen, void * value, int vallen) { 249 | ErlIOVec* ev = (ErlIOVec*)value; 250 | int i; 251 | driver_free(key); 252 | for(i=0; i < ev->vsize; i++) { 253 | if (NULL != ev->binv[i]) { 254 | driver_free_binary(ev->binv[i]); 255 | } 256 | } 257 | driver_free(ev->iov); 258 | driver_free(ev->binv); 259 | driver_free(ev); 260 | } 261 | 262 | ErlIOVec* copy_io_vec(ErlIOVec *ev) { 263 | ErlIOVec *to = driver_alloc(sizeof(ErlIOVec)); 264 | ErlDrvBinary *bin; 265 | int i; 266 | 267 | dprintf("to %p\n", to); 268 | dprintf("ev %p\n", ev); 269 | 270 | to->iov = driver_alloc(sizeof(SysIOVec) * ev->vsize); 271 | to->vsize = ev->vsize; 272 | to->size = ev->size; 273 | to->binv = driver_alloc(sizeof(ErlDrvBinary*) * ev->vsize); 274 | for(i=0; i < ev->vsize; i++) { 275 | bin = ev->binv[i]; 276 | if (NULL == bin) { 277 | to->binv[0] = NULL; 278 | to->iov[i].iov_len = 0; 279 | to->iov[i].iov_base = NULL; 280 | } else { 281 | to->binv[i] = bin; 282 | to->iov[i].iov_len = bin->orig_size; 283 | to->iov[i].iov_base = bin->orig_bytes; 284 | } 285 | } 286 | return to; 287 | // ErlIOVec *value = driver_alloc(sizeof(ErlIOVec)); 288 | // value->iov = driver_alloc(sizeof(SysIOVec) * (ev->vsize-3)); //will this work 289 | // // value->iov = NULL; 290 | // value->vsize = ev->vsize-3; 291 | // value->size = 0; 292 | // //we need to copy this to the new vec 293 | // binv = driver_alloc(sizeof(ErlDrvBinary*) * (ev->vsize-3)); 294 | // dprintf("ev->vsize %d\n", ev->vsize); 295 | // for(i=3; i < ev->vsize; i++) { 296 | // bin = ev->binv[i]; 297 | // value->size += bin->orig_size; 298 | // binv[i-3] = bin; 299 | // driver_binary_inc_refc(bin); 300 | // value->iov[i-3].iov_len = bin->orig_size; 301 | // value->iov[i-3].iov_base = bin->orig_bytes; 302 | // } 303 | // value->binv = binv; 304 | } 305 | 306 | char* io_vec2str(ErlIOVec *src, int skip, int length) { 307 | char *target; 308 | int v = 0; 309 | int i = 0; 310 | int pos = 0; 311 | ErlDrvBinary * bin; 312 | 313 | if (skip > src->size) { 314 | dprintf("returning null\n"); 315 | return NULL; 316 | } 317 | // target = driver_alloc(sizeof(char) * length); 318 | // driver_free(target); 319 | target = driver_alloc(sizeof(char) * length); 320 | dprintf("target %p\n", target); 321 | //skip whole binaries 322 | while(v < src->vsize) { 323 | bin = src->binv[v]; 324 | if (NULL == bin) { 325 | v++; 326 | continue; 327 | } 328 | if (bin->orig_size >= skip) { 329 | dprintf("skip size is smaller than the bin\n"); 330 | break; 331 | } else { 332 | v++; 333 | skip -= bin->orig_size; 334 | } 335 | } 336 | i = skip; 337 | 338 | while(v < src->vsize && length > 0) { 339 | bin = src->binv[v]; 340 | dprintf("v is %d\n", v); 341 | if (length > (bin->orig_size - skip)) { 342 | dprintf("copying %d bytes. length is %d\n", bin->orig_size - skip, length); 343 | memcpy(&target[pos], &bin->orig_bytes[skip], bin->orig_size - skip); 344 | length -= bin->orig_size - skip; 345 | pos += bin->orig_size - skip; 346 | } else { 347 | dprintf("copying %d bytes from %d. length is %d. pos is %d\n", length, skip, length, pos); 348 | memcpy(&target[pos], &bin->orig_bytes[skip], length); 349 | dprintf("target = %c%c%c\n", target[0], target[1], target[2]); 350 | pos += length; 351 | break; 352 | } 353 | skip = 0; 354 | } 355 | return target; 356 | } -------------------------------------------------------------------------------- /c/common.h: -------------------------------------------------------------------------------- 1 | #ifndef __COMMON_H__ 2 | #define __COMMON_H__ 3 | 4 | #ifdef DEBUG 5 | #define dprintf(format, args...) printf (format , ## args) 6 | #else 7 | #define dprintf(format, args...) 8 | #endif 9 | 10 | #endif -------------------------------------------------------------------------------- /c/config.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moonpolysoft/cherly/d0bd62099fb1f38375ad1223204dc699c434dee2/c/config.h -------------------------------------------------------------------------------- /c/double_link.c: -------------------------------------------------------------------------------- 1 | #include "double_link.h" 2 | #include 3 | #include "common.h" 4 | 5 | d_list_t * d_list_create() { 6 | d_list_t * list = malloc(sizeof(d_list_t)); 7 | list->head = NULL; 8 | list->tail = NULL; 9 | list->size = 0; 10 | return list; 11 | } 12 | 13 | void d_list_destroy(d_list_t *list) { 14 | d_node_t * node = list->head; 15 | d_node_t * tmp = NULL; 16 | while (NULL != node) { 17 | tmp = node->next; 18 | d_node_destroy(node); 19 | node = tmp; 20 | } 21 | free(list); 22 | } 23 | 24 | void d_list_push(d_list_t *list, d_node_t *node) { 25 | if (NULL == list->head && NULL == list->tail) { 26 | list->head = node; 27 | list->tail = node; 28 | node->previous = NULL; 29 | node->next = NULL; 30 | } else { 31 | node->previous = NULL; 32 | list->head->previous = node; 33 | node->next = list->head; 34 | list->head = node; 35 | } 36 | list->size++; 37 | } 38 | 39 | d_node_t * d_list_pop(d_list_t *list) { 40 | d_node_t * node = list->head; 41 | if (NULL == node) { 42 | return NULL; 43 | } 44 | 45 | list->head = node->next; 46 | list->size--; 47 | if (NULL != list->head) { 48 | list->head->previous = NULL; 49 | } else { 50 | list->tail = NULL; 51 | } 52 | return node; 53 | } 54 | 55 | void d_list_unshift(d_list_t *list, d_node_t *node) { 56 | if (NULL == list->head && NULL == list->tail) { 57 | list->head = node; 58 | list->tail = node; 59 | node->previous = NULL; 60 | node->next = NULL; 61 | } else { 62 | node->previous = list->tail; 63 | list->tail->next = node; 64 | node->next = NULL; 65 | list->tail = node; 66 | } 67 | list->size++; 68 | } 69 | 70 | d_node_t * d_list_shift(d_list_t *list) { 71 | d_node_t * node = list->tail; 72 | if (NULL == node) { 73 | return NULL; 74 | } 75 | 76 | list->tail = node->previous; 77 | list->size--; 78 | if (NULL != list->tail) { 79 | list->tail->next = NULL; 80 | } else { 81 | list->head = NULL; 82 | } 83 | return node; 84 | } 85 | 86 | void d_list_remove(d_list_t *list, d_node_t *node) { 87 | d_node_t *previous; 88 | d_node_t *next; 89 | 90 | if (list->head == node) { 91 | d_list_pop(list); 92 | return; 93 | } else if (list->tail == node) { 94 | d_list_shift(list); 95 | return; 96 | } 97 | 98 | previous = node->previous; 99 | next = node->next; 100 | 101 | node->previous = NULL; 102 | node->next = NULL; 103 | 104 | if (NULL != previous) { 105 | previous->next = next; 106 | } 107 | 108 | if (NULL != next) { 109 | next->previous = previous; 110 | } 111 | } 112 | 113 | d_node_t * d_node_create(void *data) { 114 | d_node_t * node; 115 | 116 | node = malloc(sizeof(d_node_t)); 117 | node->previous = NULL; 118 | node->next = NULL; 119 | node->data = data; 120 | 121 | return node; 122 | } 123 | 124 | void d_node_destroy(d_node_t * node) { 125 | free(node); 126 | } -------------------------------------------------------------------------------- /c/double_link.h: -------------------------------------------------------------------------------- 1 | #ifndef __DOUBLE_LINK_H__ 2 | #define __DOUBLE_LINK_H__ 3 | 4 | typedef struct _d_node_t { 5 | struct _d_node_t * previous; 6 | struct _d_node_t * next; 7 | void * data; 8 | } d_node_t; 9 | 10 | typedef struct _d_list_t { 11 | d_node_t * head; 12 | d_node_t * tail; 13 | unsigned long size; 14 | } d_list_t; 15 | 16 | #define d_list_size(list) ((list)->size) 17 | 18 | 19 | d_list_t * d_list_create(); 20 | void d_list_destroy(d_list_t * list); 21 | void d_list_push(d_list_t *list, d_node_t *node); 22 | d_node_t* d_list_pop(d_list_t *list); 23 | void d_list_unshift(d_list_t *list, d_node_t *node); 24 | d_node_t* d_list_shift(d_list_t *list); 25 | void d_list_remove(d_list_t *list, d_node_t *node); 26 | 27 | d_node_t * d_node_create(void * data); 28 | void d_node_destroy(d_node_t* node); 29 | #endif -------------------------------------------------------------------------------- /c/lru.c: -------------------------------------------------------------------------------- 1 | #include "lru.h" 2 | #include "double_link.h" 3 | #include 4 | #include "common.h" 5 | 6 | static void lru_destroy_item(lru_item_t *item); 7 | 8 | lru_t * lru_create() { 9 | lru_t * lru = malloc(sizeof(lru_t)); 10 | lru->list = d_list_create(); 11 | return lru; 12 | } 13 | 14 | void lru_destroy(lru_t *lru) { 15 | d_node_t *node; 16 | lru_item_t *item; 17 | 18 | node = lru->list->head; 19 | while (NULL != node) { 20 | item = (lru_item_t*)node->data; 21 | lru_destroy_item(item); 22 | 23 | node = node->next; 24 | } 25 | 26 | d_list_destroy(lru->list); 27 | free(lru); 28 | } 29 | 30 | int lru_eject_by_size(lru_t *lru, int size, EjectionCallback eject, void * container) { 31 | int ejected = 0; 32 | lru_item_t *item; 33 | d_node_t *node; 34 | d_node_t *next; 35 | 36 | dprintf("ejecting %d bytes\n", size); 37 | 38 | while(ejected < size) { 39 | node = d_list_shift(lru->list); 40 | if (NULL == node) { 41 | break; 42 | } 43 | item = (lru_item_t*)node->data; 44 | ejected += lru_item_size(item); 45 | if (NULL != eject) { 46 | (*eject)(container, item->key, item->keylen); 47 | } 48 | lru_destroy_item(item); 49 | next = node->next; 50 | d_node_destroy(node); 51 | node = next; 52 | } 53 | return ejected; 54 | } 55 | 56 | lru_item_t * lru_insert(lru_t *lru, char* key, int keylen, void * value, int size, DestroyCallback destroy) { 57 | lru_item_t *item; 58 | 59 | item = malloc(sizeof(lru_item_t)); 60 | item->key = key; 61 | item->keylen = keylen; 62 | item->value = value; 63 | item->vallen = size; 64 | item->destroy = destroy; 65 | item->node = d_node_create(item); 66 | d_list_push(lru->list, item->node); 67 | return item; 68 | } 69 | 70 | void lru_touch(lru_t *lru, lru_item_t *item) { 71 | d_list_remove(lru->list, item->node); 72 | d_list_push(lru->list, item->node); 73 | } 74 | 75 | void lru_remove_and_destroy(lru_t *lru, lru_item_t *item) { 76 | d_list_remove(lru->list, item->node); 77 | d_node_destroy(item->node); 78 | lru_destroy_item(item); 79 | } 80 | 81 | static void lru_destroy_item(lru_item_t *item) { 82 | if (NULL != item->destroy) { 83 | (*(item->destroy))(item->key, item->keylen, item->value, item->vallen); 84 | } 85 | free(item); 86 | } -------------------------------------------------------------------------------- /c/lru.h: -------------------------------------------------------------------------------- 1 | #ifndef __LRU__ 2 | #define __LRU__ 3 | 4 | #include "double_link.h" 5 | 6 | 7 | //the destroy callback, this is needed to free memory for shit 8 | typedef void (*DestroyCallback)(char*, int, void*, int); 9 | 10 | //this is the callback for LRU ejection, so that upper layers can cleanup 11 | //first arg is the containing struct. can this be cleaner? 12 | typedef void (*EjectionCallback)(void*, char*, int); 13 | 14 | typedef struct _lru_t { 15 | d_list_t *list; 16 | } lru_t; 17 | 18 | typedef struct _lru_item_t { 19 | char * key; 20 | int keylen; 21 | void * value; 22 | int vallen; 23 | d_node_t * node; 24 | DestroyCallback destroy; 25 | } lru_item_t; 26 | 27 | #define lru_item_key(item) ((item)->key) 28 | #define lru_item_keylen(item) ((item)->keylen) 29 | #define lru_item_value(item) ((item)->value) 30 | #define lru_item_vallen(item) ((item)->vallen) 31 | #define lru_item_size(item) (lru_item_keylen(item) + lru_item_vallen(item)) 32 | 33 | lru_t * lru_create(); 34 | void lru_destroy(lru_t *lru); 35 | int lru_eject_by_size(lru_t *lru, int size, EjectionCallback cb, void * container); 36 | lru_item_t * lru_insert(lru_t *lru, char* key, int keylen, void * value, int size, DestroyCallback destroy); 37 | void lru_touch(lru_t *lru, lru_item_t *item); 38 | void lru_remove_and_destroy(lru_t *lru, lru_item_t *item); 39 | 40 | #endif -------------------------------------------------------------------------------- /c/suite.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | Suite * cherly_suite(); 6 | Suite * double_link_suite(); 7 | Suite * lru_suite(); 8 | Suite * cherly_drv_suite(); 9 | 10 | int main (void) { 11 | int number_failed; 12 | 13 | SRunner *sr = srunner_create(cherly_suite()); 14 | srunner_add_suite(sr, double_link_suite()); 15 | srunner_add_suite(sr, lru_suite()); 16 | // srunner_add_suite(sr, cherly_drv_suite()); 17 | 18 | srunner_run_all(sr, CK_NORMAL); 19 | number_failed = srunner_ntests_failed(sr); 20 | srunner_free(sr); 21 | return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 22 | } 23 | -------------------------------------------------------------------------------- /configure: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Guess values for system-dependent variables and create Makefiles. 3 | # Generated by GNU Autoconf 2.60 for cherly 0.0.1. 4 | # 5 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 6 | # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 7 | # This configure script is free software; the Free Software Foundation 8 | # gives unlimited permission to copy, distribute and modify it. 9 | ## --------------------- ## 10 | ## M4sh Initialization. ## 11 | ## --------------------- ## 12 | 13 | # Be Bourne compatible 14 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 15 | emulate sh 16 | NULLCMD=: 17 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which 18 | # is contrary to our usage. Disable this feature. 19 | alias -g '${1+"$@"}'='"$@"' 20 | setopt NO_GLOB_SUBST 21 | else 22 | case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac 23 | fi 24 | BIN_SH=xpg4; export BIN_SH # for Tru64 25 | DUALCASE=1; export DUALCASE # for MKS sh 26 | 27 | 28 | # PATH needs CR 29 | # Avoid depending upon Character Ranges. 30 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' 31 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 32 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS 33 | as_cr_digits='0123456789' 34 | as_cr_alnum=$as_cr_Letters$as_cr_digits 35 | 36 | # The user is always right. 37 | if test "${PATH_SEPARATOR+set}" != set; then 38 | echo "#! /bin/sh" >conf$$.sh 39 | echo "exit 0" >>conf$$.sh 40 | chmod +x conf$$.sh 41 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then 42 | PATH_SEPARATOR=';' 43 | else 44 | PATH_SEPARATOR=: 45 | fi 46 | rm -f conf$$.sh 47 | fi 48 | 49 | # Support unset when possible. 50 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 51 | as_unset=unset 52 | else 53 | as_unset=false 54 | fi 55 | 56 | 57 | # IFS 58 | # We need space, tab and new line, in precisely that order. Quoting is 59 | # there to prevent editors from complaining about space-tab. 60 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word 61 | # splitting by setting IFS to empty value.) 62 | as_nl=' 63 | ' 64 | IFS=" "" $as_nl" 65 | 66 | # Find who we are. Look in the path if we contain no directory separator. 67 | case $0 in 68 | *[\\/]* ) as_myself=$0 ;; 69 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 70 | for as_dir in $PATH 71 | do 72 | IFS=$as_save_IFS 73 | test -z "$as_dir" && as_dir=. 74 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 75 | done 76 | IFS=$as_save_IFS 77 | 78 | ;; 79 | esac 80 | # We did not find ourselves, most probably we were run as `sh COMMAND' 81 | # in which case we are not to be found in the path. 82 | if test "x$as_myself" = x; then 83 | as_myself=$0 84 | fi 85 | if test ! -f "$as_myself"; then 86 | echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 87 | { (exit 1); exit 1; } 88 | fi 89 | 90 | # Work around bugs in pre-3.0 UWIN ksh. 91 | for as_var in ENV MAIL MAILPATH 92 | do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var 93 | done 94 | PS1='$ ' 95 | PS2='> ' 96 | PS4='+ ' 97 | 98 | # NLS nuisances. 99 | for as_var in \ 100 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ 101 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ 102 | LC_TELEPHONE LC_TIME 103 | do 104 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then 105 | eval $as_var=C; export $as_var 106 | else 107 | ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var 108 | fi 109 | done 110 | 111 | # Required to use basename. 112 | if expr a : '\(a\)' >/dev/null 2>&1 && 113 | test "X`expr 00001 : '.*\(...\)'`" = X001; then 114 | as_expr=expr 115 | else 116 | as_expr=false 117 | fi 118 | 119 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 120 | as_basename=basename 121 | else 122 | as_basename=false 123 | fi 124 | 125 | 126 | # Name of the executable. 127 | as_me=`$as_basename -- "$0" || 128 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 129 | X"$0" : 'X\(//\)$' \| \ 130 | X"$0" : 'X\(/\)' \| . 2>/dev/null || 131 | echo X/"$0" | 132 | sed '/^.*\/\([^/][^/]*\)\/*$/{ 133 | s//\1/ 134 | q 135 | } 136 | /^X\/\(\/\/\)$/{ 137 | s//\1/ 138 | q 139 | } 140 | /^X\/\(\/\).*/{ 141 | s//\1/ 142 | q 143 | } 144 | s/.*/./; q'` 145 | 146 | # CDPATH. 147 | $as_unset CDPATH 148 | 149 | 150 | if test "x$CONFIG_SHELL" = x; then 151 | if (eval ":") 2>/dev/null; then 152 | as_have_required=yes 153 | else 154 | as_have_required=no 155 | fi 156 | 157 | if test $as_have_required = yes && (eval ": 158 | (as_func_return () { 159 | (exit \$1) 160 | } 161 | as_func_success () { 162 | as_func_return 0 163 | } 164 | as_func_failure () { 165 | as_func_return 1 166 | } 167 | as_func_ret_success () { 168 | return 0 169 | } 170 | as_func_ret_failure () { 171 | return 1 172 | } 173 | 174 | exitcode=0 175 | if as_func_success; then 176 | : 177 | else 178 | exitcode=1 179 | echo as_func_success failed. 180 | fi 181 | 182 | if as_func_failure; then 183 | exitcode=1 184 | echo as_func_failure succeeded. 185 | fi 186 | 187 | if as_func_ret_success; then 188 | : 189 | else 190 | exitcode=1 191 | echo as_func_ret_success failed. 192 | fi 193 | 194 | if as_func_ret_failure; then 195 | exitcode=1 196 | echo as_func_ret_failure succeeded. 197 | fi 198 | 199 | if ( set x; as_func_ret_success y && test x = \"\$1\" ); then 200 | : 201 | else 202 | exitcode=1 203 | echo positional parameters were not saved. 204 | fi 205 | 206 | test \$exitcode = 0) || { (exit 1); exit 1; } 207 | 208 | ( 209 | as_lineno_1=\$LINENO 210 | as_lineno_2=\$LINENO 211 | test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && 212 | test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } 213 | ") 2> /dev/null; then 214 | : 215 | else 216 | as_candidate_shells= 217 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 218 | for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH 219 | do 220 | IFS=$as_save_IFS 221 | test -z "$as_dir" && as_dir=. 222 | case $as_dir in 223 | /*) 224 | for as_base in sh bash ksh sh5; do 225 | as_candidate_shells="$as_candidate_shells $as_dir/$as_base" 226 | done;; 227 | esac 228 | done 229 | IFS=$as_save_IFS 230 | 231 | 232 | for as_shell in $as_candidate_shells $SHELL; do 233 | # Try only shells that exist, to save several forks. 234 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && 235 | { ("$as_shell") 2> /dev/null <<\_ASEOF 236 | # Be Bourne compatible 237 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 238 | emulate sh 239 | NULLCMD=: 240 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which 241 | # is contrary to our usage. Disable this feature. 242 | alias -g '${1+"$@"}'='"$@"' 243 | setopt NO_GLOB_SUBST 244 | else 245 | case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac 246 | fi 247 | BIN_SH=xpg4; export BIN_SH # for Tru64 248 | DUALCASE=1; export DUALCASE # for MKS sh 249 | 250 | : 251 | _ASEOF 252 | }; then 253 | CONFIG_SHELL=$as_shell 254 | as_have_required=yes 255 | if { "$as_shell" 2> /dev/null <<\_ASEOF 256 | # Be Bourne compatible 257 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 258 | emulate sh 259 | NULLCMD=: 260 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which 261 | # is contrary to our usage. Disable this feature. 262 | alias -g '${1+"$@"}'='"$@"' 263 | setopt NO_GLOB_SUBST 264 | else 265 | case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac 266 | fi 267 | BIN_SH=xpg4; export BIN_SH # for Tru64 268 | DUALCASE=1; export DUALCASE # for MKS sh 269 | 270 | : 271 | (as_func_return () { 272 | (exit $1) 273 | } 274 | as_func_success () { 275 | as_func_return 0 276 | } 277 | as_func_failure () { 278 | as_func_return 1 279 | } 280 | as_func_ret_success () { 281 | return 0 282 | } 283 | as_func_ret_failure () { 284 | return 1 285 | } 286 | 287 | exitcode=0 288 | if as_func_success; then 289 | : 290 | else 291 | exitcode=1 292 | echo as_func_success failed. 293 | fi 294 | 295 | if as_func_failure; then 296 | exitcode=1 297 | echo as_func_failure succeeded. 298 | fi 299 | 300 | if as_func_ret_success; then 301 | : 302 | else 303 | exitcode=1 304 | echo as_func_ret_success failed. 305 | fi 306 | 307 | if as_func_ret_failure; then 308 | exitcode=1 309 | echo as_func_ret_failure succeeded. 310 | fi 311 | 312 | if ( set x; as_func_ret_success y && test x = "$1" ); then 313 | : 314 | else 315 | exitcode=1 316 | echo positional parameters were not saved. 317 | fi 318 | 319 | test $exitcode = 0) || { (exit 1); exit 1; } 320 | 321 | ( 322 | as_lineno_1=$LINENO 323 | as_lineno_2=$LINENO 324 | test "x$as_lineno_1" != "x$as_lineno_2" && 325 | test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } 326 | 327 | _ASEOF 328 | }; then 329 | break 330 | fi 331 | 332 | fi 333 | 334 | done 335 | 336 | if test "x$CONFIG_SHELL" != x; then 337 | for as_var in BASH_ENV ENV 338 | do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var 339 | done 340 | export CONFIG_SHELL 341 | exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} 342 | fi 343 | 344 | 345 | if test $as_have_required = no; then 346 | echo This script requires a shell more modern than all the 347 | echo shells that I found on your system. Please install a 348 | echo modern shell, or manually run the script under such a 349 | echo shell if you do have one. 350 | { (exit 1); exit 1; } 351 | fi 352 | 353 | 354 | fi 355 | 356 | fi 357 | 358 | 359 | 360 | (eval "as_func_return () { 361 | (exit \$1) 362 | } 363 | as_func_success () { 364 | as_func_return 0 365 | } 366 | as_func_failure () { 367 | as_func_return 1 368 | } 369 | as_func_ret_success () { 370 | return 0 371 | } 372 | as_func_ret_failure () { 373 | return 1 374 | } 375 | 376 | exitcode=0 377 | if as_func_success; then 378 | : 379 | else 380 | exitcode=1 381 | echo as_func_success failed. 382 | fi 383 | 384 | if as_func_failure; then 385 | exitcode=1 386 | echo as_func_failure succeeded. 387 | fi 388 | 389 | if as_func_ret_success; then 390 | : 391 | else 392 | exitcode=1 393 | echo as_func_ret_success failed. 394 | fi 395 | 396 | if as_func_ret_failure; then 397 | exitcode=1 398 | echo as_func_ret_failure succeeded. 399 | fi 400 | 401 | if ( set x; as_func_ret_success y && test x = \"\$1\" ); then 402 | : 403 | else 404 | exitcode=1 405 | echo positional parameters were not saved. 406 | fi 407 | 408 | test \$exitcode = 0") || { 409 | echo No shell found that supports shell functions. 410 | echo Please tell autoconf@gnu.org about your system, 411 | echo including any error possibly output before this 412 | echo message 413 | } 414 | 415 | 416 | 417 | as_lineno_1=$LINENO 418 | as_lineno_2=$LINENO 419 | test "x$as_lineno_1" != "x$as_lineno_2" && 420 | test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { 421 | 422 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO 423 | # uniformly replaced by the line number. The first 'sed' inserts a 424 | # line-number line after each line using $LINENO; the second 'sed' 425 | # does the real work. The second script uses 'N' to pair each 426 | # line-number line with the line containing $LINENO, and appends 427 | # trailing '-' during substitution so that $LINENO is not a special 428 | # case at line end. 429 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the 430 | # scripts with optimization help from Paolo Bonzini. Blame Lee 431 | # E. McMahon (1931-1989) for sed's syntax. :-) 432 | sed -n ' 433 | p 434 | /[$]LINENO/= 435 | ' <$as_myself | 436 | sed ' 437 | s/[$]LINENO.*/&-/ 438 | t lineno 439 | b 440 | :lineno 441 | N 442 | :loop 443 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ 444 | t loop 445 | s/-\n.*// 446 | ' >$as_me.lineno && 447 | chmod +x "$as_me.lineno" || 448 | { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 449 | { (exit 1); exit 1; }; } 450 | 451 | # Don't try to exec as it changes $[0], causing all sort of problems 452 | # (the dirname of $[0] is not the place where we might find the 453 | # original and so on. Autoconf is especially sensitive to this). 454 | . "./$as_me.lineno" 455 | # Exit status is that of the last command. 456 | exit 457 | } 458 | 459 | 460 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 461 | as_dirname=dirname 462 | else 463 | as_dirname=false 464 | fi 465 | 466 | ECHO_C= ECHO_N= ECHO_T= 467 | case `echo -n x` in 468 | -n*) 469 | case `echo 'x\c'` in 470 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. 471 | *) ECHO_C='\c';; 472 | esac;; 473 | *) 474 | ECHO_N='-n';; 475 | esac 476 | 477 | if expr a : '\(a\)' >/dev/null 2>&1 && 478 | test "X`expr 00001 : '.*\(...\)'`" = X001; then 479 | as_expr=expr 480 | else 481 | as_expr=false 482 | fi 483 | 484 | rm -f conf$$ conf$$.exe conf$$.file 485 | if test -d conf$$.dir; then 486 | rm -f conf$$.dir/conf$$.file 487 | else 488 | rm -f conf$$.dir 489 | mkdir conf$$.dir 490 | fi 491 | echo >conf$$.file 492 | if ln -s conf$$.file conf$$ 2>/dev/null; then 493 | as_ln_s='ln -s' 494 | # ... but there are two gotchas: 495 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 496 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 497 | # In both cases, we have to default to `cp -p'. 498 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 499 | as_ln_s='cp -p' 500 | elif ln conf$$.file conf$$ 2>/dev/null; then 501 | as_ln_s=ln 502 | else 503 | as_ln_s='cp -p' 504 | fi 505 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 506 | rmdir conf$$.dir 2>/dev/null 507 | 508 | if mkdir -p . 2>/dev/null; then 509 | as_mkdir_p=: 510 | else 511 | test -d ./-p && rmdir ./-p 512 | as_mkdir_p=false 513 | fi 514 | 515 | # Find out whether ``test -x'' works. Don't use a zero-byte file, as 516 | # systems may use methods other than mode bits to determine executability. 517 | cat >conf$$.file <<_ASEOF 518 | #! /bin/sh 519 | exit 0 520 | _ASEOF 521 | chmod +x conf$$.file 522 | if test -x conf$$.file >/dev/null 2>&1; then 523 | as_executable_p="test -x" 524 | else 525 | as_executable_p=: 526 | fi 527 | rm -f conf$$.file 528 | 529 | # Sed expression to map a string onto a valid CPP name. 530 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 531 | 532 | # Sed expression to map a string onto a valid variable name. 533 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 534 | 535 | 536 | 537 | exec 7<&0 &1 538 | 539 | # Name of the host. 540 | # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, 541 | # so uname gets run too. 542 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` 543 | 544 | # 545 | # Initializations. 546 | # 547 | ac_default_prefix=/usr/local 548 | ac_clean_files= 549 | ac_config_libobj_dir=. 550 | LIBOBJS= 551 | cross_compiling=no 552 | subdirs= 553 | MFLAGS= 554 | MAKEFLAGS= 555 | SHELL=${CONFIG_SHELL-/bin/sh} 556 | 557 | # Identity of this package. 558 | PACKAGE_NAME='cherly' 559 | PACKAGE_TARNAME='cherly' 560 | PACKAGE_VERSION='0.0.1' 561 | PACKAGE_STRING='cherly 0.0.1' 562 | PACKAGE_BUGREPORT='' 563 | 564 | # Factoring default headers for most tests. 565 | ac_includes_default="\ 566 | #include 567 | #if HAVE_SYS_TYPES_H 568 | # include 569 | #endif 570 | #if HAVE_SYS_STAT_H 571 | # include 572 | #endif 573 | #if STDC_HEADERS 574 | # include 575 | # include 576 | #else 577 | # if HAVE_STDLIB_H 578 | # include 579 | # endif 580 | #endif 581 | #if HAVE_STRING_H 582 | # if !STDC_HEADERS && HAVE_MEMORY_H 583 | # include 584 | # endif 585 | # include 586 | #endif 587 | #if HAVE_STRINGS_H 588 | # include 589 | #endif 590 | #if HAVE_INTTYPES_H 591 | # include 592 | #endif 593 | #if HAVE_STDINT_H 594 | # include 595 | #endif 596 | #if HAVE_UNISTD_H 597 | # include 598 | #endif" 599 | 600 | ac_subst_vars='SHELL 601 | PATH_SEPARATOR 602 | PACKAGE_NAME 603 | PACKAGE_TARNAME 604 | PACKAGE_VERSION 605 | PACKAGE_STRING 606 | PACKAGE_BUGREPORT 607 | exec_prefix 608 | prefix 609 | program_transform_name 610 | bindir 611 | sbindir 612 | libexecdir 613 | datarootdir 614 | datadir 615 | sysconfdir 616 | sharedstatedir 617 | localstatedir 618 | includedir 619 | oldincludedir 620 | docdir 621 | infodir 622 | htmldir 623 | dvidir 624 | pdfdir 625 | psdir 626 | libdir 627 | localedir 628 | mandir 629 | DEFS 630 | ECHO_C 631 | ECHO_N 632 | ECHO_T 633 | LIBS 634 | build_alias 635 | host_alias 636 | target_alias 637 | CC 638 | CFLAGS 639 | LDFLAGS 640 | CPPFLAGS 641 | ac_ct_CC 642 | EXEEXT 643 | OBJEXT 644 | ERL 645 | ERLC 646 | JUDY_PREFIX 647 | JUDY_LIBS 648 | JUDY_CFLAGS 649 | ERLBINDIR 650 | ERLDIR 651 | ERTSBASE 652 | LIBEI 653 | CPP 654 | GREP 655 | EGREP 656 | LIBOBJS 657 | LTLIBOBJS' 658 | ac_subst_files='' 659 | ac_precious_vars='build_alias 660 | host_alias 661 | target_alias 662 | CC 663 | CFLAGS 664 | LDFLAGS 665 | CPPFLAGS 666 | CPP' 667 | 668 | 669 | # Initialize some variables set by options. 670 | ac_init_help= 671 | ac_init_version=false 672 | # The variables have the same names as the options, with 673 | # dashes changed to underlines. 674 | cache_file=/dev/null 675 | exec_prefix=NONE 676 | no_create= 677 | no_recursion= 678 | prefix=NONE 679 | program_prefix=NONE 680 | program_suffix=NONE 681 | program_transform_name=s,x,x, 682 | silent= 683 | site= 684 | srcdir= 685 | verbose= 686 | x_includes=NONE 687 | x_libraries=NONE 688 | 689 | # Installation directory options. 690 | # These are left unexpanded so users can "make install exec_prefix=/foo" 691 | # and all the variables that are supposed to be based on exec_prefix 692 | # by default will actually change. 693 | # Use braces instead of parens because sh, perl, etc. also accept them. 694 | # (The list follows the same order as the GNU Coding Standards.) 695 | bindir='${exec_prefix}/bin' 696 | sbindir='${exec_prefix}/sbin' 697 | libexecdir='${exec_prefix}/libexec' 698 | datarootdir='${prefix}/share' 699 | datadir='${datarootdir}' 700 | sysconfdir='${prefix}/etc' 701 | sharedstatedir='${prefix}/com' 702 | localstatedir='${prefix}/var' 703 | includedir='${prefix}/include' 704 | oldincludedir='/usr/include' 705 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' 706 | infodir='${datarootdir}/info' 707 | htmldir='${docdir}' 708 | dvidir='${docdir}' 709 | pdfdir='${docdir}' 710 | psdir='${docdir}' 711 | libdir='${exec_prefix}/lib' 712 | localedir='${datarootdir}/locale' 713 | mandir='${datarootdir}/man' 714 | 715 | ac_prev= 716 | ac_dashdash= 717 | for ac_option 718 | do 719 | # If the previous option needs an argument, assign it. 720 | if test -n "$ac_prev"; then 721 | eval $ac_prev=\$ac_option 722 | ac_prev= 723 | continue 724 | fi 725 | 726 | case $ac_option in 727 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; 728 | *) ac_optarg=yes ;; 729 | esac 730 | 731 | # Accept the important Cygnus configure options, so we can diagnose typos. 732 | 733 | case $ac_dashdash$ac_option in 734 | --) 735 | ac_dashdash=yes ;; 736 | 737 | -bindir | --bindir | --bindi | --bind | --bin | --bi) 738 | ac_prev=bindir ;; 739 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) 740 | bindir=$ac_optarg ;; 741 | 742 | -build | --build | --buil | --bui | --bu) 743 | ac_prev=build_alias ;; 744 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) 745 | build_alias=$ac_optarg ;; 746 | 747 | -cache-file | --cache-file | --cache-fil | --cache-fi \ 748 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) 749 | ac_prev=cache_file ;; 750 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ 751 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) 752 | cache_file=$ac_optarg ;; 753 | 754 | --config-cache | -C) 755 | cache_file=config.cache ;; 756 | 757 | -datadir | --datadir | --datadi | --datad) 758 | ac_prev=datadir ;; 759 | -datadir=* | --datadir=* | --datadi=* | --datad=*) 760 | datadir=$ac_optarg ;; 761 | 762 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ 763 | | --dataroo | --dataro | --datar) 764 | ac_prev=datarootdir ;; 765 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ 766 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) 767 | datarootdir=$ac_optarg ;; 768 | 769 | -disable-* | --disable-*) 770 | ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` 771 | # Reject names that are not valid shell variable names. 772 | expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && 773 | { echo "$as_me: error: invalid feature name: $ac_feature" >&2 774 | { (exit 1); exit 1; }; } 775 | ac_feature=`echo $ac_feature | sed 's/-/_/g'` 776 | eval enable_$ac_feature=no ;; 777 | 778 | -docdir | --docdir | --docdi | --doc | --do) 779 | ac_prev=docdir ;; 780 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) 781 | docdir=$ac_optarg ;; 782 | 783 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) 784 | ac_prev=dvidir ;; 785 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) 786 | dvidir=$ac_optarg ;; 787 | 788 | -enable-* | --enable-*) 789 | ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` 790 | # Reject names that are not valid shell variable names. 791 | expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && 792 | { echo "$as_me: error: invalid feature name: $ac_feature" >&2 793 | { (exit 1); exit 1; }; } 794 | ac_feature=`echo $ac_feature | sed 's/-/_/g'` 795 | eval enable_$ac_feature=\$ac_optarg ;; 796 | 797 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ 798 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ 799 | | --exec | --exe | --ex) 800 | ac_prev=exec_prefix ;; 801 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ 802 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ 803 | | --exec=* | --exe=* | --ex=*) 804 | exec_prefix=$ac_optarg ;; 805 | 806 | -gas | --gas | --ga | --g) 807 | # Obsolete; use --with-gas. 808 | with_gas=yes ;; 809 | 810 | -help | --help | --hel | --he | -h) 811 | ac_init_help=long ;; 812 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) 813 | ac_init_help=recursive ;; 814 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) 815 | ac_init_help=short ;; 816 | 817 | -host | --host | --hos | --ho) 818 | ac_prev=host_alias ;; 819 | -host=* | --host=* | --hos=* | --ho=*) 820 | host_alias=$ac_optarg ;; 821 | 822 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) 823 | ac_prev=htmldir ;; 824 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ 825 | | --ht=*) 826 | htmldir=$ac_optarg ;; 827 | 828 | -includedir | --includedir | --includedi | --included | --include \ 829 | | --includ | --inclu | --incl | --inc) 830 | ac_prev=includedir ;; 831 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ 832 | | --includ=* | --inclu=* | --incl=* | --inc=*) 833 | includedir=$ac_optarg ;; 834 | 835 | -infodir | --infodir | --infodi | --infod | --info | --inf) 836 | ac_prev=infodir ;; 837 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) 838 | infodir=$ac_optarg ;; 839 | 840 | -libdir | --libdir | --libdi | --libd) 841 | ac_prev=libdir ;; 842 | -libdir=* | --libdir=* | --libdi=* | --libd=*) 843 | libdir=$ac_optarg ;; 844 | 845 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ 846 | | --libexe | --libex | --libe) 847 | ac_prev=libexecdir ;; 848 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ 849 | | --libexe=* | --libex=* | --libe=*) 850 | libexecdir=$ac_optarg ;; 851 | 852 | -localedir | --localedir | --localedi | --localed | --locale) 853 | ac_prev=localedir ;; 854 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) 855 | localedir=$ac_optarg ;; 856 | 857 | -localstatedir | --localstatedir | --localstatedi | --localstated \ 858 | | --localstate | --localstat | --localsta | --localst | --locals) 859 | ac_prev=localstatedir ;; 860 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ 861 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) 862 | localstatedir=$ac_optarg ;; 863 | 864 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) 865 | ac_prev=mandir ;; 866 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) 867 | mandir=$ac_optarg ;; 868 | 869 | -nfp | --nfp | --nf) 870 | # Obsolete; use --without-fp. 871 | with_fp=no ;; 872 | 873 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 874 | | --no-cr | --no-c | -n) 875 | no_create=yes ;; 876 | 877 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 878 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) 879 | no_recursion=yes ;; 880 | 881 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ 882 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ 883 | | --oldin | --oldi | --old | --ol | --o) 884 | ac_prev=oldincludedir ;; 885 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ 886 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ 887 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) 888 | oldincludedir=$ac_optarg ;; 889 | 890 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) 891 | ac_prev=prefix ;; 892 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) 893 | prefix=$ac_optarg ;; 894 | 895 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ 896 | | --program-pre | --program-pr | --program-p) 897 | ac_prev=program_prefix ;; 898 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ 899 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) 900 | program_prefix=$ac_optarg ;; 901 | 902 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ 903 | | --program-suf | --program-su | --program-s) 904 | ac_prev=program_suffix ;; 905 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ 906 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) 907 | program_suffix=$ac_optarg ;; 908 | 909 | -program-transform-name | --program-transform-name \ 910 | | --program-transform-nam | --program-transform-na \ 911 | | --program-transform-n | --program-transform- \ 912 | | --program-transform | --program-transfor \ 913 | | --program-transfo | --program-transf \ 914 | | --program-trans | --program-tran \ 915 | | --progr-tra | --program-tr | --program-t) 916 | ac_prev=program_transform_name ;; 917 | -program-transform-name=* | --program-transform-name=* \ 918 | | --program-transform-nam=* | --program-transform-na=* \ 919 | | --program-transform-n=* | --program-transform-=* \ 920 | | --program-transform=* | --program-transfor=* \ 921 | | --program-transfo=* | --program-transf=* \ 922 | | --program-trans=* | --program-tran=* \ 923 | | --progr-tra=* | --program-tr=* | --program-t=*) 924 | program_transform_name=$ac_optarg ;; 925 | 926 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) 927 | ac_prev=pdfdir ;; 928 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) 929 | pdfdir=$ac_optarg ;; 930 | 931 | -psdir | --psdir | --psdi | --psd | --ps) 932 | ac_prev=psdir ;; 933 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) 934 | psdir=$ac_optarg ;; 935 | 936 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 937 | | -silent | --silent | --silen | --sile | --sil) 938 | silent=yes ;; 939 | 940 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 941 | ac_prev=sbindir ;; 942 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ 943 | | --sbi=* | --sb=*) 944 | sbindir=$ac_optarg ;; 945 | 946 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ 947 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ 948 | | --sharedst | --shareds | --shared | --share | --shar \ 949 | | --sha | --sh) 950 | ac_prev=sharedstatedir ;; 951 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ 952 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ 953 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ 954 | | --sha=* | --sh=*) 955 | sharedstatedir=$ac_optarg ;; 956 | 957 | -site | --site | --sit) 958 | ac_prev=site ;; 959 | -site=* | --site=* | --sit=*) 960 | site=$ac_optarg ;; 961 | 962 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) 963 | ac_prev=srcdir ;; 964 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) 965 | srcdir=$ac_optarg ;; 966 | 967 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ 968 | | --syscon | --sysco | --sysc | --sys | --sy) 969 | ac_prev=sysconfdir ;; 970 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ 971 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) 972 | sysconfdir=$ac_optarg ;; 973 | 974 | -target | --target | --targe | --targ | --tar | --ta | --t) 975 | ac_prev=target_alias ;; 976 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) 977 | target_alias=$ac_optarg ;; 978 | 979 | -v | -verbose | --verbose | --verbos | --verbo | --verb) 980 | verbose=yes ;; 981 | 982 | -version | --version | --versio | --versi | --vers | -V) 983 | ac_init_version=: ;; 984 | 985 | -with-* | --with-*) 986 | ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` 987 | # Reject names that are not valid shell variable names. 988 | expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && 989 | { echo "$as_me: error: invalid package name: $ac_package" >&2 990 | { (exit 1); exit 1; }; } 991 | ac_package=`echo $ac_package| sed 's/-/_/g'` 992 | eval with_$ac_package=\$ac_optarg ;; 993 | 994 | -without-* | --without-*) 995 | ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` 996 | # Reject names that are not valid shell variable names. 997 | expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && 998 | { echo "$as_me: error: invalid package name: $ac_package" >&2 999 | { (exit 1); exit 1; }; } 1000 | ac_package=`echo $ac_package | sed 's/-/_/g'` 1001 | eval with_$ac_package=no ;; 1002 | 1003 | --x) 1004 | # Obsolete; use --with-x. 1005 | with_x=yes ;; 1006 | 1007 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ 1008 | | --x-incl | --x-inc | --x-in | --x-i) 1009 | ac_prev=x_includes ;; 1010 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ 1011 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) 1012 | x_includes=$ac_optarg ;; 1013 | 1014 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ 1015 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) 1016 | ac_prev=x_libraries ;; 1017 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ 1018 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) 1019 | x_libraries=$ac_optarg ;; 1020 | 1021 | -*) { echo "$as_me: error: unrecognized option: $ac_option 1022 | Try \`$0 --help' for more information." >&2 1023 | { (exit 1); exit 1; }; } 1024 | ;; 1025 | 1026 | *=*) 1027 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` 1028 | # Reject names that are not valid shell variable names. 1029 | expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && 1030 | { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 1031 | { (exit 1); exit 1; }; } 1032 | eval $ac_envvar=\$ac_optarg 1033 | export $ac_envvar ;; 1034 | 1035 | *) 1036 | # FIXME: should be removed in autoconf 3.0. 1037 | echo "$as_me: WARNING: you should use --build, --host, --target" >&2 1038 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 1039 | echo "$as_me: WARNING: invalid host type: $ac_option" >&2 1040 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} 1041 | ;; 1042 | 1043 | esac 1044 | done 1045 | 1046 | if test -n "$ac_prev"; then 1047 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` 1048 | { echo "$as_me: error: missing argument to $ac_option" >&2 1049 | { (exit 1); exit 1; }; } 1050 | fi 1051 | 1052 | # Be sure to have absolute directory names. 1053 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ 1054 | datadir sysconfdir sharedstatedir localstatedir includedir \ 1055 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ 1056 | libdir localedir mandir 1057 | do 1058 | eval ac_val=\$$ac_var 1059 | case $ac_val in 1060 | [\\/$]* | ?:[\\/]* ) continue;; 1061 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; 1062 | esac 1063 | { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 1064 | { (exit 1); exit 1; }; } 1065 | done 1066 | 1067 | # There might be people who depend on the old broken behavior: `$host' 1068 | # used to hold the argument of --host etc. 1069 | # FIXME: To remove some day. 1070 | build=$build_alias 1071 | host=$host_alias 1072 | target=$target_alias 1073 | 1074 | # FIXME: To remove some day. 1075 | if test "x$host_alias" != x; then 1076 | if test "x$build_alias" = x; then 1077 | cross_compiling=maybe 1078 | echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. 1079 | If a cross compiler is detected then cross compile mode will be used." >&2 1080 | elif test "x$build_alias" != "x$host_alias"; then 1081 | cross_compiling=yes 1082 | fi 1083 | fi 1084 | 1085 | ac_tool_prefix= 1086 | test -n "$host_alias" && ac_tool_prefix=$host_alias- 1087 | 1088 | test "$silent" = yes && exec 6>/dev/null 1089 | 1090 | 1091 | ac_pwd=`pwd` && test -n "$ac_pwd" && 1092 | ac_ls_di=`ls -di .` && 1093 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || 1094 | { echo "$as_me: error: Working directory cannot be determined" >&2 1095 | { (exit 1); exit 1; }; } 1096 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || 1097 | { echo "$as_me: error: pwd does not report name of working directory" >&2 1098 | { (exit 1); exit 1; }; } 1099 | 1100 | 1101 | # Find the source files, if location was not specified. 1102 | if test -z "$srcdir"; then 1103 | ac_srcdir_defaulted=yes 1104 | # Try the directory containing this script, then the parent directory. 1105 | ac_confdir=`$as_dirname -- "$0" || 1106 | $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 1107 | X"$0" : 'X\(//\)[^/]' \| \ 1108 | X"$0" : 'X\(//\)$' \| \ 1109 | X"$0" : 'X\(/\)' \| . 2>/dev/null || 1110 | echo X"$0" | 1111 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 1112 | s//\1/ 1113 | q 1114 | } 1115 | /^X\(\/\/\)[^/].*/{ 1116 | s//\1/ 1117 | q 1118 | } 1119 | /^X\(\/\/\)$/{ 1120 | s//\1/ 1121 | q 1122 | } 1123 | /^X\(\/\).*/{ 1124 | s//\1/ 1125 | q 1126 | } 1127 | s/.*/./; q'` 1128 | srcdir=$ac_confdir 1129 | if test ! -r "$srcdir/$ac_unique_file"; then 1130 | srcdir=.. 1131 | fi 1132 | else 1133 | ac_srcdir_defaulted=no 1134 | fi 1135 | if test ! -r "$srcdir/$ac_unique_file"; then 1136 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." 1137 | { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 1138 | { (exit 1); exit 1; }; } 1139 | fi 1140 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" 1141 | ac_abs_confdir=`( 1142 | cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 1143 | { (exit 1); exit 1; }; } 1144 | pwd)` 1145 | # When building in place, set srcdir=. 1146 | if test "$ac_abs_confdir" = "$ac_pwd"; then 1147 | srcdir=. 1148 | fi 1149 | # Remove unnecessary trailing slashes from srcdir. 1150 | # Double slashes in file names in object file debugging info 1151 | # mess up M-x gdb in Emacs. 1152 | case $srcdir in 1153 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; 1154 | esac 1155 | for ac_var in $ac_precious_vars; do 1156 | eval ac_env_${ac_var}_set=\${${ac_var}+set} 1157 | eval ac_env_${ac_var}_value=\$${ac_var} 1158 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} 1159 | eval ac_cv_env_${ac_var}_value=\$${ac_var} 1160 | done 1161 | 1162 | # 1163 | # Report the --help message. 1164 | # 1165 | if test "$ac_init_help" = "long"; then 1166 | # Omit some internal or obsolete options to make the list less imposing. 1167 | # This message is too long to be a string in the A/UX 3.1 sh. 1168 | cat <<_ACEOF 1169 | \`configure' configures cherly 0.0.1 to adapt to many kinds of systems. 1170 | 1171 | Usage: $0 [OPTION]... [VAR=VALUE]... 1172 | 1173 | To assign environment variables (e.g., CC, CFLAGS...), specify them as 1174 | VAR=VALUE. See below for descriptions of some of the useful variables. 1175 | 1176 | Defaults for the options are specified in brackets. 1177 | 1178 | Configuration: 1179 | -h, --help display this help and exit 1180 | --help=short display options specific to this package 1181 | --help=recursive display the short help of all the included packages 1182 | -V, --version display version information and exit 1183 | -q, --quiet, --silent do not print \`checking...' messages 1184 | --cache-file=FILE cache test results in FILE [disabled] 1185 | -C, --config-cache alias for \`--cache-file=config.cache' 1186 | -n, --no-create do not create output files 1187 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] 1188 | 1189 | Installation directories: 1190 | --prefix=PREFIX install architecture-independent files in PREFIX 1191 | [$ac_default_prefix] 1192 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 1193 | [PREFIX] 1194 | 1195 | By default, \`make install' will install all the files in 1196 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify 1197 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', 1198 | for instance \`--prefix=\$HOME'. 1199 | 1200 | For better control, use the options below. 1201 | 1202 | Fine tuning of the installation directories: 1203 | --bindir=DIR user executables [EPREFIX/bin] 1204 | --sbindir=DIR system admin executables [EPREFIX/sbin] 1205 | --libexecdir=DIR program executables [EPREFIX/libexec] 1206 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] 1207 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 1208 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] 1209 | --libdir=DIR object code libraries [EPREFIX/lib] 1210 | --includedir=DIR C header files [PREFIX/include] 1211 | --oldincludedir=DIR C header files for non-gcc [/usr/include] 1212 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] 1213 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] 1214 | --infodir=DIR info documentation [DATAROOTDIR/info] 1215 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] 1216 | --mandir=DIR man documentation [DATAROOTDIR/man] 1217 | --docdir=DIR documentation root [DATAROOTDIR/doc/cherly] 1218 | --htmldir=DIR html documentation [DOCDIR] 1219 | --dvidir=DIR dvi documentation [DOCDIR] 1220 | --pdfdir=DIR pdf documentation [DOCDIR] 1221 | --psdir=DIR ps documentation [DOCDIR] 1222 | _ACEOF 1223 | 1224 | cat <<\_ACEOF 1225 | _ACEOF 1226 | fi 1227 | 1228 | if test -n "$ac_init_help"; then 1229 | case $ac_init_help in 1230 | short | recursive ) echo "Configuration of cherly 0.0.1:";; 1231 | esac 1232 | cat <<\_ACEOF 1233 | 1234 | Optional Packages: 1235 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 1236 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 1237 | --with-judy= prefix of Judy installation. e.g. /usr/local or /usr 1238 | 1239 | Some influential environment variables: 1240 | CC C compiler command 1241 | CFLAGS C compiler flags 1242 | LDFLAGS linker flags, e.g. -L if you have libraries in a 1243 | nonstandard directory 1244 | CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if 1245 | you have headers in a nonstandard directory 1246 | CPP C preprocessor 1247 | 1248 | Use these variables to override the choices made by `configure' or to help 1249 | it to find libraries and programs with nonstandard names/locations. 1250 | 1251 | _ACEOF 1252 | ac_status=$? 1253 | fi 1254 | 1255 | if test "$ac_init_help" = "recursive"; then 1256 | # If there are subdirs, report their specific --help. 1257 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue 1258 | test -d "$ac_dir" || continue 1259 | ac_builddir=. 1260 | 1261 | case "$ac_dir" in 1262 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 1263 | *) 1264 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` 1265 | # A ".." for each directory in $ac_dir_suffix. 1266 | ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` 1267 | case $ac_top_builddir_sub in 1268 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 1269 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 1270 | esac ;; 1271 | esac 1272 | ac_abs_top_builddir=$ac_pwd 1273 | ac_abs_builddir=$ac_pwd$ac_dir_suffix 1274 | # for backward compatibility: 1275 | ac_top_builddir=$ac_top_build_prefix 1276 | 1277 | case $srcdir in 1278 | .) # We are building in place. 1279 | ac_srcdir=. 1280 | ac_top_srcdir=$ac_top_builddir_sub 1281 | ac_abs_top_srcdir=$ac_pwd ;; 1282 | [\\/]* | ?:[\\/]* ) # Absolute name. 1283 | ac_srcdir=$srcdir$ac_dir_suffix; 1284 | ac_top_srcdir=$srcdir 1285 | ac_abs_top_srcdir=$srcdir ;; 1286 | *) # Relative name. 1287 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 1288 | ac_top_srcdir=$ac_top_build_prefix$srcdir 1289 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 1290 | esac 1291 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 1292 | 1293 | cd "$ac_dir" || { ac_status=$?; continue; } 1294 | # Check for guested configure. 1295 | if test -f "$ac_srcdir/configure.gnu"; then 1296 | echo && 1297 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive 1298 | elif test -f "$ac_srcdir/configure"; then 1299 | echo && 1300 | $SHELL "$ac_srcdir/configure" --help=recursive 1301 | else 1302 | echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 1303 | fi || ac_status=$? 1304 | cd "$ac_pwd" || { ac_status=$?; break; } 1305 | done 1306 | fi 1307 | 1308 | test -n "$ac_init_help" && exit $ac_status 1309 | if $ac_init_version; then 1310 | cat <<\_ACEOF 1311 | cherly configure 0.0.1 1312 | generated by GNU Autoconf 2.60 1313 | 1314 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 1315 | 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 1316 | This configure script is free software; the Free Software Foundation 1317 | gives unlimited permission to copy, distribute and modify it. 1318 | _ACEOF 1319 | exit 1320 | fi 1321 | cat >config.log <<_ACEOF 1322 | This file contains any messages produced by compilers while 1323 | running configure, to aid debugging if configure makes a mistake. 1324 | 1325 | It was created by cherly $as_me 0.0.1, which was 1326 | generated by GNU Autoconf 2.60. Invocation command line was 1327 | 1328 | $ $0 $@ 1329 | 1330 | _ACEOF 1331 | exec 5>>config.log 1332 | { 1333 | cat <<_ASUNAME 1334 | ## --------- ## 1335 | ## Platform. ## 1336 | ## --------- ## 1337 | 1338 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` 1339 | uname -m = `(uname -m) 2>/dev/null || echo unknown` 1340 | uname -r = `(uname -r) 2>/dev/null || echo unknown` 1341 | uname -s = `(uname -s) 2>/dev/null || echo unknown` 1342 | uname -v = `(uname -v) 2>/dev/null || echo unknown` 1343 | 1344 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` 1345 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` 1346 | 1347 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` 1348 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` 1349 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` 1350 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` 1351 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` 1352 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` 1353 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` 1354 | 1355 | _ASUNAME 1356 | 1357 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1358 | for as_dir in $PATH 1359 | do 1360 | IFS=$as_save_IFS 1361 | test -z "$as_dir" && as_dir=. 1362 | echo "PATH: $as_dir" 1363 | done 1364 | IFS=$as_save_IFS 1365 | 1366 | } >&5 1367 | 1368 | cat >&5 <<_ACEOF 1369 | 1370 | 1371 | ## ----------- ## 1372 | ## Core tests. ## 1373 | ## ----------- ## 1374 | 1375 | _ACEOF 1376 | 1377 | 1378 | # Keep a trace of the command line. 1379 | # Strip out --no-create and --no-recursion so they do not pile up. 1380 | # Strip out --silent because we don't want to record it for future runs. 1381 | # Also quote any args containing shell meta-characters. 1382 | # Make two passes to allow for proper duplicate-argument suppression. 1383 | ac_configure_args= 1384 | ac_configure_args0= 1385 | ac_configure_args1= 1386 | ac_must_keep_next=false 1387 | for ac_pass in 1 2 1388 | do 1389 | for ac_arg 1390 | do 1391 | case $ac_arg in 1392 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; 1393 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 1394 | | -silent | --silent | --silen | --sile | --sil) 1395 | continue ;; 1396 | *\'*) 1397 | ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; 1398 | esac 1399 | case $ac_pass in 1400 | 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 1401 | 2) 1402 | ac_configure_args1="$ac_configure_args1 '$ac_arg'" 1403 | if test $ac_must_keep_next = true; then 1404 | ac_must_keep_next=false # Got value, back to normal. 1405 | else 1406 | case $ac_arg in 1407 | *=* | --config-cache | -C | -disable-* | --disable-* \ 1408 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ 1409 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ 1410 | | -with-* | --with-* | -without-* | --without-* | --x) 1411 | case "$ac_configure_args0 " in 1412 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; 1413 | esac 1414 | ;; 1415 | -* ) ac_must_keep_next=true ;; 1416 | esac 1417 | fi 1418 | ac_configure_args="$ac_configure_args '$ac_arg'" 1419 | ;; 1420 | esac 1421 | done 1422 | done 1423 | $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } 1424 | $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } 1425 | 1426 | # When interrupted or exit'd, cleanup temporary files, and complete 1427 | # config.log. We remove comments because anyway the quotes in there 1428 | # would cause problems or look ugly. 1429 | # WARNING: Use '\'' to represent an apostrophe within the trap. 1430 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. 1431 | trap 'exit_status=$? 1432 | # Save into config.log some information that might help in debugging. 1433 | { 1434 | echo 1435 | 1436 | cat <<\_ASBOX 1437 | ## ---------------- ## 1438 | ## Cache variables. ## 1439 | ## ---------------- ## 1440 | _ASBOX 1441 | echo 1442 | # The following way of writing the cache mishandles newlines in values, 1443 | ( 1444 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do 1445 | eval ac_val=\$$ac_var 1446 | case $ac_val in #( 1447 | *${as_nl}*) 1448 | case $ac_var in #( 1449 | *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 1450 | echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; 1451 | esac 1452 | case $ac_var in #( 1453 | _ | IFS | as_nl) ;; #( 1454 | *) $as_unset $ac_var ;; 1455 | esac ;; 1456 | esac 1457 | done 1458 | (set) 2>&1 | 1459 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( 1460 | *${as_nl}ac_space=\ *) 1461 | sed -n \ 1462 | "s/'\''/'\''\\\\'\'''\''/g; 1463 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" 1464 | ;; #( 1465 | *) 1466 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 1467 | ;; 1468 | esac | 1469 | sort 1470 | ) 1471 | echo 1472 | 1473 | cat <<\_ASBOX 1474 | ## ----------------- ## 1475 | ## Output variables. ## 1476 | ## ----------------- ## 1477 | _ASBOX 1478 | echo 1479 | for ac_var in $ac_subst_vars 1480 | do 1481 | eval ac_val=\$$ac_var 1482 | case $ac_val in 1483 | *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 1484 | esac 1485 | echo "$ac_var='\''$ac_val'\''" 1486 | done | sort 1487 | echo 1488 | 1489 | if test -n "$ac_subst_files"; then 1490 | cat <<\_ASBOX 1491 | ## ------------------- ## 1492 | ## File substitutions. ## 1493 | ## ------------------- ## 1494 | _ASBOX 1495 | echo 1496 | for ac_var in $ac_subst_files 1497 | do 1498 | eval ac_val=\$$ac_var 1499 | case $ac_val in 1500 | *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 1501 | esac 1502 | echo "$ac_var='\''$ac_val'\''" 1503 | done | sort 1504 | echo 1505 | fi 1506 | 1507 | if test -s confdefs.h; then 1508 | cat <<\_ASBOX 1509 | ## ----------- ## 1510 | ## confdefs.h. ## 1511 | ## ----------- ## 1512 | _ASBOX 1513 | echo 1514 | cat confdefs.h 1515 | echo 1516 | fi 1517 | test "$ac_signal" != 0 && 1518 | echo "$as_me: caught signal $ac_signal" 1519 | echo "$as_me: exit $exit_status" 1520 | } >&5 1521 | rm -f core *.core core.conftest.* && 1522 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && 1523 | exit $exit_status 1524 | ' 0 1525 | for ac_signal in 1 2 13 15; do 1526 | trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal 1527 | done 1528 | ac_signal=0 1529 | 1530 | # confdefs.h avoids OS command line length limits that DEFS can exceed. 1531 | rm -f -r conftest* confdefs.h 1532 | 1533 | # Predefined preprocessor variables. 1534 | 1535 | cat >>confdefs.h <<_ACEOF 1536 | #define PACKAGE_NAME "$PACKAGE_NAME" 1537 | _ACEOF 1538 | 1539 | 1540 | cat >>confdefs.h <<_ACEOF 1541 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" 1542 | _ACEOF 1543 | 1544 | 1545 | cat >>confdefs.h <<_ACEOF 1546 | #define PACKAGE_VERSION "$PACKAGE_VERSION" 1547 | _ACEOF 1548 | 1549 | 1550 | cat >>confdefs.h <<_ACEOF 1551 | #define PACKAGE_STRING "$PACKAGE_STRING" 1552 | _ACEOF 1553 | 1554 | 1555 | cat >>confdefs.h <<_ACEOF 1556 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" 1557 | _ACEOF 1558 | 1559 | 1560 | # Let the site file select an alternate cache file if it wants to. 1561 | # Prefer explicitly selected file to automatically selected ones. 1562 | if test -n "$CONFIG_SITE"; then 1563 | set x "$CONFIG_SITE" 1564 | elif test "x$prefix" != xNONE; then 1565 | set x "$prefix/share/config.site" "$prefix/etc/config.site" 1566 | else 1567 | set x "$ac_default_prefix/share/config.site" \ 1568 | "$ac_default_prefix/etc/config.site" 1569 | fi 1570 | shift 1571 | for ac_site_file 1572 | do 1573 | if test -r "$ac_site_file"; then 1574 | { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 1575 | echo "$as_me: loading site script $ac_site_file" >&6;} 1576 | sed 's/^/| /' "$ac_site_file" >&5 1577 | . "$ac_site_file" 1578 | fi 1579 | done 1580 | 1581 | if test -r "$cache_file"; then 1582 | # Some versions of bash will fail to source /dev/null (special 1583 | # files actually), so we avoid doing that. 1584 | if test -f "$cache_file"; then 1585 | { echo "$as_me:$LINENO: loading cache $cache_file" >&5 1586 | echo "$as_me: loading cache $cache_file" >&6;} 1587 | case $cache_file in 1588 | [\\/]* | ?:[\\/]* ) . "$cache_file";; 1589 | *) . "./$cache_file";; 1590 | esac 1591 | fi 1592 | else 1593 | { echo "$as_me:$LINENO: creating cache $cache_file" >&5 1594 | echo "$as_me: creating cache $cache_file" >&6;} 1595 | >$cache_file 1596 | fi 1597 | 1598 | # Check that the precious variables saved in the cache have kept the same 1599 | # value. 1600 | ac_cache_corrupted=false 1601 | for ac_var in $ac_precious_vars; do 1602 | eval ac_old_set=\$ac_cv_env_${ac_var}_set 1603 | eval ac_new_set=\$ac_env_${ac_var}_set 1604 | eval ac_old_val=\$ac_cv_env_${ac_var}_value 1605 | eval ac_new_val=\$ac_env_${ac_var}_value 1606 | case $ac_old_set,$ac_new_set in 1607 | set,) 1608 | { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 1609 | echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} 1610 | ac_cache_corrupted=: ;; 1611 | ,set) 1612 | { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 1613 | echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} 1614 | ac_cache_corrupted=: ;; 1615 | ,);; 1616 | *) 1617 | if test "x$ac_old_val" != "x$ac_new_val"; then 1618 | { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 1619 | echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} 1620 | { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 1621 | echo "$as_me: former value: $ac_old_val" >&2;} 1622 | { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 1623 | echo "$as_me: current value: $ac_new_val" >&2;} 1624 | ac_cache_corrupted=: 1625 | fi;; 1626 | esac 1627 | # Pass precious variables to config.status. 1628 | if test "$ac_new_set" = set; then 1629 | case $ac_new_val in 1630 | *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; 1631 | *) ac_arg=$ac_var=$ac_new_val ;; 1632 | esac 1633 | case " $ac_configure_args " in 1634 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. 1635 | *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; 1636 | esac 1637 | fi 1638 | done 1639 | if $ac_cache_corrupted; then 1640 | { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 1641 | echo "$as_me: error: changes in the environment can compromise the build" >&2;} 1642 | { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 1643 | echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} 1644 | { (exit 1); exit 1; }; } 1645 | fi 1646 | 1647 | 1648 | 1649 | 1650 | 1651 | 1652 | 1653 | 1654 | 1655 | 1656 | 1657 | 1658 | 1659 | 1660 | 1661 | 1662 | 1663 | 1664 | 1665 | 1666 | 1667 | 1668 | 1669 | 1670 | 1671 | ac_ext=c 1672 | ac_cpp='$CPP $CPPFLAGS' 1673 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 1674 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 1675 | ac_compiler_gnu=$ac_cv_c_compiler_gnu 1676 | 1677 | 1678 | 1679 | # Checks for programs. 1680 | ac_ext=c 1681 | ac_cpp='$CPP $CPPFLAGS' 1682 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 1683 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 1684 | ac_compiler_gnu=$ac_cv_c_compiler_gnu 1685 | if test -n "$ac_tool_prefix"; then 1686 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. 1687 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 1688 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 1689 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 1690 | if test "${ac_cv_prog_CC+set}" = set; then 1691 | echo $ECHO_N "(cached) $ECHO_C" >&6 1692 | else 1693 | if test -n "$CC"; then 1694 | ac_cv_prog_CC="$CC" # Let the user override the test. 1695 | else 1696 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1697 | for as_dir in $PATH 1698 | do 1699 | IFS=$as_save_IFS 1700 | test -z "$as_dir" && as_dir=. 1701 | for ac_exec_ext in '' $ac_executable_extensions; do 1702 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then 1703 | ac_cv_prog_CC="${ac_tool_prefix}gcc" 1704 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 1705 | break 2 1706 | fi 1707 | done 1708 | done 1709 | IFS=$as_save_IFS 1710 | 1711 | fi 1712 | fi 1713 | CC=$ac_cv_prog_CC 1714 | if test -n "$CC"; then 1715 | { echo "$as_me:$LINENO: result: $CC" >&5 1716 | echo "${ECHO_T}$CC" >&6; } 1717 | else 1718 | { echo "$as_me:$LINENO: result: no" >&5 1719 | echo "${ECHO_T}no" >&6; } 1720 | fi 1721 | 1722 | 1723 | fi 1724 | if test -z "$ac_cv_prog_CC"; then 1725 | ac_ct_CC=$CC 1726 | # Extract the first word of "gcc", so it can be a program name with args. 1727 | set dummy gcc; ac_word=$2 1728 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 1729 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 1730 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then 1731 | echo $ECHO_N "(cached) $ECHO_C" >&6 1732 | else 1733 | if test -n "$ac_ct_CC"; then 1734 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 1735 | else 1736 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1737 | for as_dir in $PATH 1738 | do 1739 | IFS=$as_save_IFS 1740 | test -z "$as_dir" && as_dir=. 1741 | for ac_exec_ext in '' $ac_executable_extensions; do 1742 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then 1743 | ac_cv_prog_ac_ct_CC="gcc" 1744 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 1745 | break 2 1746 | fi 1747 | done 1748 | done 1749 | IFS=$as_save_IFS 1750 | 1751 | fi 1752 | fi 1753 | ac_ct_CC=$ac_cv_prog_ac_ct_CC 1754 | if test -n "$ac_ct_CC"; then 1755 | { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 1756 | echo "${ECHO_T}$ac_ct_CC" >&6; } 1757 | else 1758 | { echo "$as_me:$LINENO: result: no" >&5 1759 | echo "${ECHO_T}no" >&6; } 1760 | fi 1761 | 1762 | if test "x$ac_ct_CC" = x; then 1763 | CC="" 1764 | else 1765 | case $cross_compiling:$ac_tool_warned in 1766 | yes:) 1767 | { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools 1768 | whose name does not start with the host triplet. If you think this 1769 | configuration is useful to you, please write to autoconf@gnu.org." >&5 1770 | echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools 1771 | whose name does not start with the host triplet. If you think this 1772 | configuration is useful to you, please write to autoconf@gnu.org." >&2;} 1773 | ac_tool_warned=yes ;; 1774 | esac 1775 | CC=$ac_ct_CC 1776 | fi 1777 | else 1778 | CC="$ac_cv_prog_CC" 1779 | fi 1780 | 1781 | if test -z "$CC"; then 1782 | if test -n "$ac_tool_prefix"; then 1783 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. 1784 | set dummy ${ac_tool_prefix}cc; ac_word=$2 1785 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 1786 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 1787 | if test "${ac_cv_prog_CC+set}" = set; then 1788 | echo $ECHO_N "(cached) $ECHO_C" >&6 1789 | else 1790 | if test -n "$CC"; then 1791 | ac_cv_prog_CC="$CC" # Let the user override the test. 1792 | else 1793 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1794 | for as_dir in $PATH 1795 | do 1796 | IFS=$as_save_IFS 1797 | test -z "$as_dir" && as_dir=. 1798 | for ac_exec_ext in '' $ac_executable_extensions; do 1799 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then 1800 | ac_cv_prog_CC="${ac_tool_prefix}cc" 1801 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 1802 | break 2 1803 | fi 1804 | done 1805 | done 1806 | IFS=$as_save_IFS 1807 | 1808 | fi 1809 | fi 1810 | CC=$ac_cv_prog_CC 1811 | if test -n "$CC"; then 1812 | { echo "$as_me:$LINENO: result: $CC" >&5 1813 | echo "${ECHO_T}$CC" >&6; } 1814 | else 1815 | { echo "$as_me:$LINENO: result: no" >&5 1816 | echo "${ECHO_T}no" >&6; } 1817 | fi 1818 | 1819 | 1820 | fi 1821 | fi 1822 | if test -z "$CC"; then 1823 | # Extract the first word of "cc", so it can be a program name with args. 1824 | set dummy cc; ac_word=$2 1825 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 1826 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 1827 | if test "${ac_cv_prog_CC+set}" = set; then 1828 | echo $ECHO_N "(cached) $ECHO_C" >&6 1829 | else 1830 | if test -n "$CC"; then 1831 | ac_cv_prog_CC="$CC" # Let the user override the test. 1832 | else 1833 | ac_prog_rejected=no 1834 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1835 | for as_dir in $PATH 1836 | do 1837 | IFS=$as_save_IFS 1838 | test -z "$as_dir" && as_dir=. 1839 | for ac_exec_ext in '' $ac_executable_extensions; do 1840 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then 1841 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then 1842 | ac_prog_rejected=yes 1843 | continue 1844 | fi 1845 | ac_cv_prog_CC="cc" 1846 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 1847 | break 2 1848 | fi 1849 | done 1850 | done 1851 | IFS=$as_save_IFS 1852 | 1853 | if test $ac_prog_rejected = yes; then 1854 | # We found a bogon in the path, so make sure we never use it. 1855 | set dummy $ac_cv_prog_CC 1856 | shift 1857 | if test $# != 0; then 1858 | # We chose a different compiler from the bogus one. 1859 | # However, it has the same basename, so the bogon will be chosen 1860 | # first if we set CC to just the basename; use the full file name. 1861 | shift 1862 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" 1863 | fi 1864 | fi 1865 | fi 1866 | fi 1867 | CC=$ac_cv_prog_CC 1868 | if test -n "$CC"; then 1869 | { echo "$as_me:$LINENO: result: $CC" >&5 1870 | echo "${ECHO_T}$CC" >&6; } 1871 | else 1872 | { echo "$as_me:$LINENO: result: no" >&5 1873 | echo "${ECHO_T}no" >&6; } 1874 | fi 1875 | 1876 | 1877 | fi 1878 | if test -z "$CC"; then 1879 | if test -n "$ac_tool_prefix"; then 1880 | for ac_prog in cl.exe 1881 | do 1882 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 1883 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 1884 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 1885 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 1886 | if test "${ac_cv_prog_CC+set}" = set; then 1887 | echo $ECHO_N "(cached) $ECHO_C" >&6 1888 | else 1889 | if test -n "$CC"; then 1890 | ac_cv_prog_CC="$CC" # Let the user override the test. 1891 | else 1892 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1893 | for as_dir in $PATH 1894 | do 1895 | IFS=$as_save_IFS 1896 | test -z "$as_dir" && as_dir=. 1897 | for ac_exec_ext in '' $ac_executable_extensions; do 1898 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then 1899 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" 1900 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 1901 | break 2 1902 | fi 1903 | done 1904 | done 1905 | IFS=$as_save_IFS 1906 | 1907 | fi 1908 | fi 1909 | CC=$ac_cv_prog_CC 1910 | if test -n "$CC"; then 1911 | { echo "$as_me:$LINENO: result: $CC" >&5 1912 | echo "${ECHO_T}$CC" >&6; } 1913 | else 1914 | { echo "$as_me:$LINENO: result: no" >&5 1915 | echo "${ECHO_T}no" >&6; } 1916 | fi 1917 | 1918 | 1919 | test -n "$CC" && break 1920 | done 1921 | fi 1922 | if test -z "$CC"; then 1923 | ac_ct_CC=$CC 1924 | for ac_prog in cl.exe 1925 | do 1926 | # Extract the first word of "$ac_prog", so it can be a program name with args. 1927 | set dummy $ac_prog; ac_word=$2 1928 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 1929 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 1930 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then 1931 | echo $ECHO_N "(cached) $ECHO_C" >&6 1932 | else 1933 | if test -n "$ac_ct_CC"; then 1934 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 1935 | else 1936 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1937 | for as_dir in $PATH 1938 | do 1939 | IFS=$as_save_IFS 1940 | test -z "$as_dir" && as_dir=. 1941 | for ac_exec_ext in '' $ac_executable_extensions; do 1942 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then 1943 | ac_cv_prog_ac_ct_CC="$ac_prog" 1944 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 1945 | break 2 1946 | fi 1947 | done 1948 | done 1949 | IFS=$as_save_IFS 1950 | 1951 | fi 1952 | fi 1953 | ac_ct_CC=$ac_cv_prog_ac_ct_CC 1954 | if test -n "$ac_ct_CC"; then 1955 | { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 1956 | echo "${ECHO_T}$ac_ct_CC" >&6; } 1957 | else 1958 | { echo "$as_me:$LINENO: result: no" >&5 1959 | echo "${ECHO_T}no" >&6; } 1960 | fi 1961 | 1962 | 1963 | test -n "$ac_ct_CC" && break 1964 | done 1965 | 1966 | if test "x$ac_ct_CC" = x; then 1967 | CC="" 1968 | else 1969 | case $cross_compiling:$ac_tool_warned in 1970 | yes:) 1971 | { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools 1972 | whose name does not start with the host triplet. If you think this 1973 | configuration is useful to you, please write to autoconf@gnu.org." >&5 1974 | echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools 1975 | whose name does not start with the host triplet. If you think this 1976 | configuration is useful to you, please write to autoconf@gnu.org." >&2;} 1977 | ac_tool_warned=yes ;; 1978 | esac 1979 | CC=$ac_ct_CC 1980 | fi 1981 | fi 1982 | 1983 | fi 1984 | 1985 | 1986 | test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH 1987 | See \`config.log' for more details." >&5 1988 | echo "$as_me: error: no acceptable C compiler found in \$PATH 1989 | See \`config.log' for more details." >&2;} 1990 | { (exit 1); exit 1; }; } 1991 | 1992 | # Provide some information about the compiler. 1993 | echo "$as_me:$LINENO: checking for C compiler version" >&5 1994 | ac_compiler=`set X $ac_compile; echo $2` 1995 | { (ac_try="$ac_compiler --version >&5" 1996 | case "(($ac_try" in 1997 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1998 | *) ac_try_echo=$ac_try;; 1999 | esac 2000 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2001 | (eval "$ac_compiler --version >&5") 2>&5 2002 | ac_status=$? 2003 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2004 | (exit $ac_status); } 2005 | { (ac_try="$ac_compiler -v >&5" 2006 | case "(($ac_try" in 2007 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2008 | *) ac_try_echo=$ac_try;; 2009 | esac 2010 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2011 | (eval "$ac_compiler -v >&5") 2>&5 2012 | ac_status=$? 2013 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2014 | (exit $ac_status); } 2015 | { (ac_try="$ac_compiler -V >&5" 2016 | case "(($ac_try" in 2017 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2018 | *) ac_try_echo=$ac_try;; 2019 | esac 2020 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2021 | (eval "$ac_compiler -V >&5") 2>&5 2022 | ac_status=$? 2023 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2024 | (exit $ac_status); } 2025 | 2026 | cat >conftest.$ac_ext <<_ACEOF 2027 | /* confdefs.h. */ 2028 | _ACEOF 2029 | cat confdefs.h >>conftest.$ac_ext 2030 | cat >>conftest.$ac_ext <<_ACEOF 2031 | /* end confdefs.h. */ 2032 | 2033 | int 2034 | main () 2035 | { 2036 | 2037 | ; 2038 | return 0; 2039 | } 2040 | _ACEOF 2041 | ac_clean_files_save=$ac_clean_files 2042 | ac_clean_files="$ac_clean_files a.out a.exe b.out" 2043 | # Try to create an executable without -o first, disregard a.out. 2044 | # It will help us diagnose broken compilers, and finding out an intuition 2045 | # of exeext. 2046 | { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 2047 | echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } 2048 | ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` 2049 | # 2050 | # List of possible output files, starting from the most likely. 2051 | # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) 2052 | # only as a last resort. b.out is created by i960 compilers. 2053 | ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' 2054 | # 2055 | # The IRIX 6 linker writes into existing files which may not be 2056 | # executable, retaining their permissions. Remove them first so a 2057 | # subsequent execution test works. 2058 | ac_rmfiles= 2059 | for ac_file in $ac_files 2060 | do 2061 | case $ac_file in 2062 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; 2063 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; 2064 | esac 2065 | done 2066 | rm -f $ac_rmfiles 2067 | 2068 | if { (ac_try="$ac_link_default" 2069 | case "(($ac_try" in 2070 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2071 | *) ac_try_echo=$ac_try;; 2072 | esac 2073 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2074 | (eval "$ac_link_default") 2>&5 2075 | ac_status=$? 2076 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2077 | (exit $ac_status); }; then 2078 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. 2079 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' 2080 | # in a Makefile. We should not override ac_cv_exeext if it was cached, 2081 | # so that the user can short-circuit this test for compilers unknown to 2082 | # Autoconf. 2083 | for ac_file in $ac_files 2084 | do 2085 | test -f "$ac_file" || continue 2086 | case $ac_file in 2087 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) 2088 | ;; 2089 | [ab].out ) 2090 | # We found the default executable, but exeext='' is most 2091 | # certainly right. 2092 | break;; 2093 | *.* ) 2094 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; 2095 | then :; else 2096 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 2097 | fi 2098 | # We set ac_cv_exeext here because the later test for it is not 2099 | # safe: cross compilers may not add the suffix if given an `-o' 2100 | # argument, so we may need to know it at that point already. 2101 | # Even if this section looks crufty: it has the advantage of 2102 | # actually working. 2103 | break;; 2104 | * ) 2105 | break;; 2106 | esac 2107 | done 2108 | test "$ac_cv_exeext" = no && ac_cv_exeext= 2109 | 2110 | else 2111 | echo "$as_me: failed program was:" >&5 2112 | sed 's/^/| /' conftest.$ac_ext >&5 2113 | 2114 | { { echo "$as_me:$LINENO: error: C compiler cannot create executables 2115 | See \`config.log' for more details." >&5 2116 | echo "$as_me: error: C compiler cannot create executables 2117 | See \`config.log' for more details." >&2;} 2118 | { (exit 77); exit 77; }; } 2119 | fi 2120 | 2121 | ac_exeext=$ac_cv_exeext 2122 | { echo "$as_me:$LINENO: result: $ac_file" >&5 2123 | echo "${ECHO_T}$ac_file" >&6; } 2124 | 2125 | # Check that the compiler produces executables we can run. If not, either 2126 | # the compiler is broken, or we cross compile. 2127 | { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 2128 | echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } 2129 | # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 2130 | # If not cross compiling, check that we can run a simple program. 2131 | if test "$cross_compiling" != yes; then 2132 | if { ac_try='./$ac_file' 2133 | { (case "(($ac_try" in 2134 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2135 | *) ac_try_echo=$ac_try;; 2136 | esac 2137 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2138 | (eval "$ac_try") 2>&5 2139 | ac_status=$? 2140 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2141 | (exit $ac_status); }; }; then 2142 | cross_compiling=no 2143 | else 2144 | if test "$cross_compiling" = maybe; then 2145 | cross_compiling=yes 2146 | else 2147 | { { echo "$as_me:$LINENO: error: cannot run C compiled programs. 2148 | If you meant to cross compile, use \`--host'. 2149 | See \`config.log' for more details." >&5 2150 | echo "$as_me: error: cannot run C compiled programs. 2151 | If you meant to cross compile, use \`--host'. 2152 | See \`config.log' for more details." >&2;} 2153 | { (exit 1); exit 1; }; } 2154 | fi 2155 | fi 2156 | fi 2157 | { echo "$as_me:$LINENO: result: yes" >&5 2158 | echo "${ECHO_T}yes" >&6; } 2159 | 2160 | rm -f a.out a.exe conftest$ac_cv_exeext b.out 2161 | ac_clean_files=$ac_clean_files_save 2162 | # Check that the compiler produces executables we can run. If not, either 2163 | # the compiler is broken, or we cross compile. 2164 | { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 2165 | echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } 2166 | { echo "$as_me:$LINENO: result: $cross_compiling" >&5 2167 | echo "${ECHO_T}$cross_compiling" >&6; } 2168 | 2169 | { echo "$as_me:$LINENO: checking for suffix of executables" >&5 2170 | echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } 2171 | if { (ac_try="$ac_link" 2172 | case "(($ac_try" in 2173 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2174 | *) ac_try_echo=$ac_try;; 2175 | esac 2176 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2177 | (eval "$ac_link") 2>&5 2178 | ac_status=$? 2179 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2180 | (exit $ac_status); }; then 2181 | # If both `conftest.exe' and `conftest' are `present' (well, observable) 2182 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will 2183 | # work properly (i.e., refer to `conftest.exe'), while it won't with 2184 | # `rm'. 2185 | for ac_file in conftest.exe conftest conftest.*; do 2186 | test -f "$ac_file" || continue 2187 | case $ac_file in 2188 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; 2189 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 2190 | break;; 2191 | * ) break;; 2192 | esac 2193 | done 2194 | else 2195 | { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link 2196 | See \`config.log' for more details." >&5 2197 | echo "$as_me: error: cannot compute suffix of executables: cannot compile and link 2198 | See \`config.log' for more details." >&2;} 2199 | { (exit 1); exit 1; }; } 2200 | fi 2201 | 2202 | rm -f conftest$ac_cv_exeext 2203 | { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 2204 | echo "${ECHO_T}$ac_cv_exeext" >&6; } 2205 | 2206 | rm -f conftest.$ac_ext 2207 | EXEEXT=$ac_cv_exeext 2208 | ac_exeext=$EXEEXT 2209 | { echo "$as_me:$LINENO: checking for suffix of object files" >&5 2210 | echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } 2211 | if test "${ac_cv_objext+set}" = set; then 2212 | echo $ECHO_N "(cached) $ECHO_C" >&6 2213 | else 2214 | cat >conftest.$ac_ext <<_ACEOF 2215 | /* confdefs.h. */ 2216 | _ACEOF 2217 | cat confdefs.h >>conftest.$ac_ext 2218 | cat >>conftest.$ac_ext <<_ACEOF 2219 | /* end confdefs.h. */ 2220 | 2221 | int 2222 | main () 2223 | { 2224 | 2225 | ; 2226 | return 0; 2227 | } 2228 | _ACEOF 2229 | rm -f conftest.o conftest.obj 2230 | if { (ac_try="$ac_compile" 2231 | case "(($ac_try" in 2232 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2233 | *) ac_try_echo=$ac_try;; 2234 | esac 2235 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2236 | (eval "$ac_compile") 2>&5 2237 | ac_status=$? 2238 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2239 | (exit $ac_status); }; then 2240 | for ac_file in conftest.o conftest.obj conftest.*; do 2241 | test -f "$ac_file" || continue; 2242 | case $ac_file in 2243 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; 2244 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` 2245 | break;; 2246 | esac 2247 | done 2248 | else 2249 | echo "$as_me: failed program was:" >&5 2250 | sed 's/^/| /' conftest.$ac_ext >&5 2251 | 2252 | { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile 2253 | See \`config.log' for more details." >&5 2254 | echo "$as_me: error: cannot compute suffix of object files: cannot compile 2255 | See \`config.log' for more details." >&2;} 2256 | { (exit 1); exit 1; }; } 2257 | fi 2258 | 2259 | rm -f conftest.$ac_cv_objext conftest.$ac_ext 2260 | fi 2261 | { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 2262 | echo "${ECHO_T}$ac_cv_objext" >&6; } 2263 | OBJEXT=$ac_cv_objext 2264 | ac_objext=$OBJEXT 2265 | { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 2266 | echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } 2267 | if test "${ac_cv_c_compiler_gnu+set}" = set; then 2268 | echo $ECHO_N "(cached) $ECHO_C" >&6 2269 | else 2270 | cat >conftest.$ac_ext <<_ACEOF 2271 | /* confdefs.h. */ 2272 | _ACEOF 2273 | cat confdefs.h >>conftest.$ac_ext 2274 | cat >>conftest.$ac_ext <<_ACEOF 2275 | /* end confdefs.h. */ 2276 | 2277 | int 2278 | main () 2279 | { 2280 | #ifndef __GNUC__ 2281 | choke me 2282 | #endif 2283 | 2284 | ; 2285 | return 0; 2286 | } 2287 | _ACEOF 2288 | rm -f conftest.$ac_objext 2289 | if { (ac_try="$ac_compile" 2290 | case "(($ac_try" in 2291 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2292 | *) ac_try_echo=$ac_try;; 2293 | esac 2294 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2295 | (eval "$ac_compile") 2>conftest.er1 2296 | ac_status=$? 2297 | grep -v '^ *+' conftest.er1 >conftest.err 2298 | rm -f conftest.er1 2299 | cat conftest.err >&5 2300 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2301 | (exit $ac_status); } && 2302 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' 2303 | { (case "(($ac_try" in 2304 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2305 | *) ac_try_echo=$ac_try;; 2306 | esac 2307 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2308 | (eval "$ac_try") 2>&5 2309 | ac_status=$? 2310 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2311 | (exit $ac_status); }; } && 2312 | { ac_try='test -s conftest.$ac_objext' 2313 | { (case "(($ac_try" in 2314 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2315 | *) ac_try_echo=$ac_try;; 2316 | esac 2317 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2318 | (eval "$ac_try") 2>&5 2319 | ac_status=$? 2320 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2321 | (exit $ac_status); }; }; then 2322 | ac_compiler_gnu=yes 2323 | else 2324 | echo "$as_me: failed program was:" >&5 2325 | sed 's/^/| /' conftest.$ac_ext >&5 2326 | 2327 | ac_compiler_gnu=no 2328 | fi 2329 | 2330 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2331 | ac_cv_c_compiler_gnu=$ac_compiler_gnu 2332 | 2333 | fi 2334 | { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 2335 | echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } 2336 | GCC=`test $ac_compiler_gnu = yes && echo yes` 2337 | ac_test_CFLAGS=${CFLAGS+set} 2338 | ac_save_CFLAGS=$CFLAGS 2339 | { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 2340 | echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } 2341 | if test "${ac_cv_prog_cc_g+set}" = set; then 2342 | echo $ECHO_N "(cached) $ECHO_C" >&6 2343 | else 2344 | ac_save_c_werror_flag=$ac_c_werror_flag 2345 | ac_c_werror_flag=yes 2346 | ac_cv_prog_cc_g=no 2347 | CFLAGS="-g" 2348 | cat >conftest.$ac_ext <<_ACEOF 2349 | /* confdefs.h. */ 2350 | _ACEOF 2351 | cat confdefs.h >>conftest.$ac_ext 2352 | cat >>conftest.$ac_ext <<_ACEOF 2353 | /* end confdefs.h. */ 2354 | 2355 | int 2356 | main () 2357 | { 2358 | 2359 | ; 2360 | return 0; 2361 | } 2362 | _ACEOF 2363 | rm -f conftest.$ac_objext 2364 | if { (ac_try="$ac_compile" 2365 | case "(($ac_try" in 2366 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2367 | *) ac_try_echo=$ac_try;; 2368 | esac 2369 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2370 | (eval "$ac_compile") 2>conftest.er1 2371 | ac_status=$? 2372 | grep -v '^ *+' conftest.er1 >conftest.err 2373 | rm -f conftest.er1 2374 | cat conftest.err >&5 2375 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2376 | (exit $ac_status); } && 2377 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' 2378 | { (case "(($ac_try" in 2379 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2380 | *) ac_try_echo=$ac_try;; 2381 | esac 2382 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2383 | (eval "$ac_try") 2>&5 2384 | ac_status=$? 2385 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2386 | (exit $ac_status); }; } && 2387 | { ac_try='test -s conftest.$ac_objext' 2388 | { (case "(($ac_try" in 2389 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2390 | *) ac_try_echo=$ac_try;; 2391 | esac 2392 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2393 | (eval "$ac_try") 2>&5 2394 | ac_status=$? 2395 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2396 | (exit $ac_status); }; }; then 2397 | ac_cv_prog_cc_g=yes 2398 | else 2399 | echo "$as_me: failed program was:" >&5 2400 | sed 's/^/| /' conftest.$ac_ext >&5 2401 | 2402 | CFLAGS="" 2403 | cat >conftest.$ac_ext <<_ACEOF 2404 | /* confdefs.h. */ 2405 | _ACEOF 2406 | cat confdefs.h >>conftest.$ac_ext 2407 | cat >>conftest.$ac_ext <<_ACEOF 2408 | /* end confdefs.h. */ 2409 | 2410 | int 2411 | main () 2412 | { 2413 | 2414 | ; 2415 | return 0; 2416 | } 2417 | _ACEOF 2418 | rm -f conftest.$ac_objext 2419 | if { (ac_try="$ac_compile" 2420 | case "(($ac_try" in 2421 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2422 | *) ac_try_echo=$ac_try;; 2423 | esac 2424 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2425 | (eval "$ac_compile") 2>conftest.er1 2426 | ac_status=$? 2427 | grep -v '^ *+' conftest.er1 >conftest.err 2428 | rm -f conftest.er1 2429 | cat conftest.err >&5 2430 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2431 | (exit $ac_status); } && 2432 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' 2433 | { (case "(($ac_try" in 2434 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2435 | *) ac_try_echo=$ac_try;; 2436 | esac 2437 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2438 | (eval "$ac_try") 2>&5 2439 | ac_status=$? 2440 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2441 | (exit $ac_status); }; } && 2442 | { ac_try='test -s conftest.$ac_objext' 2443 | { (case "(($ac_try" in 2444 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2445 | *) ac_try_echo=$ac_try;; 2446 | esac 2447 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2448 | (eval "$ac_try") 2>&5 2449 | ac_status=$? 2450 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2451 | (exit $ac_status); }; }; then 2452 | : 2453 | else 2454 | echo "$as_me: failed program was:" >&5 2455 | sed 's/^/| /' conftest.$ac_ext >&5 2456 | 2457 | ac_c_werror_flag=$ac_save_c_werror_flag 2458 | CFLAGS="-g" 2459 | cat >conftest.$ac_ext <<_ACEOF 2460 | /* confdefs.h. */ 2461 | _ACEOF 2462 | cat confdefs.h >>conftest.$ac_ext 2463 | cat >>conftest.$ac_ext <<_ACEOF 2464 | /* end confdefs.h. */ 2465 | 2466 | int 2467 | main () 2468 | { 2469 | 2470 | ; 2471 | return 0; 2472 | } 2473 | _ACEOF 2474 | rm -f conftest.$ac_objext 2475 | if { (ac_try="$ac_compile" 2476 | case "(($ac_try" in 2477 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2478 | *) ac_try_echo=$ac_try;; 2479 | esac 2480 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2481 | (eval "$ac_compile") 2>conftest.er1 2482 | ac_status=$? 2483 | grep -v '^ *+' conftest.er1 >conftest.err 2484 | rm -f conftest.er1 2485 | cat conftest.err >&5 2486 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2487 | (exit $ac_status); } && 2488 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' 2489 | { (case "(($ac_try" in 2490 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2491 | *) ac_try_echo=$ac_try;; 2492 | esac 2493 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2494 | (eval "$ac_try") 2>&5 2495 | ac_status=$? 2496 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2497 | (exit $ac_status); }; } && 2498 | { ac_try='test -s conftest.$ac_objext' 2499 | { (case "(($ac_try" in 2500 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2501 | *) ac_try_echo=$ac_try;; 2502 | esac 2503 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2504 | (eval "$ac_try") 2>&5 2505 | ac_status=$? 2506 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2507 | (exit $ac_status); }; }; then 2508 | ac_cv_prog_cc_g=yes 2509 | else 2510 | echo "$as_me: failed program was:" >&5 2511 | sed 's/^/| /' conftest.$ac_ext >&5 2512 | 2513 | 2514 | fi 2515 | 2516 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2517 | fi 2518 | 2519 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2520 | fi 2521 | 2522 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2523 | ac_c_werror_flag=$ac_save_c_werror_flag 2524 | fi 2525 | { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 2526 | echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } 2527 | if test "$ac_test_CFLAGS" = set; then 2528 | CFLAGS=$ac_save_CFLAGS 2529 | elif test $ac_cv_prog_cc_g = yes; then 2530 | if test "$GCC" = yes; then 2531 | CFLAGS="-g -O2" 2532 | else 2533 | CFLAGS="-g" 2534 | fi 2535 | else 2536 | if test "$GCC" = yes; then 2537 | CFLAGS="-O2" 2538 | else 2539 | CFLAGS= 2540 | fi 2541 | fi 2542 | { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 2543 | echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } 2544 | if test "${ac_cv_prog_cc_c89+set}" = set; then 2545 | echo $ECHO_N "(cached) $ECHO_C" >&6 2546 | else 2547 | ac_cv_prog_cc_c89=no 2548 | ac_save_CC=$CC 2549 | cat >conftest.$ac_ext <<_ACEOF 2550 | /* confdefs.h. */ 2551 | _ACEOF 2552 | cat confdefs.h >>conftest.$ac_ext 2553 | cat >>conftest.$ac_ext <<_ACEOF 2554 | /* end confdefs.h. */ 2555 | #include 2556 | #include 2557 | #include 2558 | #include 2559 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ 2560 | struct buf { int x; }; 2561 | FILE * (*rcsopen) (struct buf *, struct stat *, int); 2562 | static char *e (p, i) 2563 | char **p; 2564 | int i; 2565 | { 2566 | return p[i]; 2567 | } 2568 | static char *f (char * (*g) (char **, int), char **p, ...) 2569 | { 2570 | char *s; 2571 | va_list v; 2572 | va_start (v,p); 2573 | s = g (p, va_arg (v,int)); 2574 | va_end (v); 2575 | return s; 2576 | } 2577 | 2578 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has 2579 | function prototypes and stuff, but not '\xHH' hex character constants. 2580 | These don't provoke an error unfortunately, instead are silently treated 2581 | as 'x'. The following induces an error, until -std is added to get 2582 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an 2583 | array size at least. It's necessary to write '\x00'==0 to get something 2584 | that's true only with -std. */ 2585 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; 2586 | 2587 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters 2588 | inside strings and character constants. */ 2589 | #define FOO(x) 'x' 2590 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; 2591 | 2592 | int test (int i, double x); 2593 | struct s1 {int (*f) (int a);}; 2594 | struct s2 {int (*f) (double a);}; 2595 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); 2596 | int argc; 2597 | char **argv; 2598 | int 2599 | main () 2600 | { 2601 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; 2602 | ; 2603 | return 0; 2604 | } 2605 | _ACEOF 2606 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ 2607 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" 2608 | do 2609 | CC="$ac_save_CC $ac_arg" 2610 | rm -f conftest.$ac_objext 2611 | if { (ac_try="$ac_compile" 2612 | case "(($ac_try" in 2613 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2614 | *) ac_try_echo=$ac_try;; 2615 | esac 2616 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2617 | (eval "$ac_compile") 2>conftest.er1 2618 | ac_status=$? 2619 | grep -v '^ *+' conftest.er1 >conftest.err 2620 | rm -f conftest.er1 2621 | cat conftest.err >&5 2622 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2623 | (exit $ac_status); } && 2624 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' 2625 | { (case "(($ac_try" in 2626 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2627 | *) ac_try_echo=$ac_try;; 2628 | esac 2629 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2630 | (eval "$ac_try") 2>&5 2631 | ac_status=$? 2632 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2633 | (exit $ac_status); }; } && 2634 | { ac_try='test -s conftest.$ac_objext' 2635 | { (case "(($ac_try" in 2636 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2637 | *) ac_try_echo=$ac_try;; 2638 | esac 2639 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2640 | (eval "$ac_try") 2>&5 2641 | ac_status=$? 2642 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2643 | (exit $ac_status); }; }; then 2644 | ac_cv_prog_cc_c89=$ac_arg 2645 | else 2646 | echo "$as_me: failed program was:" >&5 2647 | sed 's/^/| /' conftest.$ac_ext >&5 2648 | 2649 | 2650 | fi 2651 | 2652 | rm -f core conftest.err conftest.$ac_objext 2653 | test "x$ac_cv_prog_cc_c89" != "xno" && break 2654 | done 2655 | rm -f conftest.$ac_ext 2656 | CC=$ac_save_CC 2657 | 2658 | fi 2659 | # AC_CACHE_VAL 2660 | case "x$ac_cv_prog_cc_c89" in 2661 | x) 2662 | { echo "$as_me:$LINENO: result: none needed" >&5 2663 | echo "${ECHO_T}none needed" >&6; } ;; 2664 | xno) 2665 | { echo "$as_me:$LINENO: result: unsupported" >&5 2666 | echo "${ECHO_T}unsupported" >&6; } ;; 2667 | *) 2668 | CC="$CC $ac_cv_prog_cc_c89" 2669 | { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 2670 | echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; 2671 | esac 2672 | 2673 | 2674 | ac_ext=c 2675 | ac_cpp='$CPP $CPPFLAGS' 2676 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2677 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2678 | ac_compiler_gnu=$ac_cv_c_compiler_gnu 2679 | 2680 | # Extract the first word of "erl", so it can be a program name with args. 2681 | set dummy erl; ac_word=$2 2682 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 2683 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 2684 | if test "${ac_cv_path_ERL+set}" = set; then 2685 | echo $ECHO_N "(cached) $ECHO_C" >&6 2686 | else 2687 | case $ERL in 2688 | [\\/]* | ?:[\\/]*) 2689 | ac_cv_path_ERL="$ERL" # Let the user override the test with a path. 2690 | ;; 2691 | *) 2692 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2693 | for as_dir in $PATH 2694 | do 2695 | IFS=$as_save_IFS 2696 | test -z "$as_dir" && as_dir=. 2697 | for ac_exec_ext in '' $ac_executable_extensions; do 2698 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then 2699 | ac_cv_path_ERL="$as_dir/$ac_word$ac_exec_ext" 2700 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2701 | break 2 2702 | fi 2703 | done 2704 | done 2705 | IFS=$as_save_IFS 2706 | 2707 | ;; 2708 | esac 2709 | fi 2710 | ERL=$ac_cv_path_ERL 2711 | if test -n "$ERL"; then 2712 | { echo "$as_me:$LINENO: result: $ERL" >&5 2713 | echo "${ECHO_T}$ERL" >&6; } 2714 | else 2715 | { echo "$as_me:$LINENO: result: no" >&5 2716 | echo "${ECHO_T}no" >&6; } 2717 | fi 2718 | 2719 | 2720 | # Extract the first word of "erlc", so it can be a program name with args. 2721 | set dummy erlc; ac_word=$2 2722 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 2723 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 2724 | if test "${ac_cv_path_ERLC+set}" = set; then 2725 | echo $ECHO_N "(cached) $ECHO_C" >&6 2726 | else 2727 | case $ERLC in 2728 | [\\/]* | ?:[\\/]*) 2729 | ac_cv_path_ERLC="$ERLC" # Let the user override the test with a path. 2730 | ;; 2731 | *) 2732 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2733 | for as_dir in $PATH 2734 | do 2735 | IFS=$as_save_IFS 2736 | test -z "$as_dir" && as_dir=. 2737 | for ac_exec_ext in '' $ac_executable_extensions; do 2738 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then 2739 | ac_cv_path_ERLC="$as_dir/$ac_word$ac_exec_ext" 2740 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2741 | break 2 2742 | fi 2743 | done 2744 | done 2745 | IFS=$as_save_IFS 2746 | 2747 | ;; 2748 | esac 2749 | fi 2750 | ERLC=$ac_cv_path_ERLC 2751 | if test -n "$ERLC"; then 2752 | { echo "$as_me:$LINENO: result: $ERLC" >&5 2753 | echo "${ECHO_T}$ERLC" >&6; } 2754 | else 2755 | { echo "$as_me:$LINENO: result: no" >&5 2756 | echo "${ECHO_T}no" >&6; } 2757 | fi 2758 | 2759 | 2760 | # 2761 | 2762 | # Check whether --with-judy was given. 2763 | if test "${with_judy+set}" = set; then 2764 | withval=$with_judy; JUDY_PREFIX=$with_judy 2765 | else 2766 | JUDY_PREFIX=/usr/local 2767 | fi 2768 | 2769 | 2770 | 2771 | JUDY_LIBS="-L${JUDY_PREFIX}/lib -lJudy" 2772 | JUDY_CFLAGS="-I${JUDY_PREFIX}/include" 2773 | 2774 | 2775 | 2776 | ERLDIR=`awk -F= '/ROOTDIR=/ { print $2; exit; }' $ERL` 2777 | 2778 | 2779 | 2780 | 2781 | 2782 | ERL_INTERFACE=`ls ${ERLDIR}/lib | grep erl_interface | tail -n 1` 2783 | 2784 | ERTSBASE="`$ERL -noshell -noinput -eval 'io:format (\"~s\", [ \"/\" ++ filename:join (lists:reverse ([ \"erts-\" ++ erlang:system_info (version) | tl (lists:reverse (string:tokens (code:lib_dir (), \"/\"))) ])) ]).' -s erlang halt `" 2785 | 2786 | 2787 | CPPFLAGS="$CPPFLAGS -I ${ERTSBASE}/include -I ${ERLDIR}/lib/${ERL_INTERFACE}/include -Wall -fPIC -I./" 2788 | 2789 | LIBEI="${ERLDIR}/lib/${ERL_INTERFACE}/lib/libei.a" 2790 | 2791 | # Checks for header files. 2792 | 2793 | ac_ext=c 2794 | ac_cpp='$CPP $CPPFLAGS' 2795 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2796 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2797 | ac_compiler_gnu=$ac_cv_c_compiler_gnu 2798 | { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 2799 | echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } 2800 | # On Suns, sometimes $CPP names a directory. 2801 | if test -n "$CPP" && test -d "$CPP"; then 2802 | CPP= 2803 | fi 2804 | if test -z "$CPP"; then 2805 | if test "${ac_cv_prog_CPP+set}" = set; then 2806 | echo $ECHO_N "(cached) $ECHO_C" >&6 2807 | else 2808 | # Double quotes because CPP needs to be expanded 2809 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" 2810 | do 2811 | ac_preproc_ok=false 2812 | for ac_c_preproc_warn_flag in '' yes 2813 | do 2814 | # Use a header file that comes with gcc, so configuring glibc 2815 | # with a fresh cross-compiler works. 2816 | # Prefer to if __STDC__ is defined, since 2817 | # exists even on freestanding compilers. 2818 | # On the NeXT, cc -E runs the code through the compiler's parser, 2819 | # not just through cpp. "Syntax error" is here to catch this case. 2820 | cat >conftest.$ac_ext <<_ACEOF 2821 | /* confdefs.h. */ 2822 | _ACEOF 2823 | cat confdefs.h >>conftest.$ac_ext 2824 | cat >>conftest.$ac_ext <<_ACEOF 2825 | /* end confdefs.h. */ 2826 | #ifdef __STDC__ 2827 | # include 2828 | #else 2829 | # include 2830 | #endif 2831 | Syntax error 2832 | _ACEOF 2833 | if { (ac_try="$ac_cpp conftest.$ac_ext" 2834 | case "(($ac_try" in 2835 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2836 | *) ac_try_echo=$ac_try;; 2837 | esac 2838 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2839 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 2840 | ac_status=$? 2841 | grep -v '^ *+' conftest.er1 >conftest.err 2842 | rm -f conftest.er1 2843 | cat conftest.err >&5 2844 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2845 | (exit $ac_status); } >/dev/null; then 2846 | if test -s conftest.err; then 2847 | ac_cpp_err=$ac_c_preproc_warn_flag 2848 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 2849 | else 2850 | ac_cpp_err= 2851 | fi 2852 | else 2853 | ac_cpp_err=yes 2854 | fi 2855 | if test -z "$ac_cpp_err"; then 2856 | : 2857 | else 2858 | echo "$as_me: failed program was:" >&5 2859 | sed 's/^/| /' conftest.$ac_ext >&5 2860 | 2861 | # Broken: fails on valid input. 2862 | continue 2863 | fi 2864 | 2865 | rm -f conftest.err conftest.$ac_ext 2866 | 2867 | # OK, works on sane cases. Now check whether nonexistent headers 2868 | # can be detected and how. 2869 | cat >conftest.$ac_ext <<_ACEOF 2870 | /* confdefs.h. */ 2871 | _ACEOF 2872 | cat confdefs.h >>conftest.$ac_ext 2873 | cat >>conftest.$ac_ext <<_ACEOF 2874 | /* end confdefs.h. */ 2875 | #include 2876 | _ACEOF 2877 | if { (ac_try="$ac_cpp conftest.$ac_ext" 2878 | case "(($ac_try" in 2879 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2880 | *) ac_try_echo=$ac_try;; 2881 | esac 2882 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2883 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 2884 | ac_status=$? 2885 | grep -v '^ *+' conftest.er1 >conftest.err 2886 | rm -f conftest.er1 2887 | cat conftest.err >&5 2888 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2889 | (exit $ac_status); } >/dev/null; then 2890 | if test -s conftest.err; then 2891 | ac_cpp_err=$ac_c_preproc_warn_flag 2892 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 2893 | else 2894 | ac_cpp_err= 2895 | fi 2896 | else 2897 | ac_cpp_err=yes 2898 | fi 2899 | if test -z "$ac_cpp_err"; then 2900 | # Broken: success on invalid input. 2901 | continue 2902 | else 2903 | echo "$as_me: failed program was:" >&5 2904 | sed 's/^/| /' conftest.$ac_ext >&5 2905 | 2906 | # Passes both tests. 2907 | ac_preproc_ok=: 2908 | break 2909 | fi 2910 | 2911 | rm -f conftest.err conftest.$ac_ext 2912 | 2913 | done 2914 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 2915 | rm -f conftest.err conftest.$ac_ext 2916 | if $ac_preproc_ok; then 2917 | break 2918 | fi 2919 | 2920 | done 2921 | ac_cv_prog_CPP=$CPP 2922 | 2923 | fi 2924 | CPP=$ac_cv_prog_CPP 2925 | else 2926 | ac_cv_prog_CPP=$CPP 2927 | fi 2928 | { echo "$as_me:$LINENO: result: $CPP" >&5 2929 | echo "${ECHO_T}$CPP" >&6; } 2930 | ac_preproc_ok=false 2931 | for ac_c_preproc_warn_flag in '' yes 2932 | do 2933 | # Use a header file that comes with gcc, so configuring glibc 2934 | # with a fresh cross-compiler works. 2935 | # Prefer to if __STDC__ is defined, since 2936 | # exists even on freestanding compilers. 2937 | # On the NeXT, cc -E runs the code through the compiler's parser, 2938 | # not just through cpp. "Syntax error" is here to catch this case. 2939 | cat >conftest.$ac_ext <<_ACEOF 2940 | /* confdefs.h. */ 2941 | _ACEOF 2942 | cat confdefs.h >>conftest.$ac_ext 2943 | cat >>conftest.$ac_ext <<_ACEOF 2944 | /* end confdefs.h. */ 2945 | #ifdef __STDC__ 2946 | # include 2947 | #else 2948 | # include 2949 | #endif 2950 | Syntax error 2951 | _ACEOF 2952 | if { (ac_try="$ac_cpp conftest.$ac_ext" 2953 | case "(($ac_try" in 2954 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2955 | *) ac_try_echo=$ac_try;; 2956 | esac 2957 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2958 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 2959 | ac_status=$? 2960 | grep -v '^ *+' conftest.er1 >conftest.err 2961 | rm -f conftest.er1 2962 | cat conftest.err >&5 2963 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 2964 | (exit $ac_status); } >/dev/null; then 2965 | if test -s conftest.err; then 2966 | ac_cpp_err=$ac_c_preproc_warn_flag 2967 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 2968 | else 2969 | ac_cpp_err= 2970 | fi 2971 | else 2972 | ac_cpp_err=yes 2973 | fi 2974 | if test -z "$ac_cpp_err"; then 2975 | : 2976 | else 2977 | echo "$as_me: failed program was:" >&5 2978 | sed 's/^/| /' conftest.$ac_ext >&5 2979 | 2980 | # Broken: fails on valid input. 2981 | continue 2982 | fi 2983 | 2984 | rm -f conftest.err conftest.$ac_ext 2985 | 2986 | # OK, works on sane cases. Now check whether nonexistent headers 2987 | # can be detected and how. 2988 | cat >conftest.$ac_ext <<_ACEOF 2989 | /* confdefs.h. */ 2990 | _ACEOF 2991 | cat confdefs.h >>conftest.$ac_ext 2992 | cat >>conftest.$ac_ext <<_ACEOF 2993 | /* end confdefs.h. */ 2994 | #include 2995 | _ACEOF 2996 | if { (ac_try="$ac_cpp conftest.$ac_ext" 2997 | case "(($ac_try" in 2998 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2999 | *) ac_try_echo=$ac_try;; 3000 | esac 3001 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3002 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 3003 | ac_status=$? 3004 | grep -v '^ *+' conftest.er1 >conftest.err 3005 | rm -f conftest.er1 3006 | cat conftest.err >&5 3007 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 3008 | (exit $ac_status); } >/dev/null; then 3009 | if test -s conftest.err; then 3010 | ac_cpp_err=$ac_c_preproc_warn_flag 3011 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 3012 | else 3013 | ac_cpp_err= 3014 | fi 3015 | else 3016 | ac_cpp_err=yes 3017 | fi 3018 | if test -z "$ac_cpp_err"; then 3019 | # Broken: success on invalid input. 3020 | continue 3021 | else 3022 | echo "$as_me: failed program was:" >&5 3023 | sed 's/^/| /' conftest.$ac_ext >&5 3024 | 3025 | # Passes both tests. 3026 | ac_preproc_ok=: 3027 | break 3028 | fi 3029 | 3030 | rm -f conftest.err conftest.$ac_ext 3031 | 3032 | done 3033 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 3034 | rm -f conftest.err conftest.$ac_ext 3035 | if $ac_preproc_ok; then 3036 | : 3037 | else 3038 | { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check 3039 | See \`config.log' for more details." >&5 3040 | echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check 3041 | See \`config.log' for more details." >&2;} 3042 | { (exit 1); exit 1; }; } 3043 | fi 3044 | 3045 | ac_ext=c 3046 | ac_cpp='$CPP $CPPFLAGS' 3047 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 3048 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 3049 | ac_compiler_gnu=$ac_cv_c_compiler_gnu 3050 | 3051 | 3052 | { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 3053 | echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } 3054 | if test "${ac_cv_path_GREP+set}" = set; then 3055 | echo $ECHO_N "(cached) $ECHO_C" >&6 3056 | else 3057 | # Extract the first word of "grep ggrep" to use in msg output 3058 | if test -z "$GREP"; then 3059 | set dummy grep ggrep; ac_prog_name=$2 3060 | if test "${ac_cv_path_GREP+set}" = set; then 3061 | echo $ECHO_N "(cached) $ECHO_C" >&6 3062 | else 3063 | ac_path_GREP_found=false 3064 | # Loop through the user's path and test for each of PROGNAME-LIST 3065 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3066 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 3067 | do 3068 | IFS=$as_save_IFS 3069 | test -z "$as_dir" && as_dir=. 3070 | for ac_prog in grep ggrep; do 3071 | for ac_exec_ext in '' $ac_executable_extensions; do 3072 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" 3073 | { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue 3074 | # Check for GNU ac_path_GREP and select it if it is found. 3075 | # Check for GNU $ac_path_GREP 3076 | case `"$ac_path_GREP" --version 2>&1` in 3077 | *GNU*) 3078 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; 3079 | *) 3080 | ac_count=0 3081 | echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" 3082 | while : 3083 | do 3084 | cat "conftest.in" "conftest.in" >"conftest.tmp" 3085 | mv "conftest.tmp" "conftest.in" 3086 | cp "conftest.in" "conftest.nl" 3087 | echo 'GREP' >> "conftest.nl" 3088 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break 3089 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 3090 | ac_count=`expr $ac_count + 1` 3091 | if test $ac_count -gt ${ac_path_GREP_max-0}; then 3092 | # Best one so far, save it but keep looking for a better one 3093 | ac_cv_path_GREP="$ac_path_GREP" 3094 | ac_path_GREP_max=$ac_count 3095 | fi 3096 | # 10*(2^10) chars as input seems more than enough 3097 | test $ac_count -gt 10 && break 3098 | done 3099 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 3100 | esac 3101 | 3102 | 3103 | $ac_path_GREP_found && break 3 3104 | done 3105 | done 3106 | 3107 | done 3108 | IFS=$as_save_IFS 3109 | 3110 | 3111 | fi 3112 | 3113 | GREP="$ac_cv_path_GREP" 3114 | if test -z "$GREP"; then 3115 | { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 3116 | echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} 3117 | { (exit 1); exit 1; }; } 3118 | fi 3119 | 3120 | else 3121 | ac_cv_path_GREP=$GREP 3122 | fi 3123 | 3124 | 3125 | fi 3126 | { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 3127 | echo "${ECHO_T}$ac_cv_path_GREP" >&6; } 3128 | GREP="$ac_cv_path_GREP" 3129 | 3130 | 3131 | { echo "$as_me:$LINENO: checking for egrep" >&5 3132 | echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } 3133 | if test "${ac_cv_path_EGREP+set}" = set; then 3134 | echo $ECHO_N "(cached) $ECHO_C" >&6 3135 | else 3136 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 3137 | then ac_cv_path_EGREP="$GREP -E" 3138 | else 3139 | # Extract the first word of "egrep" to use in msg output 3140 | if test -z "$EGREP"; then 3141 | set dummy egrep; ac_prog_name=$2 3142 | if test "${ac_cv_path_EGREP+set}" = set; then 3143 | echo $ECHO_N "(cached) $ECHO_C" >&6 3144 | else 3145 | ac_path_EGREP_found=false 3146 | # Loop through the user's path and test for each of PROGNAME-LIST 3147 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3148 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 3149 | do 3150 | IFS=$as_save_IFS 3151 | test -z "$as_dir" && as_dir=. 3152 | for ac_prog in egrep; do 3153 | for ac_exec_ext in '' $ac_executable_extensions; do 3154 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" 3155 | { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue 3156 | # Check for GNU ac_path_EGREP and select it if it is found. 3157 | # Check for GNU $ac_path_EGREP 3158 | case `"$ac_path_EGREP" --version 2>&1` in 3159 | *GNU*) 3160 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; 3161 | *) 3162 | ac_count=0 3163 | echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" 3164 | while : 3165 | do 3166 | cat "conftest.in" "conftest.in" >"conftest.tmp" 3167 | mv "conftest.tmp" "conftest.in" 3168 | cp "conftest.in" "conftest.nl" 3169 | echo 'EGREP' >> "conftest.nl" 3170 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break 3171 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 3172 | ac_count=`expr $ac_count + 1` 3173 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then 3174 | # Best one so far, save it but keep looking for a better one 3175 | ac_cv_path_EGREP="$ac_path_EGREP" 3176 | ac_path_EGREP_max=$ac_count 3177 | fi 3178 | # 10*(2^10) chars as input seems more than enough 3179 | test $ac_count -gt 10 && break 3180 | done 3181 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 3182 | esac 3183 | 3184 | 3185 | $ac_path_EGREP_found && break 3 3186 | done 3187 | done 3188 | 3189 | done 3190 | IFS=$as_save_IFS 3191 | 3192 | 3193 | fi 3194 | 3195 | EGREP="$ac_cv_path_EGREP" 3196 | if test -z "$EGREP"; then 3197 | { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 3198 | echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} 3199 | { (exit 1); exit 1; }; } 3200 | fi 3201 | 3202 | else 3203 | ac_cv_path_EGREP=$EGREP 3204 | fi 3205 | 3206 | 3207 | fi 3208 | fi 3209 | { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 3210 | echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } 3211 | EGREP="$ac_cv_path_EGREP" 3212 | 3213 | 3214 | { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 3215 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } 3216 | if test "${ac_cv_header_stdc+set}" = set; then 3217 | echo $ECHO_N "(cached) $ECHO_C" >&6 3218 | else 3219 | cat >conftest.$ac_ext <<_ACEOF 3220 | /* confdefs.h. */ 3221 | _ACEOF 3222 | cat confdefs.h >>conftest.$ac_ext 3223 | cat >>conftest.$ac_ext <<_ACEOF 3224 | /* end confdefs.h. */ 3225 | #include 3226 | #include 3227 | #include 3228 | #include 3229 | 3230 | int 3231 | main () 3232 | { 3233 | 3234 | ; 3235 | return 0; 3236 | } 3237 | _ACEOF 3238 | rm -f conftest.$ac_objext 3239 | if { (ac_try="$ac_compile" 3240 | case "(($ac_try" in 3241 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3242 | *) ac_try_echo=$ac_try;; 3243 | esac 3244 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3245 | (eval "$ac_compile") 2>conftest.er1 3246 | ac_status=$? 3247 | grep -v '^ *+' conftest.er1 >conftest.err 3248 | rm -f conftest.er1 3249 | cat conftest.err >&5 3250 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 3251 | (exit $ac_status); } && 3252 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' 3253 | { (case "(($ac_try" in 3254 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3255 | *) ac_try_echo=$ac_try;; 3256 | esac 3257 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3258 | (eval "$ac_try") 2>&5 3259 | ac_status=$? 3260 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 3261 | (exit $ac_status); }; } && 3262 | { ac_try='test -s conftest.$ac_objext' 3263 | { (case "(($ac_try" in 3264 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3265 | *) ac_try_echo=$ac_try;; 3266 | esac 3267 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3268 | (eval "$ac_try") 2>&5 3269 | ac_status=$? 3270 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 3271 | (exit $ac_status); }; }; then 3272 | ac_cv_header_stdc=yes 3273 | else 3274 | echo "$as_me: failed program was:" >&5 3275 | sed 's/^/| /' conftest.$ac_ext >&5 3276 | 3277 | ac_cv_header_stdc=no 3278 | fi 3279 | 3280 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3281 | 3282 | if test $ac_cv_header_stdc = yes; then 3283 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 3284 | cat >conftest.$ac_ext <<_ACEOF 3285 | /* confdefs.h. */ 3286 | _ACEOF 3287 | cat confdefs.h >>conftest.$ac_ext 3288 | cat >>conftest.$ac_ext <<_ACEOF 3289 | /* end confdefs.h. */ 3290 | #include 3291 | 3292 | _ACEOF 3293 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 3294 | $EGREP "memchr" >/dev/null 2>&1; then 3295 | : 3296 | else 3297 | ac_cv_header_stdc=no 3298 | fi 3299 | rm -f conftest* 3300 | 3301 | fi 3302 | 3303 | if test $ac_cv_header_stdc = yes; then 3304 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 3305 | cat >conftest.$ac_ext <<_ACEOF 3306 | /* confdefs.h. */ 3307 | _ACEOF 3308 | cat confdefs.h >>conftest.$ac_ext 3309 | cat >>conftest.$ac_ext <<_ACEOF 3310 | /* end confdefs.h. */ 3311 | #include 3312 | 3313 | _ACEOF 3314 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 3315 | $EGREP "free" >/dev/null 2>&1; then 3316 | : 3317 | else 3318 | ac_cv_header_stdc=no 3319 | fi 3320 | rm -f conftest* 3321 | 3322 | fi 3323 | 3324 | if test $ac_cv_header_stdc = yes; then 3325 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. 3326 | if test "$cross_compiling" = yes; then 3327 | : 3328 | else 3329 | cat >conftest.$ac_ext <<_ACEOF 3330 | /* confdefs.h. */ 3331 | _ACEOF 3332 | cat confdefs.h >>conftest.$ac_ext 3333 | cat >>conftest.$ac_ext <<_ACEOF 3334 | /* end confdefs.h. */ 3335 | #include 3336 | #include 3337 | #if ((' ' & 0x0FF) == 0x020) 3338 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') 3339 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) 3340 | #else 3341 | # define ISLOWER(c) \ 3342 | (('a' <= (c) && (c) <= 'i') \ 3343 | || ('j' <= (c) && (c) <= 'r') \ 3344 | || ('s' <= (c) && (c) <= 'z')) 3345 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) 3346 | #endif 3347 | 3348 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) 3349 | int 3350 | main () 3351 | { 3352 | int i; 3353 | for (i = 0; i < 256; i++) 3354 | if (XOR (islower (i), ISLOWER (i)) 3355 | || toupper (i) != TOUPPER (i)) 3356 | return 2; 3357 | return 0; 3358 | } 3359 | _ACEOF 3360 | rm -f conftest$ac_exeext 3361 | if { (ac_try="$ac_link" 3362 | case "(($ac_try" in 3363 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3364 | *) ac_try_echo=$ac_try;; 3365 | esac 3366 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3367 | (eval "$ac_link") 2>&5 3368 | ac_status=$? 3369 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 3370 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 3371 | { (case "(($ac_try" in 3372 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3373 | *) ac_try_echo=$ac_try;; 3374 | esac 3375 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3376 | (eval "$ac_try") 2>&5 3377 | ac_status=$? 3378 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 3379 | (exit $ac_status); }; }; then 3380 | : 3381 | else 3382 | echo "$as_me: program exited with status $ac_status" >&5 3383 | echo "$as_me: failed program was:" >&5 3384 | sed 's/^/| /' conftest.$ac_ext >&5 3385 | 3386 | ( exit $ac_status ) 3387 | ac_cv_header_stdc=no 3388 | fi 3389 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 3390 | fi 3391 | 3392 | 3393 | fi 3394 | fi 3395 | { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 3396 | echo "${ECHO_T}$ac_cv_header_stdc" >&6; } 3397 | if test $ac_cv_header_stdc = yes; then 3398 | 3399 | cat >>confdefs.h <<\_ACEOF 3400 | #define STDC_HEADERS 1 3401 | _ACEOF 3402 | 3403 | fi 3404 | 3405 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. 3406 | 3407 | 3408 | 3409 | 3410 | 3411 | 3412 | 3413 | 3414 | 3415 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ 3416 | inttypes.h stdint.h unistd.h 3417 | do 3418 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 3419 | { echo "$as_me:$LINENO: checking for $ac_header" >&5 3420 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } 3421 | if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 3422 | echo $ECHO_N "(cached) $ECHO_C" >&6 3423 | else 3424 | cat >conftest.$ac_ext <<_ACEOF 3425 | /* confdefs.h. */ 3426 | _ACEOF 3427 | cat confdefs.h >>conftest.$ac_ext 3428 | cat >>conftest.$ac_ext <<_ACEOF 3429 | /* end confdefs.h. */ 3430 | $ac_includes_default 3431 | 3432 | #include <$ac_header> 3433 | _ACEOF 3434 | rm -f conftest.$ac_objext 3435 | if { (ac_try="$ac_compile" 3436 | case "(($ac_try" in 3437 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3438 | *) ac_try_echo=$ac_try;; 3439 | esac 3440 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3441 | (eval "$ac_compile") 2>conftest.er1 3442 | ac_status=$? 3443 | grep -v '^ *+' conftest.er1 >conftest.err 3444 | rm -f conftest.er1 3445 | cat conftest.err >&5 3446 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 3447 | (exit $ac_status); } && 3448 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' 3449 | { (case "(($ac_try" in 3450 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3451 | *) ac_try_echo=$ac_try;; 3452 | esac 3453 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3454 | (eval "$ac_try") 2>&5 3455 | ac_status=$? 3456 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 3457 | (exit $ac_status); }; } && 3458 | { ac_try='test -s conftest.$ac_objext' 3459 | { (case "(($ac_try" in 3460 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3461 | *) ac_try_echo=$ac_try;; 3462 | esac 3463 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3464 | (eval "$ac_try") 2>&5 3465 | ac_status=$? 3466 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 3467 | (exit $ac_status); }; }; then 3468 | eval "$as_ac_Header=yes" 3469 | else 3470 | echo "$as_me: failed program was:" >&5 3471 | sed 's/^/| /' conftest.$ac_ext >&5 3472 | 3473 | eval "$as_ac_Header=no" 3474 | fi 3475 | 3476 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3477 | fi 3478 | ac_res=`eval echo '${'$as_ac_Header'}'` 3479 | { echo "$as_me:$LINENO: result: $ac_res" >&5 3480 | echo "${ECHO_T}$ac_res" >&6; } 3481 | if test `eval echo '${'$as_ac_Header'}'` = yes; then 3482 | cat >>confdefs.h <<_ACEOF 3483 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 3484 | _ACEOF 3485 | 3486 | fi 3487 | 3488 | done 3489 | 3490 | 3491 | for ac_header in 3492 | do 3493 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 3494 | if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 3495 | { echo "$as_me:$LINENO: checking for $ac_header" >&5 3496 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } 3497 | if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 3498 | echo $ECHO_N "(cached) $ECHO_C" >&6 3499 | fi 3500 | ac_res=`eval echo '${'$as_ac_Header'}'` 3501 | { echo "$as_me:$LINENO: result: $ac_res" >&5 3502 | echo "${ECHO_T}$ac_res" >&6; } 3503 | else 3504 | # Is the header compilable? 3505 | { echo "$as_me:$LINENO: checking $ac_header usability" >&5 3506 | echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } 3507 | cat >conftest.$ac_ext <<_ACEOF 3508 | /* confdefs.h. */ 3509 | _ACEOF 3510 | cat confdefs.h >>conftest.$ac_ext 3511 | cat >>conftest.$ac_ext <<_ACEOF 3512 | /* end confdefs.h. */ 3513 | $ac_includes_default 3514 | #include <$ac_header> 3515 | _ACEOF 3516 | rm -f conftest.$ac_objext 3517 | if { (ac_try="$ac_compile" 3518 | case "(($ac_try" in 3519 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3520 | *) ac_try_echo=$ac_try;; 3521 | esac 3522 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3523 | (eval "$ac_compile") 2>conftest.er1 3524 | ac_status=$? 3525 | grep -v '^ *+' conftest.er1 >conftest.err 3526 | rm -f conftest.er1 3527 | cat conftest.err >&5 3528 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 3529 | (exit $ac_status); } && 3530 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' 3531 | { (case "(($ac_try" in 3532 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3533 | *) ac_try_echo=$ac_try;; 3534 | esac 3535 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3536 | (eval "$ac_try") 2>&5 3537 | ac_status=$? 3538 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 3539 | (exit $ac_status); }; } && 3540 | { ac_try='test -s conftest.$ac_objext' 3541 | { (case "(($ac_try" in 3542 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3543 | *) ac_try_echo=$ac_try;; 3544 | esac 3545 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3546 | (eval "$ac_try") 2>&5 3547 | ac_status=$? 3548 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 3549 | (exit $ac_status); }; }; then 3550 | ac_header_compiler=yes 3551 | else 3552 | echo "$as_me: failed program was:" >&5 3553 | sed 's/^/| /' conftest.$ac_ext >&5 3554 | 3555 | ac_header_compiler=no 3556 | fi 3557 | 3558 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3559 | { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 3560 | echo "${ECHO_T}$ac_header_compiler" >&6; } 3561 | 3562 | # Is the header present? 3563 | { echo "$as_me:$LINENO: checking $ac_header presence" >&5 3564 | echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } 3565 | cat >conftest.$ac_ext <<_ACEOF 3566 | /* confdefs.h. */ 3567 | _ACEOF 3568 | cat confdefs.h >>conftest.$ac_ext 3569 | cat >>conftest.$ac_ext <<_ACEOF 3570 | /* end confdefs.h. */ 3571 | #include <$ac_header> 3572 | _ACEOF 3573 | if { (ac_try="$ac_cpp conftest.$ac_ext" 3574 | case "(($ac_try" in 3575 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3576 | *) ac_try_echo=$ac_try;; 3577 | esac 3578 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3579 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 3580 | ac_status=$? 3581 | grep -v '^ *+' conftest.er1 >conftest.err 3582 | rm -f conftest.er1 3583 | cat conftest.err >&5 3584 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 3585 | (exit $ac_status); } >/dev/null; then 3586 | if test -s conftest.err; then 3587 | ac_cpp_err=$ac_c_preproc_warn_flag 3588 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 3589 | else 3590 | ac_cpp_err= 3591 | fi 3592 | else 3593 | ac_cpp_err=yes 3594 | fi 3595 | if test -z "$ac_cpp_err"; then 3596 | ac_header_preproc=yes 3597 | else 3598 | echo "$as_me: failed program was:" >&5 3599 | sed 's/^/| /' conftest.$ac_ext >&5 3600 | 3601 | ac_header_preproc=no 3602 | fi 3603 | 3604 | rm -f conftest.err conftest.$ac_ext 3605 | { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 3606 | echo "${ECHO_T}$ac_header_preproc" >&6; } 3607 | 3608 | # So? What about this header? 3609 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 3610 | yes:no: ) 3611 | { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 3612 | echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} 3613 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 3614 | echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} 3615 | ac_header_preproc=yes 3616 | ;; 3617 | no:yes:* ) 3618 | { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 3619 | echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} 3620 | { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 3621 | echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} 3622 | { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 3623 | echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 3624 | { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 3625 | echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} 3626 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 3627 | echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 3628 | { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 3629 | echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 3630 | 3631 | ;; 3632 | esac 3633 | { echo "$as_me:$LINENO: checking for $ac_header" >&5 3634 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } 3635 | if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 3636 | echo $ECHO_N "(cached) $ECHO_C" >&6 3637 | else 3638 | eval "$as_ac_Header=\$ac_header_preproc" 3639 | fi 3640 | ac_res=`eval echo '${'$as_ac_Header'}'` 3641 | { echo "$as_me:$LINENO: result: $ac_res" >&5 3642 | echo "${ECHO_T}$ac_res" >&6; } 3643 | 3644 | fi 3645 | if test `eval echo '${'$as_ac_Header'}'` = yes; then 3646 | cat >>confdefs.h <<_ACEOF 3647 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 3648 | _ACEOF 3649 | 3650 | fi 3651 | 3652 | done 3653 | 3654 | 3655 | # Checks for typedefs, structures, and compiler characteristics. 3656 | { echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 3657 | echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6; } 3658 | if test "${ac_cv_header_stdbool_h+set}" = set; then 3659 | echo $ECHO_N "(cached) $ECHO_C" >&6 3660 | else 3661 | cat >conftest.$ac_ext <<_ACEOF 3662 | /* confdefs.h. */ 3663 | _ACEOF 3664 | cat confdefs.h >>conftest.$ac_ext 3665 | cat >>conftest.$ac_ext <<_ACEOF 3666 | /* end confdefs.h. */ 3667 | 3668 | #include 3669 | #ifndef bool 3670 | "error: bool is not defined" 3671 | #endif 3672 | #ifndef false 3673 | "error: false is not defined" 3674 | #endif 3675 | #if false 3676 | "error: false is not 0" 3677 | #endif 3678 | #ifndef true 3679 | "error: true is not defined" 3680 | #endif 3681 | #if true != 1 3682 | "error: true is not 1" 3683 | #endif 3684 | #ifndef __bool_true_false_are_defined 3685 | "error: __bool_true_false_are_defined is not defined" 3686 | #endif 3687 | 3688 | struct s { _Bool s: 1; _Bool t; } s; 3689 | 3690 | char a[true == 1 ? 1 : -1]; 3691 | char b[false == 0 ? 1 : -1]; 3692 | char c[__bool_true_false_are_defined == 1 ? 1 : -1]; 3693 | char d[(bool) 0.5 == true ? 1 : -1]; 3694 | bool e = &s; 3695 | char f[(_Bool) 0.0 == false ? 1 : -1]; 3696 | char g[true]; 3697 | char h[sizeof (_Bool)]; 3698 | char i[sizeof s.t]; 3699 | enum { j = false, k = true, l = false * true, m = true * 256 }; 3700 | _Bool n[m]; 3701 | char o[sizeof n == m * sizeof n[0] ? 1 : -1]; 3702 | char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; 3703 | # if defined __xlc__ || defined __GNUC__ 3704 | /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 3705 | reported by James Lemley on 2005-10-05; see 3706 | http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html 3707 | This test is not quite right, since xlc is allowed to 3708 | reject this program, as the initializer for xlcbug is 3709 | not one of the forms that C requires support for. 3710 | However, doing the test right would require a runtime 3711 | test, and that would make cross-compilation harder. 3712 | Let us hope that IBM fixes the xlc bug, and also adds 3713 | support for this kind of constant expression. In the 3714 | meantime, this test will reject xlc, which is OK, since 3715 | our stdbool.h substitute should suffice. We also test 3716 | this with GCC, where it should work, to detect more 3717 | quickly whether someone messes up the test in the 3718 | future. */ 3719 | char digs[] = "0123456789"; 3720 | int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); 3721 | # endif 3722 | /* Catch a bug in an HP-UX C compiler. See 3723 | http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html 3724 | http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html 3725 | */ 3726 | _Bool q = true; 3727 | _Bool *pq = &q; 3728 | 3729 | int 3730 | main () 3731 | { 3732 | 3733 | *pq |= q; 3734 | *pq |= ! q; 3735 | /* Refer to every declared value, to avoid compiler optimizations. */ 3736 | return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l 3737 | + !m + !n + !o + !p + !q + !pq); 3738 | 3739 | ; 3740 | return 0; 3741 | } 3742 | _ACEOF 3743 | rm -f conftest.$ac_objext 3744 | if { (ac_try="$ac_compile" 3745 | case "(($ac_try" in 3746 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3747 | *) ac_try_echo=$ac_try;; 3748 | esac 3749 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3750 | (eval "$ac_compile") 2>conftest.er1 3751 | ac_status=$? 3752 | grep -v '^ *+' conftest.er1 >conftest.err 3753 | rm -f conftest.er1 3754 | cat conftest.err >&5 3755 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 3756 | (exit $ac_status); } && 3757 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' 3758 | { (case "(($ac_try" in 3759 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3760 | *) ac_try_echo=$ac_try;; 3761 | esac 3762 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3763 | (eval "$ac_try") 2>&5 3764 | ac_status=$? 3765 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 3766 | (exit $ac_status); }; } && 3767 | { ac_try='test -s conftest.$ac_objext' 3768 | { (case "(($ac_try" in 3769 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3770 | *) ac_try_echo=$ac_try;; 3771 | esac 3772 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3773 | (eval "$ac_try") 2>&5 3774 | ac_status=$? 3775 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 3776 | (exit $ac_status); }; }; then 3777 | ac_cv_header_stdbool_h=yes 3778 | else 3779 | echo "$as_me: failed program was:" >&5 3780 | sed 's/^/| /' conftest.$ac_ext >&5 3781 | 3782 | ac_cv_header_stdbool_h=no 3783 | fi 3784 | 3785 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3786 | fi 3787 | { echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 3788 | echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6; } 3789 | { echo "$as_me:$LINENO: checking for _Bool" >&5 3790 | echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; } 3791 | if test "${ac_cv_type__Bool+set}" = set; then 3792 | echo $ECHO_N "(cached) $ECHO_C" >&6 3793 | else 3794 | cat >conftest.$ac_ext <<_ACEOF 3795 | /* confdefs.h. */ 3796 | _ACEOF 3797 | cat confdefs.h >>conftest.$ac_ext 3798 | cat >>conftest.$ac_ext <<_ACEOF 3799 | /* end confdefs.h. */ 3800 | $ac_includes_default 3801 | typedef _Bool ac__type_new_; 3802 | int 3803 | main () 3804 | { 3805 | if ((ac__type_new_ *) 0) 3806 | return 0; 3807 | if (sizeof (ac__type_new_)) 3808 | return 0; 3809 | ; 3810 | return 0; 3811 | } 3812 | _ACEOF 3813 | rm -f conftest.$ac_objext 3814 | if { (ac_try="$ac_compile" 3815 | case "(($ac_try" in 3816 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3817 | *) ac_try_echo=$ac_try;; 3818 | esac 3819 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3820 | (eval "$ac_compile") 2>conftest.er1 3821 | ac_status=$? 3822 | grep -v '^ *+' conftest.er1 >conftest.err 3823 | rm -f conftest.er1 3824 | cat conftest.err >&5 3825 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 3826 | (exit $ac_status); } && 3827 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' 3828 | { (case "(($ac_try" in 3829 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3830 | *) ac_try_echo=$ac_try;; 3831 | esac 3832 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3833 | (eval "$ac_try") 2>&5 3834 | ac_status=$? 3835 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 3836 | (exit $ac_status); }; } && 3837 | { ac_try='test -s conftest.$ac_objext' 3838 | { (case "(($ac_try" in 3839 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3840 | *) ac_try_echo=$ac_try;; 3841 | esac 3842 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3843 | (eval "$ac_try") 2>&5 3844 | ac_status=$? 3845 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 3846 | (exit $ac_status); }; }; then 3847 | ac_cv_type__Bool=yes 3848 | else 3849 | echo "$as_me: failed program was:" >&5 3850 | sed 's/^/| /' conftest.$ac_ext >&5 3851 | 3852 | ac_cv_type__Bool=no 3853 | fi 3854 | 3855 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3856 | fi 3857 | { echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 3858 | echo "${ECHO_T}$ac_cv_type__Bool" >&6; } 3859 | if test $ac_cv_type__Bool = yes; then 3860 | 3861 | cat >>confdefs.h <<_ACEOF 3862 | #define HAVE__BOOL 1 3863 | _ACEOF 3864 | 3865 | 3866 | fi 3867 | 3868 | if test $ac_cv_header_stdbool_h = yes; then 3869 | 3870 | cat >>confdefs.h <<\_ACEOF 3871 | #define HAVE_STDBOOL_H 1 3872 | _ACEOF 3873 | 3874 | fi 3875 | 3876 | 3877 | # Checks for library functions. 3878 | { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 3879 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } 3880 | if test "${ac_cv_header_stdc+set}" = set; then 3881 | echo $ECHO_N "(cached) $ECHO_C" >&6 3882 | else 3883 | cat >conftest.$ac_ext <<_ACEOF 3884 | /* confdefs.h. */ 3885 | _ACEOF 3886 | cat confdefs.h >>conftest.$ac_ext 3887 | cat >>conftest.$ac_ext <<_ACEOF 3888 | /* end confdefs.h. */ 3889 | #include 3890 | #include 3891 | #include 3892 | #include 3893 | 3894 | int 3895 | main () 3896 | { 3897 | 3898 | ; 3899 | return 0; 3900 | } 3901 | _ACEOF 3902 | rm -f conftest.$ac_objext 3903 | if { (ac_try="$ac_compile" 3904 | case "(($ac_try" in 3905 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3906 | *) ac_try_echo=$ac_try;; 3907 | esac 3908 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3909 | (eval "$ac_compile") 2>conftest.er1 3910 | ac_status=$? 3911 | grep -v '^ *+' conftest.er1 >conftest.err 3912 | rm -f conftest.er1 3913 | cat conftest.err >&5 3914 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 3915 | (exit $ac_status); } && 3916 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' 3917 | { (case "(($ac_try" in 3918 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3919 | *) ac_try_echo=$ac_try;; 3920 | esac 3921 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3922 | (eval "$ac_try") 2>&5 3923 | ac_status=$? 3924 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 3925 | (exit $ac_status); }; } && 3926 | { ac_try='test -s conftest.$ac_objext' 3927 | { (case "(($ac_try" in 3928 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3929 | *) ac_try_echo=$ac_try;; 3930 | esac 3931 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3932 | (eval "$ac_try") 2>&5 3933 | ac_status=$? 3934 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 3935 | (exit $ac_status); }; }; then 3936 | ac_cv_header_stdc=yes 3937 | else 3938 | echo "$as_me: failed program was:" >&5 3939 | sed 's/^/| /' conftest.$ac_ext >&5 3940 | 3941 | ac_cv_header_stdc=no 3942 | fi 3943 | 3944 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3945 | 3946 | if test $ac_cv_header_stdc = yes; then 3947 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 3948 | cat >conftest.$ac_ext <<_ACEOF 3949 | /* confdefs.h. */ 3950 | _ACEOF 3951 | cat confdefs.h >>conftest.$ac_ext 3952 | cat >>conftest.$ac_ext <<_ACEOF 3953 | /* end confdefs.h. */ 3954 | #include 3955 | 3956 | _ACEOF 3957 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 3958 | $EGREP "memchr" >/dev/null 2>&1; then 3959 | : 3960 | else 3961 | ac_cv_header_stdc=no 3962 | fi 3963 | rm -f conftest* 3964 | 3965 | fi 3966 | 3967 | if test $ac_cv_header_stdc = yes; then 3968 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 3969 | cat >conftest.$ac_ext <<_ACEOF 3970 | /* confdefs.h. */ 3971 | _ACEOF 3972 | cat confdefs.h >>conftest.$ac_ext 3973 | cat >>conftest.$ac_ext <<_ACEOF 3974 | /* end confdefs.h. */ 3975 | #include 3976 | 3977 | _ACEOF 3978 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 3979 | $EGREP "free" >/dev/null 2>&1; then 3980 | : 3981 | else 3982 | ac_cv_header_stdc=no 3983 | fi 3984 | rm -f conftest* 3985 | 3986 | fi 3987 | 3988 | if test $ac_cv_header_stdc = yes; then 3989 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. 3990 | if test "$cross_compiling" = yes; then 3991 | : 3992 | else 3993 | cat >conftest.$ac_ext <<_ACEOF 3994 | /* confdefs.h. */ 3995 | _ACEOF 3996 | cat confdefs.h >>conftest.$ac_ext 3997 | cat >>conftest.$ac_ext <<_ACEOF 3998 | /* end confdefs.h. */ 3999 | #include 4000 | #include 4001 | #if ((' ' & 0x0FF) == 0x020) 4002 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') 4003 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) 4004 | #else 4005 | # define ISLOWER(c) \ 4006 | (('a' <= (c) && (c) <= 'i') \ 4007 | || ('j' <= (c) && (c) <= 'r') \ 4008 | || ('s' <= (c) && (c) <= 'z')) 4009 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) 4010 | #endif 4011 | 4012 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) 4013 | int 4014 | main () 4015 | { 4016 | int i; 4017 | for (i = 0; i < 256; i++) 4018 | if (XOR (islower (i), ISLOWER (i)) 4019 | || toupper (i) != TOUPPER (i)) 4020 | return 2; 4021 | return 0; 4022 | } 4023 | _ACEOF 4024 | rm -f conftest$ac_exeext 4025 | if { (ac_try="$ac_link" 4026 | case "(($ac_try" in 4027 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4028 | *) ac_try_echo=$ac_try;; 4029 | esac 4030 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 4031 | (eval "$ac_link") 2>&5 4032 | ac_status=$? 4033 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 4034 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 4035 | { (case "(($ac_try" in 4036 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4037 | *) ac_try_echo=$ac_try;; 4038 | esac 4039 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 4040 | (eval "$ac_try") 2>&5 4041 | ac_status=$? 4042 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 4043 | (exit $ac_status); }; }; then 4044 | : 4045 | else 4046 | echo "$as_me: program exited with status $ac_status" >&5 4047 | echo "$as_me: failed program was:" >&5 4048 | sed 's/^/| /' conftest.$ac_ext >&5 4049 | 4050 | ( exit $ac_status ) 4051 | ac_cv_header_stdc=no 4052 | fi 4053 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 4054 | fi 4055 | 4056 | 4057 | fi 4058 | fi 4059 | { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 4060 | echo "${ECHO_T}$ac_cv_header_stdc" >&6; } 4061 | if test $ac_cv_header_stdc = yes; then 4062 | 4063 | cat >>confdefs.h <<\_ACEOF 4064 | #define STDC_HEADERS 1 4065 | _ACEOF 4066 | 4067 | fi 4068 | 4069 | 4070 | ac_config_files="$ac_config_files c/Makefile erl/Makefile Makefile" 4071 | 4072 | cat >confcache <<\_ACEOF 4073 | # This file is a shell script that caches the results of configure 4074 | # tests run on this system so they can be shared between configure 4075 | # scripts and configure runs, see configure's option --config-cache. 4076 | # It is not useful on other systems. If it contains results you don't 4077 | # want to keep, you may remove or edit it. 4078 | # 4079 | # config.status only pays attention to the cache file if you give it 4080 | # the --recheck option to rerun configure. 4081 | # 4082 | # `ac_cv_env_foo' variables (set or unset) will be overridden when 4083 | # loading this file, other *unset* `ac_cv_foo' will be assigned the 4084 | # following values. 4085 | 4086 | _ACEOF 4087 | 4088 | # The following way of writing the cache mishandles newlines in values, 4089 | # but we know of no workaround that is simple, portable, and efficient. 4090 | # So, we kill variables containing newlines. 4091 | # Ultrix sh set writes to stderr and can't be redirected directly, 4092 | # and sets the high bit in the cache file unless we assign to the vars. 4093 | ( 4094 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do 4095 | eval ac_val=\$$ac_var 4096 | case $ac_val in #( 4097 | *${as_nl}*) 4098 | case $ac_var in #( 4099 | *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 4100 | echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; 4101 | esac 4102 | case $ac_var in #( 4103 | _ | IFS | as_nl) ;; #( 4104 | *) $as_unset $ac_var ;; 4105 | esac ;; 4106 | esac 4107 | done 4108 | 4109 | (set) 2>&1 | 4110 | case $as_nl`(ac_space=' '; set) 2>&1` in #( 4111 | *${as_nl}ac_space=\ *) 4112 | # `set' does not quote correctly, so add quotes (double-quote 4113 | # substitution turns \\\\ into \\, and sed turns \\ into \). 4114 | sed -n \ 4115 | "s/'/'\\\\''/g; 4116 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" 4117 | ;; #( 4118 | *) 4119 | # `set' quotes correctly as required by POSIX, so do not add quotes. 4120 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 4121 | ;; 4122 | esac | 4123 | sort 4124 | ) | 4125 | sed ' 4126 | /^ac_cv_env_/b end 4127 | t clear 4128 | :clear 4129 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ 4130 | t end 4131 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ 4132 | :end' >>confcache 4133 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else 4134 | if test -w "$cache_file"; then 4135 | test "x$cache_file" != "x/dev/null" && 4136 | { echo "$as_me:$LINENO: updating cache $cache_file" >&5 4137 | echo "$as_me: updating cache $cache_file" >&6;} 4138 | cat confcache >$cache_file 4139 | else 4140 | { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 4141 | echo "$as_me: not updating unwritable cache $cache_file" >&6;} 4142 | fi 4143 | fi 4144 | rm -f confcache 4145 | 4146 | test "x$prefix" = xNONE && prefix=$ac_default_prefix 4147 | # Let make expand exec_prefix. 4148 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' 4149 | 4150 | # Transform confdefs.h into DEFS. 4151 | # Protect against shell expansion while executing Makefile rules. 4152 | # Protect against Makefile macro expansion. 4153 | # 4154 | # If the first sed substitution is executed (which looks for macros that 4155 | # take arguments), then branch to the quote section. Otherwise, 4156 | # look for a macro that doesn't take arguments. 4157 | ac_script=' 4158 | t clear 4159 | :clear 4160 | s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g 4161 | t quote 4162 | s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g 4163 | t quote 4164 | b any 4165 | :quote 4166 | s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g 4167 | s/\[/\\&/g 4168 | s/\]/\\&/g 4169 | s/\$/$$/g 4170 | H 4171 | :any 4172 | ${ 4173 | g 4174 | s/^\n// 4175 | s/\n/ /g 4176 | p 4177 | } 4178 | ' 4179 | DEFS=`sed -n "$ac_script" confdefs.h` 4180 | 4181 | 4182 | ac_libobjs= 4183 | ac_ltlibobjs= 4184 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue 4185 | # 1. Remove the extension, and $U if already installed. 4186 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' 4187 | ac_i=`echo "$ac_i" | sed "$ac_script"` 4188 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR 4189 | # will be set to the directory where LIBOBJS objects are built. 4190 | ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" 4191 | ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' 4192 | done 4193 | LIBOBJS=$ac_libobjs 4194 | 4195 | LTLIBOBJS=$ac_ltlibobjs 4196 | 4197 | 4198 | 4199 | : ${CONFIG_STATUS=./config.status} 4200 | ac_clean_files_save=$ac_clean_files 4201 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" 4202 | { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 4203 | echo "$as_me: creating $CONFIG_STATUS" >&6;} 4204 | cat >$CONFIG_STATUS <<_ACEOF 4205 | #! $SHELL 4206 | # Generated by $as_me. 4207 | # Run this file to recreate the current configuration. 4208 | # Compiler output produced by configure, useful for debugging 4209 | # configure, is in config.log if it exists. 4210 | 4211 | debug=false 4212 | ac_cs_recheck=false 4213 | ac_cs_silent=false 4214 | SHELL=\${CONFIG_SHELL-$SHELL} 4215 | _ACEOF 4216 | 4217 | cat >>$CONFIG_STATUS <<\_ACEOF 4218 | ## --------------------- ## 4219 | ## M4sh Initialization. ## 4220 | ## --------------------- ## 4221 | 4222 | # Be Bourne compatible 4223 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 4224 | emulate sh 4225 | NULLCMD=: 4226 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which 4227 | # is contrary to our usage. Disable this feature. 4228 | alias -g '${1+"$@"}'='"$@"' 4229 | setopt NO_GLOB_SUBST 4230 | else 4231 | case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac 4232 | fi 4233 | BIN_SH=xpg4; export BIN_SH # for Tru64 4234 | DUALCASE=1; export DUALCASE # for MKS sh 4235 | 4236 | 4237 | # PATH needs CR 4238 | # Avoid depending upon Character Ranges. 4239 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' 4240 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 4241 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS 4242 | as_cr_digits='0123456789' 4243 | as_cr_alnum=$as_cr_Letters$as_cr_digits 4244 | 4245 | # The user is always right. 4246 | if test "${PATH_SEPARATOR+set}" != set; then 4247 | echo "#! /bin/sh" >conf$$.sh 4248 | echo "exit 0" >>conf$$.sh 4249 | chmod +x conf$$.sh 4250 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then 4251 | PATH_SEPARATOR=';' 4252 | else 4253 | PATH_SEPARATOR=: 4254 | fi 4255 | rm -f conf$$.sh 4256 | fi 4257 | 4258 | # Support unset when possible. 4259 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 4260 | as_unset=unset 4261 | else 4262 | as_unset=false 4263 | fi 4264 | 4265 | 4266 | # IFS 4267 | # We need space, tab and new line, in precisely that order. Quoting is 4268 | # there to prevent editors from complaining about space-tab. 4269 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word 4270 | # splitting by setting IFS to empty value.) 4271 | as_nl=' 4272 | ' 4273 | IFS=" "" $as_nl" 4274 | 4275 | # Find who we are. Look in the path if we contain no directory separator. 4276 | case $0 in 4277 | *[\\/]* ) as_myself=$0 ;; 4278 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4279 | for as_dir in $PATH 4280 | do 4281 | IFS=$as_save_IFS 4282 | test -z "$as_dir" && as_dir=. 4283 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 4284 | done 4285 | IFS=$as_save_IFS 4286 | 4287 | ;; 4288 | esac 4289 | # We did not find ourselves, most probably we were run as `sh COMMAND' 4290 | # in which case we are not to be found in the path. 4291 | if test "x$as_myself" = x; then 4292 | as_myself=$0 4293 | fi 4294 | if test ! -f "$as_myself"; then 4295 | echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 4296 | { (exit 1); exit 1; } 4297 | fi 4298 | 4299 | # Work around bugs in pre-3.0 UWIN ksh. 4300 | for as_var in ENV MAIL MAILPATH 4301 | do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var 4302 | done 4303 | PS1='$ ' 4304 | PS2='> ' 4305 | PS4='+ ' 4306 | 4307 | # NLS nuisances. 4308 | for as_var in \ 4309 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ 4310 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ 4311 | LC_TELEPHONE LC_TIME 4312 | do 4313 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then 4314 | eval $as_var=C; export $as_var 4315 | else 4316 | ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var 4317 | fi 4318 | done 4319 | 4320 | # Required to use basename. 4321 | if expr a : '\(a\)' >/dev/null 2>&1 && 4322 | test "X`expr 00001 : '.*\(...\)'`" = X001; then 4323 | as_expr=expr 4324 | else 4325 | as_expr=false 4326 | fi 4327 | 4328 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 4329 | as_basename=basename 4330 | else 4331 | as_basename=false 4332 | fi 4333 | 4334 | 4335 | # Name of the executable. 4336 | as_me=`$as_basename -- "$0" || 4337 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 4338 | X"$0" : 'X\(//\)$' \| \ 4339 | X"$0" : 'X\(/\)' \| . 2>/dev/null || 4340 | echo X/"$0" | 4341 | sed '/^.*\/\([^/][^/]*\)\/*$/{ 4342 | s//\1/ 4343 | q 4344 | } 4345 | /^X\/\(\/\/\)$/{ 4346 | s//\1/ 4347 | q 4348 | } 4349 | /^X\/\(\/\).*/{ 4350 | s//\1/ 4351 | q 4352 | } 4353 | s/.*/./; q'` 4354 | 4355 | # CDPATH. 4356 | $as_unset CDPATH 4357 | 4358 | 4359 | 4360 | as_lineno_1=$LINENO 4361 | as_lineno_2=$LINENO 4362 | test "x$as_lineno_1" != "x$as_lineno_2" && 4363 | test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { 4364 | 4365 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO 4366 | # uniformly replaced by the line number. The first 'sed' inserts a 4367 | # line-number line after each line using $LINENO; the second 'sed' 4368 | # does the real work. The second script uses 'N' to pair each 4369 | # line-number line with the line containing $LINENO, and appends 4370 | # trailing '-' during substitution so that $LINENO is not a special 4371 | # case at line end. 4372 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the 4373 | # scripts with optimization help from Paolo Bonzini. Blame Lee 4374 | # E. McMahon (1931-1989) for sed's syntax. :-) 4375 | sed -n ' 4376 | p 4377 | /[$]LINENO/= 4378 | ' <$as_myself | 4379 | sed ' 4380 | s/[$]LINENO.*/&-/ 4381 | t lineno 4382 | b 4383 | :lineno 4384 | N 4385 | :loop 4386 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ 4387 | t loop 4388 | s/-\n.*// 4389 | ' >$as_me.lineno && 4390 | chmod +x "$as_me.lineno" || 4391 | { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 4392 | { (exit 1); exit 1; }; } 4393 | 4394 | # Don't try to exec as it changes $[0], causing all sort of problems 4395 | # (the dirname of $[0] is not the place where we might find the 4396 | # original and so on. Autoconf is especially sensitive to this). 4397 | . "./$as_me.lineno" 4398 | # Exit status is that of the last command. 4399 | exit 4400 | } 4401 | 4402 | 4403 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 4404 | as_dirname=dirname 4405 | else 4406 | as_dirname=false 4407 | fi 4408 | 4409 | ECHO_C= ECHO_N= ECHO_T= 4410 | case `echo -n x` in 4411 | -n*) 4412 | case `echo 'x\c'` in 4413 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. 4414 | *) ECHO_C='\c';; 4415 | esac;; 4416 | *) 4417 | ECHO_N='-n';; 4418 | esac 4419 | 4420 | if expr a : '\(a\)' >/dev/null 2>&1 && 4421 | test "X`expr 00001 : '.*\(...\)'`" = X001; then 4422 | as_expr=expr 4423 | else 4424 | as_expr=false 4425 | fi 4426 | 4427 | rm -f conf$$ conf$$.exe conf$$.file 4428 | if test -d conf$$.dir; then 4429 | rm -f conf$$.dir/conf$$.file 4430 | else 4431 | rm -f conf$$.dir 4432 | mkdir conf$$.dir 4433 | fi 4434 | echo >conf$$.file 4435 | if ln -s conf$$.file conf$$ 2>/dev/null; then 4436 | as_ln_s='ln -s' 4437 | # ... but there are two gotchas: 4438 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 4439 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 4440 | # In both cases, we have to default to `cp -p'. 4441 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 4442 | as_ln_s='cp -p' 4443 | elif ln conf$$.file conf$$ 2>/dev/null; then 4444 | as_ln_s=ln 4445 | else 4446 | as_ln_s='cp -p' 4447 | fi 4448 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 4449 | rmdir conf$$.dir 2>/dev/null 4450 | 4451 | if mkdir -p . 2>/dev/null; then 4452 | as_mkdir_p=: 4453 | else 4454 | test -d ./-p && rmdir ./-p 4455 | as_mkdir_p=false 4456 | fi 4457 | 4458 | # Find out whether ``test -x'' works. Don't use a zero-byte file, as 4459 | # systems may use methods other than mode bits to determine executability. 4460 | cat >conf$$.file <<_ASEOF 4461 | #! /bin/sh 4462 | exit 0 4463 | _ASEOF 4464 | chmod +x conf$$.file 4465 | if test -x conf$$.file >/dev/null 2>&1; then 4466 | as_executable_p="test -x" 4467 | else 4468 | as_executable_p=: 4469 | fi 4470 | rm -f conf$$.file 4471 | 4472 | # Sed expression to map a string onto a valid CPP name. 4473 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 4474 | 4475 | # Sed expression to map a string onto a valid variable name. 4476 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 4477 | 4478 | 4479 | exec 6>&1 4480 | 4481 | # Save the log message, to keep $[0] and so on meaningful, and to 4482 | # report actual input values of CONFIG_FILES etc. instead of their 4483 | # values after options handling. 4484 | ac_log=" 4485 | This file was extended by cherly $as_me 0.0.1, which was 4486 | generated by GNU Autoconf 2.60. Invocation command line was 4487 | 4488 | CONFIG_FILES = $CONFIG_FILES 4489 | CONFIG_HEADERS = $CONFIG_HEADERS 4490 | CONFIG_LINKS = $CONFIG_LINKS 4491 | CONFIG_COMMANDS = $CONFIG_COMMANDS 4492 | $ $0 $@ 4493 | 4494 | on `(hostname || uname -n) 2>/dev/null | sed 1q` 4495 | " 4496 | 4497 | _ACEOF 4498 | 4499 | cat >>$CONFIG_STATUS <<_ACEOF 4500 | # Files that config.status was made for. 4501 | config_files="$ac_config_files" 4502 | 4503 | _ACEOF 4504 | 4505 | cat >>$CONFIG_STATUS <<\_ACEOF 4506 | ac_cs_usage="\ 4507 | \`$as_me' instantiates files from templates according to the 4508 | current configuration. 4509 | 4510 | Usage: $0 [OPTIONS] [FILE]... 4511 | 4512 | -h, --help print this help, then exit 4513 | -V, --version print version number, then exit 4514 | -q, --quiet do not print progress messages 4515 | -d, --debug don't remove temporary files 4516 | --recheck update $as_me by reconfiguring in the same conditions 4517 | --file=FILE[:TEMPLATE] 4518 | instantiate the configuration file FILE 4519 | 4520 | Configuration files: 4521 | $config_files 4522 | 4523 | Report bugs to ." 4524 | 4525 | _ACEOF 4526 | cat >>$CONFIG_STATUS <<_ACEOF 4527 | ac_cs_version="\\ 4528 | cherly config.status 0.0.1 4529 | configured by $0, generated by GNU Autoconf 2.60, 4530 | with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" 4531 | 4532 | Copyright (C) 2006 Free Software Foundation, Inc. 4533 | This config.status script is free software; the Free Software Foundation 4534 | gives unlimited permission to copy, distribute and modify it." 4535 | 4536 | ac_pwd='$ac_pwd' 4537 | srcdir='$srcdir' 4538 | _ACEOF 4539 | 4540 | cat >>$CONFIG_STATUS <<\_ACEOF 4541 | # If no file are specified by the user, then we need to provide default 4542 | # value. By we need to know if files were specified by the user. 4543 | ac_need_defaults=: 4544 | while test $# != 0 4545 | do 4546 | case $1 in 4547 | --*=*) 4548 | ac_option=`expr "X$1" : 'X\([^=]*\)='` 4549 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` 4550 | ac_shift=: 4551 | ;; 4552 | *) 4553 | ac_option=$1 4554 | ac_optarg=$2 4555 | ac_shift=shift 4556 | ;; 4557 | esac 4558 | 4559 | case $ac_option in 4560 | # Handling of the options. 4561 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 4562 | ac_cs_recheck=: ;; 4563 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) 4564 | echo "$ac_cs_version"; exit ;; 4565 | --debug | --debu | --deb | --de | --d | -d ) 4566 | debug=: ;; 4567 | --file | --fil | --fi | --f ) 4568 | $ac_shift 4569 | CONFIG_FILES="$CONFIG_FILES $ac_optarg" 4570 | ac_need_defaults=false;; 4571 | --he | --h | --help | --hel | -h ) 4572 | echo "$ac_cs_usage"; exit ;; 4573 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 4574 | | -silent | --silent | --silen | --sile | --sil | --si | --s) 4575 | ac_cs_silent=: ;; 4576 | 4577 | # This is an error. 4578 | -*) { echo "$as_me: error: unrecognized option: $1 4579 | Try \`$0 --help' for more information." >&2 4580 | { (exit 1); exit 1; }; } ;; 4581 | 4582 | *) ac_config_targets="$ac_config_targets $1" 4583 | ac_need_defaults=false ;; 4584 | 4585 | esac 4586 | shift 4587 | done 4588 | 4589 | ac_configure_extra_args= 4590 | 4591 | if $ac_cs_silent; then 4592 | exec 6>/dev/null 4593 | ac_configure_extra_args="$ac_configure_extra_args --silent" 4594 | fi 4595 | 4596 | _ACEOF 4597 | cat >>$CONFIG_STATUS <<_ACEOF 4598 | if \$ac_cs_recheck; then 4599 | echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 4600 | CONFIG_SHELL=$SHELL 4601 | export CONFIG_SHELL 4602 | exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion 4603 | fi 4604 | 4605 | _ACEOF 4606 | cat >>$CONFIG_STATUS <<\_ACEOF 4607 | exec 5>>config.log 4608 | { 4609 | echo 4610 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 4611 | ## Running $as_me. ## 4612 | _ASBOX 4613 | echo "$ac_log" 4614 | } >&5 4615 | 4616 | _ACEOF 4617 | cat >>$CONFIG_STATUS <<_ACEOF 4618 | _ACEOF 4619 | 4620 | cat >>$CONFIG_STATUS <<\_ACEOF 4621 | 4622 | # Handling of arguments. 4623 | for ac_config_target in $ac_config_targets 4624 | do 4625 | case $ac_config_target in 4626 | "c/Makefile") CONFIG_FILES="$CONFIG_FILES c/Makefile" ;; 4627 | "erl/Makefile") CONFIG_FILES="$CONFIG_FILES erl/Makefile" ;; 4628 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; 4629 | 4630 | *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 4631 | echo "$as_me: error: invalid argument: $ac_config_target" >&2;} 4632 | { (exit 1); exit 1; }; };; 4633 | esac 4634 | done 4635 | 4636 | 4637 | # If the user did not use the arguments to specify the items to instantiate, 4638 | # then the envvar interface is used. Set only those that are not. 4639 | # We use the long form for the default assignment because of an extremely 4640 | # bizarre bug on SunOS 4.1.3. 4641 | if $ac_need_defaults; then 4642 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files 4643 | fi 4644 | 4645 | # Have a temporary directory for convenience. Make it in the build tree 4646 | # simply because there is no reason against having it here, and in addition, 4647 | # creating and moving files from /tmp can sometimes cause problems. 4648 | # Hook for its removal unless debugging. 4649 | # Note that there is a small window in which the directory will not be cleaned: 4650 | # after its creation but before its name has been assigned to `$tmp'. 4651 | $debug || 4652 | { 4653 | tmp= 4654 | trap 'exit_status=$? 4655 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status 4656 | ' 0 4657 | trap '{ (exit 1); exit 1; }' 1 2 13 15 4658 | } 4659 | # Create a (secure) tmp directory for tmp files. 4660 | 4661 | { 4662 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && 4663 | test -n "$tmp" && test -d "$tmp" 4664 | } || 4665 | { 4666 | tmp=./conf$$-$RANDOM 4667 | (umask 077 && mkdir "$tmp") 4668 | } || 4669 | { 4670 | echo "$me: cannot create a temporary directory in ." >&2 4671 | { (exit 1); exit 1; } 4672 | } 4673 | 4674 | # 4675 | # Set up the sed scripts for CONFIG_FILES section. 4676 | # 4677 | 4678 | # No need to generate the scripts if there are no CONFIG_FILES. 4679 | # This happens for instance when ./config.status config.h 4680 | if test -n "$CONFIG_FILES"; then 4681 | 4682 | _ACEOF 4683 | 4684 | 4685 | 4686 | ac_delim='%!_!# ' 4687 | for ac_last_try in false false false false false :; do 4688 | cat >conf$$subs.sed <<_ACEOF 4689 | SHELL!$SHELL$ac_delim 4690 | PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim 4691 | PACKAGE_NAME!$PACKAGE_NAME$ac_delim 4692 | PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim 4693 | PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim 4694 | PACKAGE_STRING!$PACKAGE_STRING$ac_delim 4695 | PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim 4696 | exec_prefix!$exec_prefix$ac_delim 4697 | prefix!$prefix$ac_delim 4698 | program_transform_name!$program_transform_name$ac_delim 4699 | bindir!$bindir$ac_delim 4700 | sbindir!$sbindir$ac_delim 4701 | libexecdir!$libexecdir$ac_delim 4702 | datarootdir!$datarootdir$ac_delim 4703 | datadir!$datadir$ac_delim 4704 | sysconfdir!$sysconfdir$ac_delim 4705 | sharedstatedir!$sharedstatedir$ac_delim 4706 | localstatedir!$localstatedir$ac_delim 4707 | includedir!$includedir$ac_delim 4708 | oldincludedir!$oldincludedir$ac_delim 4709 | docdir!$docdir$ac_delim 4710 | infodir!$infodir$ac_delim 4711 | htmldir!$htmldir$ac_delim 4712 | dvidir!$dvidir$ac_delim 4713 | pdfdir!$pdfdir$ac_delim 4714 | psdir!$psdir$ac_delim 4715 | libdir!$libdir$ac_delim 4716 | localedir!$localedir$ac_delim 4717 | mandir!$mandir$ac_delim 4718 | DEFS!$DEFS$ac_delim 4719 | ECHO_C!$ECHO_C$ac_delim 4720 | ECHO_N!$ECHO_N$ac_delim 4721 | ECHO_T!$ECHO_T$ac_delim 4722 | LIBS!$LIBS$ac_delim 4723 | build_alias!$build_alias$ac_delim 4724 | host_alias!$host_alias$ac_delim 4725 | target_alias!$target_alias$ac_delim 4726 | CC!$CC$ac_delim 4727 | CFLAGS!$CFLAGS$ac_delim 4728 | LDFLAGS!$LDFLAGS$ac_delim 4729 | CPPFLAGS!$CPPFLAGS$ac_delim 4730 | ac_ct_CC!$ac_ct_CC$ac_delim 4731 | EXEEXT!$EXEEXT$ac_delim 4732 | OBJEXT!$OBJEXT$ac_delim 4733 | ERL!$ERL$ac_delim 4734 | ERLC!$ERLC$ac_delim 4735 | JUDY_PREFIX!$JUDY_PREFIX$ac_delim 4736 | JUDY_LIBS!$JUDY_LIBS$ac_delim 4737 | JUDY_CFLAGS!$JUDY_CFLAGS$ac_delim 4738 | ERLBINDIR!$ERLBINDIR$ac_delim 4739 | ERLDIR!$ERLDIR$ac_delim 4740 | ERTSBASE!$ERTSBASE$ac_delim 4741 | LIBEI!$LIBEI$ac_delim 4742 | CPP!$CPP$ac_delim 4743 | GREP!$GREP$ac_delim 4744 | EGREP!$EGREP$ac_delim 4745 | LIBOBJS!$LIBOBJS$ac_delim 4746 | LTLIBOBJS!$LTLIBOBJS$ac_delim 4747 | _ACEOF 4748 | 4749 | if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 58; then 4750 | break 4751 | elif $ac_last_try; then 4752 | { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 4753 | echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} 4754 | { (exit 1); exit 1; }; } 4755 | else 4756 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 4757 | fi 4758 | done 4759 | 4760 | ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` 4761 | if test -n "$ac_eof"; then 4762 | ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` 4763 | ac_eof=`expr $ac_eof + 1` 4764 | fi 4765 | 4766 | cat >>$CONFIG_STATUS <<_ACEOF 4767 | cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof 4768 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end 4769 | _ACEOF 4770 | sed ' 4771 | s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g 4772 | s/^/s,@/; s/!/@,|#_!!_#|/ 4773 | :n 4774 | t n 4775 | s/'"$ac_delim"'$/,g/; t 4776 | s/$/\\/; p 4777 | N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n 4778 | ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF 4781 | :end 4782 | s/|#_!!_#|//g 4783 | CEOF$ac_eof 4784 | _ACEOF 4785 | 4786 | 4787 | # VPATH may cause trouble with some makes, so we remove $(srcdir), 4788 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and 4789 | # trailing colons and then remove the whole line if VPATH becomes empty 4790 | # (actually we leave an empty line to preserve line numbers). 4791 | if test "x$srcdir" = x.; then 4792 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ 4793 | s/:*\$(srcdir):*/:/ 4794 | s/:*\${srcdir}:*/:/ 4795 | s/:*@srcdir@:*/:/ 4796 | s/^\([^=]*=[ ]*\):*/\1/ 4797 | s/:*$// 4798 | s/^[^=]*=[ ]*$// 4799 | }' 4800 | fi 4801 | 4802 | cat >>$CONFIG_STATUS <<\_ACEOF 4803 | fi # test -n "$CONFIG_FILES" 4804 | 4805 | 4806 | for ac_tag in :F $CONFIG_FILES 4807 | do 4808 | case $ac_tag in 4809 | :[FHLC]) ac_mode=$ac_tag; continue;; 4810 | esac 4811 | case $ac_mode$ac_tag in 4812 | :[FHL]*:*);; 4813 | :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 4814 | echo "$as_me: error: Invalid tag $ac_tag." >&2;} 4815 | { (exit 1); exit 1; }; };; 4816 | :[FH]-) ac_tag=-:-;; 4817 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; 4818 | esac 4819 | ac_save_IFS=$IFS 4820 | IFS=: 4821 | set x $ac_tag 4822 | IFS=$ac_save_IFS 4823 | shift 4824 | ac_file=$1 4825 | shift 4826 | 4827 | case $ac_mode in 4828 | :L) ac_source=$1;; 4829 | :[FH]) 4830 | ac_file_inputs= 4831 | for ac_f 4832 | do 4833 | case $ac_f in 4834 | -) ac_f="$tmp/stdin";; 4835 | *) # Look for the file first in the build tree, then in the source tree 4836 | # (if the path is not absolute). The absolute path cannot be DOS-style, 4837 | # because $ac_f cannot contain `:'. 4838 | test -f "$ac_f" || 4839 | case $ac_f in 4840 | [\\/$]*) false;; 4841 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; 4842 | esac || 4843 | { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 4844 | echo "$as_me: error: cannot find input file: $ac_f" >&2;} 4845 | { (exit 1); exit 1; }; };; 4846 | esac 4847 | ac_file_inputs="$ac_file_inputs $ac_f" 4848 | done 4849 | 4850 | # Let's still pretend it is `configure' which instantiates (i.e., don't 4851 | # use $as_me), people would be surprised to read: 4852 | # /* config.h. Generated by config.status. */ 4853 | configure_input="Generated from "`IFS=: 4854 | echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." 4855 | if test x"$ac_file" != x-; then 4856 | configure_input="$ac_file. $configure_input" 4857 | { echo "$as_me:$LINENO: creating $ac_file" >&5 4858 | echo "$as_me: creating $ac_file" >&6;} 4859 | fi 4860 | 4861 | case $ac_tag in 4862 | *:-:* | *:-) cat >"$tmp/stdin";; 4863 | esac 4864 | ;; 4865 | esac 4866 | 4867 | ac_dir=`$as_dirname -- "$ac_file" || 4868 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 4869 | X"$ac_file" : 'X\(//\)[^/]' \| \ 4870 | X"$ac_file" : 'X\(//\)$' \| \ 4871 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || 4872 | echo X"$ac_file" | 4873 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 4874 | s//\1/ 4875 | q 4876 | } 4877 | /^X\(\/\/\)[^/].*/{ 4878 | s//\1/ 4879 | q 4880 | } 4881 | /^X\(\/\/\)$/{ 4882 | s//\1/ 4883 | q 4884 | } 4885 | /^X\(\/\).*/{ 4886 | s//\1/ 4887 | q 4888 | } 4889 | s/.*/./; q'` 4890 | { as_dir="$ac_dir" 4891 | case $as_dir in #( 4892 | -*) as_dir=./$as_dir;; 4893 | esac 4894 | test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { 4895 | as_dirs= 4896 | while :; do 4897 | case $as_dir in #( 4898 | *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( 4899 | *) as_qdir=$as_dir;; 4900 | esac 4901 | as_dirs="'$as_qdir' $as_dirs" 4902 | as_dir=`$as_dirname -- "$as_dir" || 4903 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 4904 | X"$as_dir" : 'X\(//\)[^/]' \| \ 4905 | X"$as_dir" : 'X\(//\)$' \| \ 4906 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 4907 | echo X"$as_dir" | 4908 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 4909 | s//\1/ 4910 | q 4911 | } 4912 | /^X\(\/\/\)[^/].*/{ 4913 | s//\1/ 4914 | q 4915 | } 4916 | /^X\(\/\/\)$/{ 4917 | s//\1/ 4918 | q 4919 | } 4920 | /^X\(\/\).*/{ 4921 | s//\1/ 4922 | q 4923 | } 4924 | s/.*/./; q'` 4925 | test -d "$as_dir" && break 4926 | done 4927 | test -z "$as_dirs" || eval "mkdir $as_dirs" 4928 | } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 4929 | echo "$as_me: error: cannot create directory $as_dir" >&2;} 4930 | { (exit 1); exit 1; }; }; } 4931 | ac_builddir=. 4932 | 4933 | case "$ac_dir" in 4934 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 4935 | *) 4936 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` 4937 | # A ".." for each directory in $ac_dir_suffix. 4938 | ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` 4939 | case $ac_top_builddir_sub in 4940 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 4941 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 4942 | esac ;; 4943 | esac 4944 | ac_abs_top_builddir=$ac_pwd 4945 | ac_abs_builddir=$ac_pwd$ac_dir_suffix 4946 | # for backward compatibility: 4947 | ac_top_builddir=$ac_top_build_prefix 4948 | 4949 | case $srcdir in 4950 | .) # We are building in place. 4951 | ac_srcdir=. 4952 | ac_top_srcdir=$ac_top_builddir_sub 4953 | ac_abs_top_srcdir=$ac_pwd ;; 4954 | [\\/]* | ?:[\\/]* ) # Absolute name. 4955 | ac_srcdir=$srcdir$ac_dir_suffix; 4956 | ac_top_srcdir=$srcdir 4957 | ac_abs_top_srcdir=$srcdir ;; 4958 | *) # Relative name. 4959 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 4960 | ac_top_srcdir=$ac_top_build_prefix$srcdir 4961 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 4962 | esac 4963 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 4964 | 4965 | 4966 | case $ac_mode in 4967 | :F) 4968 | # 4969 | # CONFIG_FILE 4970 | # 4971 | 4972 | _ACEOF 4973 | 4974 | cat >>$CONFIG_STATUS <<\_ACEOF 4975 | # If the template does not know about datarootdir, expand it. 4976 | # FIXME: This hack should be removed a few years after 2.60. 4977 | ac_datarootdir_hack=; ac_datarootdir_seen= 4978 | 4979 | case `sed -n '/datarootdir/ { 4980 | p 4981 | q 4982 | } 4983 | /@datadir@/p 4984 | /@docdir@/p 4985 | /@infodir@/p 4986 | /@localedir@/p 4987 | /@mandir@/p 4988 | ' $ac_file_inputs` in 4989 | *datarootdir*) ac_datarootdir_seen=yes;; 4990 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) 4991 | { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 4992 | echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} 4993 | _ACEOF 4994 | cat >>$CONFIG_STATUS <<_ACEOF 4995 | ac_datarootdir_hack=' 4996 | s&@datadir@&$datadir&g 4997 | s&@docdir@&$docdir&g 4998 | s&@infodir@&$infodir&g 4999 | s&@localedir@&$localedir&g 5000 | s&@mandir@&$mandir&g 5001 | s&\\\${datarootdir}&$datarootdir&g' ;; 5002 | esac 5003 | _ACEOF 5004 | 5005 | # Neutralize VPATH when `$srcdir' = `.'. 5006 | # Shell code in configure.ac might set extrasub. 5007 | # FIXME: do we really want to maintain this feature? 5008 | cat >>$CONFIG_STATUS <<_ACEOF 5009 | sed "$ac_vpsub 5010 | $extrasub 5011 | _ACEOF 5012 | cat >>$CONFIG_STATUS <<\_ACEOF 5013 | :t 5014 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b 5015 | s&@configure_input@&$configure_input&;t t 5016 | s&@top_builddir@&$ac_top_builddir_sub&;t t 5017 | s&@srcdir@&$ac_srcdir&;t t 5018 | s&@abs_srcdir@&$ac_abs_srcdir&;t t 5019 | s&@top_srcdir@&$ac_top_srcdir&;t t 5020 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t 5021 | s&@builddir@&$ac_builddir&;t t 5022 | s&@abs_builddir@&$ac_abs_builddir&;t t 5023 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t 5024 | $ac_datarootdir_hack 5025 | " $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out 5026 | 5027 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && 5028 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && 5029 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && 5030 | { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' 5031 | which seems to be undefined. Please make sure it is defined." >&5 5032 | echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' 5033 | which seems to be undefined. Please make sure it is defined." >&2;} 5034 | 5035 | rm -f "$tmp/stdin" 5036 | case $ac_file in 5037 | -) cat "$tmp/out"; rm -f "$tmp/out";; 5038 | *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; 5039 | esac 5040 | ;; 5041 | 5042 | 5043 | 5044 | esac 5045 | 5046 | done # for ac_tag 5047 | 5048 | 5049 | { (exit 0); exit 0; } 5050 | _ACEOF 5051 | chmod +x $CONFIG_STATUS 5052 | ac_clean_files=$ac_clean_files_save 5053 | 5054 | 5055 | # configure is writing to config.log, and then calls config.status. 5056 | # config.status does its own redirection, appending to config.log. 5057 | # Unfortunately, on DOS this fails, as config.log is still kept open 5058 | # by configure, so config.status won't be able to write to it; its 5059 | # output is simply discarded. So we exec the FD to /dev/null, 5060 | # effectively closing config.log, so it can be properly (re)opened and 5061 | # appended to by config.status. When coming back to configure, we 5062 | # need to make the FD available again. 5063 | if test "$no_create" != yes; then 5064 | ac_cs_success=: 5065 | ac_config_status_args= 5066 | test "$silent" = yes && 5067 | ac_config_status_args="$ac_config_status_args --quiet" 5068 | exec 5>/dev/null 5069 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false 5070 | exec 5>>config.log 5071 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which 5072 | # would make configure fail if this is the last instruction. 5073 | $ac_cs_success || { (exit 1); exit 1; } 5074 | fi 5075 | 5076 | -------------------------------------------------------------------------------- /configure.in: -------------------------------------------------------------------------------- 1 | # -*- Autoconf -*- 2 | # Process this file with autoconf to produce a configure script. 3 | 4 | AC_PREREQ(2.60) 5 | AC_INIT(cherly, 0.0.1) 6 | 7 | # Checks for programs. 8 | AC_PROG_CC 9 | AC_PATH_PROG(ERL, erl) 10 | AC_PATH_PROG(ERLC, erlc) 11 | # 12 | AC_ARG_WITH(judy, 13 | [ --with-judy= prefix of Judy installation. e.g. /usr/local or /usr], 14 | [JUDY_PREFIX=$with_judy], 15 | [JUDY_PREFIX=/usr/local]) 16 | 17 | AC_SUBST(JUDY_PREFIX) 18 | JUDY_LIBS="-L${JUDY_PREFIX}/lib -lJudy" 19 | JUDY_CFLAGS="-I${JUDY_PREFIX}/include" 20 | AC_SUBST(JUDY_LIBS) 21 | AC_SUBST(JUDY_CFLAGS) 22 | 23 | ERLDIR=`awk -F= '/ROOTDIR=/ { print [$]2; exit; }' $ERL` 24 | AC_SUBST(ERL) 25 | AC_SUBST(ERLC) 26 | AC_SUBST(ERLBINDIR) 27 | AC_SUBST(ERLDIR) 28 | 29 | ERL_INTERFACE=`ls ${ERLDIR}/lib | grep erl_interface | tail -n 1` 30 | 31 | ERTSBASE="`$ERL -noshell -noinput -eval 'io:format (\"~s\", [[ \"/\" ++ filename:join (lists:reverse ([ \"erts-\" ++ erlang:system_info (version) | tl (lists:reverse (string:tokens (code:lib_dir (), \"/\"))) ])) ]]).' -s erlang halt `" 32 | AC_SUBST(ERTSBASE) 33 | 34 | CPPFLAGS="$CPPFLAGS -I ${ERTSBASE}/include -I ${ERLDIR}/lib/${ERL_INTERFACE}/include -Wall -fPIC -I./" 35 | 36 | LIBEI="${ERLDIR}/lib/${ERL_INTERFACE}/lib/libei.a" 37 | AC_SUBST(LIBEI) 38 | # Checks for header files. 39 | AC_CHECK_HEADERS([]) 40 | 41 | # Checks for typedefs, structures, and compiler characteristics. 42 | AC_HEADER_STDBOOL 43 | 44 | # Checks for library functions. 45 | AC_HEADER_STDC 46 | 47 | AC_OUTPUT([c/Makefile erl/Makefile Makefile]) 48 | -------------------------------------------------------------------------------- /ebin/cherly.app: -------------------------------------------------------------------------------- 1 | {application, cherly, 2 | [{description, "Cherly caching library"}, 3 | {mod, {cherly_app, []}}, 4 | {vsn, "?VERSION"}, 5 | {modules, [cherly, cherly_app]}, 6 | {registered, []}, 7 | {applications, [kernel, stdlib]} 8 | ]}. -------------------------------------------------------------------------------- /erl/Makefile.in: -------------------------------------------------------------------------------- 1 | PACKAGE_NAME = @PACKAGE_NAME@ 2 | PACKAGE_VERSION = @PACKAGE_VERSION@ 3 | ERLC_FLAGS := -W 4 | EBIN_DIR := ../ebin 5 | EMULATOR := beam 6 | ERL_SOURCES := $(wildcard *.erl) 7 | TEST_SOURCES := $(wildcard ../etest/test_*.erl) 8 | MOD := $(patsubst ../etest/test_%.erl,%,$(TEST_SOURCES)) 9 | ERL_TEST_DIRECTIVES := $(MOD:%=-run % test) 10 | ERL_HEADERS := $(wildcard *.hrl) $(wildcard include/*.hrl) 11 | ERL_OBJECTS := $(ERL_SOURCES:$.erl=$(EBIN_DIR)/%.$(EMULATOR)) 12 | MODULES := $(patsubst %.erl,%,$(ERL_SOURCES)) 13 | EBIN_FILES := $(MODULES:%=$(EBIN_DIR)/%.$(EMULATOR)) 14 | ERLDIR = @ERLDIR@ 15 | 16 | $(EBIN_DIR)/%.$(EMULATOR):: %.erl ../etest/test_%.erl 17 | mkdir -p $(EBIN_DIR) 18 | erlc $(ERLC_FLAGS) $(TEST) -I./include -I../etest -o $(EBIN_DIR) $< 19 | 20 | $(EBIN_DIR)/%.$(EMULATOR):: %.erl 21 | mkdir -p $(EBIN_DIR) 22 | erlc $(ERLC_FLAGS) $(TEST) -I./include -I../etest -o $(EBIN_DIR) $< 23 | 24 | all: $(EBIN_FILES) 25 | 26 | debug: 27 | $(MAKE) DEBUG=-DDEBUG 28 | 29 | ROOTDIR := /p/lib/erlang/ 30 | BINDIR := $(ROOTDIR)/erts-5.6.3/bin 31 | EMU := beam 32 | PROGNAME := erl 33 | ARGS := "-boot start_sasl +K true -smp enable -pa ../ebin -sname local_test -noshell $(ERL_TEST_DIRECTIVES) -run erlang halt" 34 | 35 | test-dbg: 36 | export ROOTDIR 37 | export BINDIR 38 | export EMU 39 | export PROGNAME 40 | gdb $(BINDIR)/erlexec 41 | 42 | test: 43 | $(MAKE) TEST=-DTEST 44 | erl -boot start_sasl +K true -smp enable -pa ../ebin -sname local_test -noshell $(ERL_TEST_DIRECTIVES) -run erlang halt 45 | 46 | clean: 47 | -rm -rf $(EBIN_FILES) 48 | 49 | install: 50 | install -d $(ERLDIR)/lib/$(PACKAGE_NAME)-$(PACKAGE_VERSION) 51 | cp -r `pwd`/../ebin $(ERLDIR)/lib/$(PACKAGE_NAME)-$(PACKAGE_VERSION) 52 | 53 | package: 54 | install -d `pwd`/../.pkgtmp/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/ebin 55 | cp -r `pwd`/../ebin/* `pwd`/../.pkgtmp/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/ebin -------------------------------------------------------------------------------- /erl/cherly.erl: -------------------------------------------------------------------------------- 1 | %%%------------------------------------------------------------------- 2 | %%% File: cherly.erl 3 | %%% @author Cliff Moon [] 4 | %%% @copyright 2009 Cliff Moon See LICENSE file 5 | %%% @doc 6 | %%% 7 | %%% @end 8 | %%% 9 | %%% @since 2009-02-22 by Cliff Moon 10 | %%%------------------------------------------------------------------- 11 | -module(cherly). 12 | -author('cliff@moonpolysoft.com'). 13 | 14 | -export([start/1, put/3, get/2, remove/2, size/1, items/1, stop/1]). 15 | 16 | -define(INIT, $i). 17 | -define(GET, $g). 18 | -define(PUT, $p). 19 | -define(REMOVE, $r). 20 | -define(SIZE, $s). 21 | -define(ITEMS, $t). 22 | 23 | -ifdef(TEST). 24 | -include("test_cherly.erl"). 25 | -endif. 26 | 27 | %% api bitches 28 | 29 | start(Size) -> 30 | case load_driver() of 31 | ok -> 32 | P = open_port({spawn, 'cherly_drv'}, [binary]), 33 | port_command(P, [?INIT, term_to_binary({0, Size})]), 34 | {ok, {cherly, P}}; 35 | {error, Err} -> 36 | Msg = erl_ddll:format_error(Err), 37 | {error, Msg} 38 | end. 39 | 40 | put({cherly, P}, Key, Value) when is_list(Value) -> 41 | % error_logger:info_msg("key ~p value ~p~n", [Key, Value]), 42 | Values = lists:flatten(Value), 43 | Len = length(Key), 44 | ValLen = length(Values), 45 | SizeBin = << <> || S <- [byte_size(Bin) || Bin <- Values] >>, 46 | Preamble = <>, 47 | port_command(P, [?PUT, <>, Key, Preamble, Values]); 48 | 49 | put({cherly, P}, Key, Value) -> 50 | Len = length(Key), 51 | Preamble = <<0:32>>, 52 | % error_logger:info_msg("key ~p value ~p", [Key, Value]), 53 | port_command(P, [?PUT, <>, Key, Preamble, Value]). 54 | 55 | get({cherly, P}, Key) -> 56 | Len = length(Key), 57 | port_command(P, [?GET, <>, Key]), 58 | receive 59 | {P, {data, BinList}} -> 60 | % error_logger:info_msg("key ~p BinList ~p", [Key, BinList]), 61 | unpack(BinList, length(Key)+5); 62 | {P, So} -> So 63 | end. 64 | 65 | remove({cherly, P}, Key) -> 66 | Len = length(Key), 67 | port_command(P, [?REMOVE, <>, Key]). 68 | 69 | size({cherly, P}) -> 70 | port_command(P, [?SIZE]), 71 | receive 72 | {P, {data, Bin}} -> binary_to_term(Bin) 73 | end. 74 | 75 | items({cherly, P}) -> 76 | port_command(P, [?ITEMS]), 77 | receive 78 | {P, {data, Bin}} -> binary_to_term(Bin) 79 | end. 80 | 81 | stop({cherly, P}) -> 82 | unlink(P), 83 | port_close(P). 84 | %%==================================================================== 85 | %% Internal functions 86 | %%==================================================================== 87 | 88 | load_driver() -> 89 | Dir = filename:join([filename:dirname(code:which(cherly)), "..", "priv"]), 90 | erl_ddll:load(Dir, "cherly_drv"). 91 | 92 | % thanks erlang for fucking with the binaries passed into outputv 93 | unpack(Bin, SkipSize) -> 94 | % ?debugFmt("bin ~p", [Bin]), 95 | [PreFirst|BinList] = normalize_tarded_binlist(Bin), 96 | <<_:SkipSize/binary, First/binary>> = PreFirst, %we need to do the skip here because outputv modifies the iovec 97 | <> = First, 98 | if 99 | ValLen > 0 -> 100 | SizeLen = ValLen * 4, 101 | <> = RestFirst, 102 | Sizes = [ Size || <> <= SizesBin ], 103 | {ok, unpack(Sizes, [LeftOver|BinList], [])}; 104 | byte_size(RestFirst) == 0 -> 105 | [B] = BinList, 106 | {ok, B}; 107 | true -> 108 | {ok, RestFirst} 109 | end. 110 | 111 | % unpack([], _, [Acc]) -> Acc; 112 | 113 | unpack([], _, Acc) -> lists:reverse(Acc); 114 | 115 | unpack(Sizes, [Bin|BinList], Acc) when byte_size(Bin) == 0 -> %discard your empties 116 | unpack(Sizes, BinList, Acc); 117 | 118 | unpack([Size|Sizes], [Bin|BinList], Acc) -> 119 | if 120 | Size < byte_size(Bin) -> 121 | <> = Bin, 122 | unpack(Sizes, [Rest|BinList], [Ext|Acc]); 123 | true -> 124 | unpack(Sizes, BinList, [Bin|Acc]) 125 | end. 126 | 127 | normalize_tarded_binlist(List) -> 128 | normalize_tarded_binlist(List, []). 129 | 130 | normalize_tarded_binlist(Bin, Acc) when not is_list(Bin) -> lists:reverse([Bin|Acc]); 131 | 132 | normalize_tarded_binlist([Bin|Rest], Acc) -> 133 | normalize_tarded_binlist(Rest, [Bin|Acc]). -------------------------------------------------------------------------------- /erl/cherly_app.erl: -------------------------------------------------------------------------------- 1 | %%%------------------------------------------------------------------- 2 | %%% File: cherly_app.erl 3 | %%% @author Cliff Moon [] 4 | %%% @copyright 2009 Cliff Moon 5 | %%% @doc 6 | %%% 7 | %%% @end 8 | %%% 9 | %%% @since 2009-03-11 by Cliff Moon 10 | %%%------------------------------------------------------------------- 11 | -module(cherly_app). 12 | -author('cliff@powerset.com'). 13 | 14 | -behaviour(application). 15 | 16 | %% Application callbacks 17 | -export([start/2, stop/1]). 18 | 19 | %%==================================================================== 20 | %% Application callbacks 21 | %%==================================================================== 22 | %%-------------------------------------------------------------------- 23 | %% @spec start(Type, StartArgs) -> {ok, Pid} | 24 | %% {ok, Pid, State} | 25 | %% {error, Reason} 26 | %% @doc This function is called whenever an application 27 | %% is started using application:start/1,2, and should start the processes 28 | %% of the application. If the application is structured according to the 29 | %% OTP design principles as a supervision tree, this means starting the 30 | %% top supervisor of the tree. 31 | %% @end 32 | %%-------------------------------------------------------------------- 33 | start(_Type, []) -> 34 | {ok, cherly:start(128000)}. 35 | 36 | %%-------------------------------------------------------------------- 37 | %% @spec stop(State) -> void() 38 | %% @doc This function is called whenever an application 39 | %% has stopped. It is intended to be the opposite of Module:start/2 and 40 | %% should do any necessary cleaning up. The return value is ignored. 41 | %% @end 42 | %%-------------------------------------------------------------------- 43 | stop({_, C}) -> 44 | exit(C, shutdown), 45 | ok. 46 | -------------------------------------------------------------------------------- /etest/test_cherly.erl: -------------------------------------------------------------------------------- 1 | -include_lib("eunit/include/eunit.hrl"). 2 | 3 | -export([succ/1, fast_acc/3, time_to_epoch_float/1]). 4 | 5 | simple_test() -> 6 | {ok, C} = cherly:start(120), 7 | Value = <<"value">>, 8 | cherly:put(C, "key", Value), 9 | ?assertEqual({ok, Value}, cherly:get(C, "key")), 10 | ?assertEqual(20, cherly:size(C)), 11 | cherly:stop(C). 12 | 13 | put_get_and_remove_test() -> 14 | {ok, C} = cherly:start(120), 15 | Value = <<"value">>, 16 | ?assertEqual(not_found, cherly:get(C, "key")), 17 | cherly:put(C, "key", Value), 18 | ?assertEqual({ok, Value}, cherly:get(C, "key")), 19 | cherly:remove(C, "key"), 20 | ?assertEqual(not_found, cherly:get(C, "key")), 21 | ?assertEqual(0, cherly:size(C)), 22 | cherly:stop(C). 23 | 24 | put_with_lru_eject_test() -> 25 | {ok, C} = cherly:start(120), 26 | Value = <<"value">>, 27 | lists:foldl(fun(_, Str) -> 28 | Mod = succ(Str), 29 | cherly:put(C, Mod, Value), 30 | Mod 31 | end, "aaa", lists:seq(1, 10)), 32 | ?assertEqual(120, cherly:size(C)), 33 | ?assertEqual(6, cherly:items(C)), 34 | cherly:stop(C). 35 | 36 | what_goes_in_must_come_out_test() -> 37 | {ok, C} = cherly:start(120), 38 | cherly:put(C, "key", [<<"val1">>, <<"val2">>]), 39 | ?assertEqual({ok, [<<"val1">>, <<"val2">>]}, cherly:get(C, "key")), 40 | cherly:stop(C). 41 | 42 | big_stuff_that_goes_in_must_come_out_test() -> 43 | {ok, C} = cherly:start(1048576), 44 | V1 = <<0:524288>>, 45 | V2 = <<1:524288>>, 46 | cherly:put(C, "key", [V1, V2]), 47 | Ret = cherly:get(C, "key"), 48 | ?assertEqual({ok, [V1,V2]}, Ret), 49 | cherly:stop(C). 50 | 51 | put_one_thing_in_no_list_big_test() -> 52 | {ok, C} = cherly:start(1048576), 53 | V = <<0:524288>>, 54 | cherly:put(C, "key", V), 55 | ?assertEqual({ok, V}, cherly:get(C, "key")), 56 | cherly:stop(C). 57 | 58 | put_one_thing_in_no_list_small_test() -> 59 | {ok, C} = cherly:start(1048576), 60 | V = <<1:8>>, 61 | cherly:put(C, "key", V), 62 | ?assertEqual({ok, V}, cherly:get(C, "key")), 63 | cherly:stop(C). 64 | 65 | remove_nonexistant_test() -> 66 | {ok, C} = cherly:start(120), 67 | cherly:remove(C, "key"), 68 | ?assertEqual(not_found, cherly:get(C, "key")), 69 | cherly:stop(C). 70 | 71 | double_get_test() -> 72 | % outputv modifies the iovec with a skipsize. That's fucking rad 73 | {ok, C} = cherly:start(1123123), 74 | Val =[<<131,108,0,0,0,1,104,2,107,0,9,60,48,46,52,55,50,46,48, 75 | 62,99,49,46,50,51,54,53,51,49,53,54,49,57,53,57,56,55, 76 | 50,57,54,49,48,52,101,43,48,57,0,0,0,0,0,106>>, 77 | <<235,105,34,223,191,105,56,25,199,24,148,52,180,112, 78 | 198,246,56,150,15,175,56,34,38,120,99,41,59,53,204, 79 | 233,41,246,189,135,39,171,124,233,143,40,108,119,63, 80 | 130,237,8,121,35,97,121,172,20,149,241,129,191,2,211, 81 | 151,167,0,102,103,63,242,240,41,83,150,211,189,32,56, 82 | 65,217,241,234,237,58,216,34,245,253,153,140,190,186, 83 | 24,147,240,181,63,222,161,13,217,55,232,254,148>>], 84 | cherly:put(C, "aczup", Val), 85 | ?assertEqual({ok, Val}, cherly:get(C, "aczup")), 86 | ?assertEqual({ok, Val}, cherly:get(C, "aczup")). 87 | 88 | succ([]) -> 89 | []; 90 | 91 | succ(Str) -> 92 | succ_int(lists:reverse(Str), []). 93 | 94 | succ_int([Char|Str], Acc) -> 95 | if 96 | Char >= $z -> succ_int(Str, [$a|Acc]); 97 | true -> lists:reverse(lists:reverse([Char+1|Acc]) ++ Str) 98 | end. 99 | 100 | fast_acc(_, Acc, 0) -> Acc; 101 | 102 | fast_acc(Fun, Acc, N) -> 103 | fast_acc(Fun, Fun(Acc), N-1). 104 | 105 | time_to_epoch_float({Mega,Sec,Micro}) -> 106 | Mega * 1000000 + Sec + Micro / 1000000. -------------------------------------------------------------------------------- /releases/cherly.rel: -------------------------------------------------------------------------------- 1 | {release, 2 | {"cherly_rel", "?VERSION"}, 3 | {erts, "5.6.3"}, 4 | [ 5 | {kernel, "2.12.3"}, 6 | {crypto, "1.5.2"}, 7 | {stdlib, "1.15.3"}, 8 | {sasl, "2.1.5.3"}, 9 | {cherly, "?VERSION"} 10 | ] 11 | }. --------------------------------------------------------------------------------