Changeset 630

Show
Ignore:
Timestamp:
08/27/2005 02:43:45 PM (3 years ago)
Author:
jan
Message:

added -m to set the location of the modules

Location:
branches/lighttpd-merge-1.4.x/src
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branches/lighttpd-merge-1.4.x/src/base.h

    r541 r630  
    437437        buffer *event_handler; 
    438438         
     439        buffer *modules_dir; 
    439440        array *modules; 
    440441         
  • branches/lighttpd-merge-1.4.x/src/plugin.c

    r532 r630  
    113113                buffer_reset(srv->tmp_buf); 
    114114                /* for make distcheck */ 
    115                 if (NULL != (inst = strstr(LIBRARY_DIR, "/_inst/lib"))) { 
    116                         buffer_copy_string_len(srv->tmp_buf, LIBRARY_DIR, strlen(LIBRARY_DIR) - strlen(inst)); 
     115                if (NULL != (inst = strstr(srv->srvconf.modules_dir->ptr, "/_inst/lib"))) { 
     116                        buffer_copy_string_len(srv->tmp_buf, srv->srvconf.modules_dir->ptr, 
     117                                strlen(srv->srvconf.modules_dir->ptr) - strlen(inst)); 
    117118                        buffer_append_string(srv->tmp_buf, "/_build/src/.libs"); 
    118119                        buffer_append_string(srv->tmp_buf, inst + strlen("/_inst/lib") ); 
    119120                } else { 
    120                         buffer_copy_string(srv->tmp_buf, LIBRARY_DIR); 
     121                        buffer_copy_string_buffer(srv->tmp_buf, srv->srvconf.modules_dir); 
    121122                } 
    122123                buffer_append_string(srv->tmp_buf, "/"); 
  • branches/lighttpd-merge-1.4.x/src/server.c

    r629 r630  
    162162         
    163163        srv->srvconf.modules = array_init(); 
     164        srv->srvconf.modules_dir = buffer_init_string(LIBRARY_DIR); 
    164165         
    165166        /* use syslog */ 
     
    198199        CLEAN(srvconf.event_handler); 
    199200        CLEAN(srvconf.pid_file); 
     201        CLEAN(srvconf.modules_dir); 
    200202         
    201203        CLEAN(tmp_chunk_len); 
     
    275277"usage:\n" \ 
    276278" -f <name>  filename of the config-file\n" \ 
     279" -m <name>  module directory (default: "LIBRARY_DIR")\n" \ 
    277280" -p         print the parsed config-file in internal form, and exit\n" \ 
    278281" -t         test the config-file, and exit\n" \ 
     
    331334        srv->srvconf.dont_daemonize = 0; 
    332335         
    333         while(-1 != (o = getopt(argc, argv, "f:hvDpt"))) { 
     336        while(-1 != (o = getopt(argc, argv, "f:m:hvDpt"))) { 
    334337                switch(o) { 
    335338                case 'f':  
     
    338341                                return -1; 
    339342                        } 
     343                        break; 
     344                case 'm': 
     345                        buffer_copy_string(srv->srvconf.modules_dir, optarg); 
    340346                        break; 
    341347                case 'p': print_config = 1; break;