Changeset 554


Ignore:
Timestamp:
Mar 8, 2006, 9:03:24 PM (15 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Added very preliminary network driver
Location:
libcaca/trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/Makefile.am

    r539 r554  
    1818        driver_win32.c \
    1919        driver_x11.c \
     20        driver_network.c \
    2021        $(NULL)
    2122libcaca_la_CPPFLAGS = -I$(top_srcdir)/cucul
  • libcaca/trunk/caca/caca.c

    r553 r554  
    147147        else
    148148#endif
     149#if defined(USE_NETWORK)
     150        if(!strcasecmp(var, "network"))
     151            network_init_driver(kk);
     152        else
     153#endif
    149154            return -1;
    150155
     
    187192    return 0;
    188193#endif
     194#if defined(USE_NETWORK)
     195    network_init_driver(kk);
     196    return 0;
     197#endif
    189198
    190199    return -1;
  • libcaca/trunk/caca/caca_internals.h

    r553 r554  
    5555    CACA_DRIVER_GL = 6,
    5656#endif
     57#if defined(USE_NETWORK)
     58    CACA_DRIVER_NETWORK = 7,
     59#endif
    5760    CACA_DRIVER_NONE = 0
    5861};
     
    7780void x11_init_driver(caca_t *);
    7881#endif
    79 
     82#if defined(USE_NETWORK)
     83void network_init_driver(caca_t *);
     84#endif
    8085/* Timer structure */
    8186struct caca_timer
  • libcaca/trunk/configure.ac

    r545 r554  
    3737AC_ARG_ENABLE(gl,
    3838  [  --enable-gl             OpenGL support (autodetected)])
     39AC_ARG_ENABLE(network,
     40  [  --enable-network        Network support (autodetected)])
    3941
    4042dnl example programs features
     
    138140fi
    139141
     142if test "${enable_network}" != "no"; then
     143  ac_cv_my_have_network="no"
     144  AC_CHECK_HEADERS(sys/socket.h,
     145     [ac_cv_my_have_network="yes"
     146      AC_DEFINE(USE_NETWORK, 1, Define to activate the network backend driver)
     147      CACA_DRIVERS="${CACA_DRIVERS} network"])
     148  if test "${ac_cv_my_have_network}" = "no" -a "${enable_network}" = "yes"; then
     149    AC_MSG_ERROR([cannot find standard networking socket files])
     150  fi
     151fi
     152
    140153if test "${enable_ncurses}" != "no"; then
    141154  ac_cv_my_have_ncurses="no"
Note: See TracChangeset for help on using the changeset viewer.