Changeset 4484

Show
Ignore:
Timestamp:
07/06/06 06:36:22 (2 years ago)
Author:
erijo
Message:

This makes Licq look for plugins in $libdir/licq and shared data in
$datadir/licq. Both libdir and datadir can be passed as arguments to
configure. Replaces the old behavior where plugins were installed to
$prefix/lib/licq and shared data to $prefix/share/licq. Plugins will have to
be updated to use $libdir/licq. Will commit qt-gui and msn updates shortly.

Please test this with your setup! (don't forget make -f Makefile.cvs)

Closes #622.

Location:
trunk/licq
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/licq/configure.in

    r4302 r4484  
    1616AC_DEFINE_UNQUOTED(INT_VERSION,$INT_VERSION, [Licq version number as int]) 
    1717AC_DEFINE_UNQUOTED(USE_FIFO, 1, [Undefine if it causes problems])  
     18 
     19 
     20dnl Expand prefix and exec_prefix 
     21test "x${prefix}" = "xNONE" && prefix="${ac_default_prefix}" 
     22test "x${exec_prefix}" = "xNONE" && exec_prefix='${prefix}' 
     23 
     24dnl (May) need to expand libdir and datadir more than once: 
     25dnl $libdir => $exec_prefix/lib => $prefix/lib => /some/path/lib 
     26install_libdir=$(eval "echo \"$(eval "echo \"${libdir}\"")\"") 
     27AC_DEFINE_UNQUOTED(INSTALL_LIBDIR, "${install_libdir}/licq/", [Directory where plugins go]) 
     28 
     29dnl $datadir => $datarootdir => $prefix/share => /some/path/share 
     30install_datadir=$(eval "echo \"$(eval "echo \"${datadir}\"")\"") 
     31AC_DEFINE_UNQUOTED(INSTALL_SHAREDIR, "${install_datadir}/licq/", [Directory where shared data go]) 
     32 
    1833 
    1934AC_ARG_ENABLE( 
  • trunk/licq/include/licq_constants.h

    r4328 r4484  
    55// Directory constants 
    66const char DEFAULT_HOME_DIR[]                      = ".licq"; 
    7 const char BASE_SHARE_DIR[]                        = "share/licq/"; 
    8 const char BASE_LIB_DIR[]                          = "lib/licq/"; 
    97const char USER_DIR[]                              = "users"; 
    108const char HISTORY_DIR[]                           = "history"; 
  • trunk/licq/src/licq.cpp

    r4381 r4484  
    298298 
    299299  // Define the directory for all the shared data 
    300   sprintf(SHARE_DIR, "%s/%s", INSTALL_PREFIX, BASE_SHARE_DIR); 
    301   sprintf(LIB_DIR, "%s/%s", INSTALL_PREFIX, BASE_LIB_DIR); 
     300  strncpy(SHARE_DIR, INSTALL_SHAREDIR, MAX_FILENAME_LEN); 
     301  SHARE_DIR[MAX_FILENAME_LEN - 1] = '\0'; 
     302 
     303  strncpy(LIB_DIR, INSTALL_LIBDIR, MAX_FILENAME_LEN); 
     304  LIB_DIR[MAX_FILENAME_LEN - 1] = '\0'; 
     305 
    302306 
    303307  // Check pid 
  • trunk/licq/src/Makefile.am

    r3884 r4484  
    1 AM_CPPFLAGS = -Wall -I$(top_srcdir)/include -DINSTALL_PREFIX=\"@prefix@\" @SOCKS_INCDIR@ 
     1AM_CPPFLAGS = -Wall -I$(top_srcdir)/include @SOCKS_INCDIR@ 
    22 
    33datadir = @datadir@ 
     
    1919     icqd-chat.cpp sighandler.c icqd-filetransfer.cpp \ 
    2020     hebrev.c icqcolor.cpp fifo.cpp  protoplugind.cpp gpg.cpp \ 
    21         occupationcodes.c homepagecodes.c interestcodes.c \ 
    22         organizationcodes.c backgroundcodes.c providers.c rtf.cc 
     21    occupationcodes.c homepagecodes.c interestcodes.c \ 
     22    organizationcodes.c backgroundcodes.c providers.c rtf.cc 
    2323 
    2424licq_LDADD = @SOCKS_LIBS@