Changeset 2431 for neercs


Ignore:
Timestamp:
Jun 15, 2008, 8:01:08 PM (12 years ago)
Author:
Pascal Terjan
Message:
  • Don't break build on platforms where grab is not supported
Location:
neercs/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • neercs/trunk/configure.ac

    r2143 r2431  
    3737AC_SUBST(UTIL_LIBS)
    3838
     39case $target_cpu in
     40  i?86)
     41    case $target_os in
     42      linux*) grab=yes;;
     43      *) grab=no;;
     44    esac;;
     45  *)    grab=no;;
     46esac
     47
     48AM_CONDITIONAL(USE_GRAB, test "$grab" = "yes")
     49if test "$grab" = "yes"; then
     50  AC_DEFINE(USE_GRAB, 1, [Grabbing processes is supported])
     51fi
     52
    3953# Optimizations
    4054CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer"
  • neercs/trunk/src/Makefile.am

    r2426 r2431  
    22bin_PROGRAMS = neercs
    33
    4 neercs_SOURCES = neercs.h grab.c main.c screens.c term.c effects.c wm.c
     4
     5if USE_GRAB
     6grab_c=grab.c
     7endif
     8
     9neercs_SOURCES = neercs.h $(grab_c) main.c screens.c term.c effects.c wm.c
    510neercs_CFLAGS = @CACA_CFLAGS@
    611neercs_LDADD = @CACA_LIBS@ @UTIL_LIBS@
  • neercs/trunk/src/main.c

    r2426 r2431  
    9999            if(!strcmp(argv[i + 1], "-P"))
    100100            {
     101#ifdef USE_GRAB
    101102                if(i + 2 > argc)
    102103                {
     
    106107                tmp = create_screen_grab(w, h, atoi(argv[i + 2]));
    107108                i++;
     109#else
     110                fprintf(stderr, "Grabbing process is not supported, sorry\n");
     111                exit(1);
     112#endif
    108113            }
    109114            else
  • neercs/trunk/src/neercs.h

    r2429 r2431  
    1616#include <stdint.h>
    1717#include <caca.h>
    18 
    1918
    2019#define CURRENTSCREEN screen_list->screen[screen_list->pty]
     
    7675
    7776int create_pty(char *cmd, unsigned int w, unsigned int h, int *cpid);
     77#ifdef USE_GRAB
    7878int create_pty_grab(pid_t pid, unsigned int w, unsigned int h);
    7979int grab_process(pid_t pid, char *ptyname, int ptyfd);
     80#endif
    8081
    8182long int import_term(struct screen_list *screen_list, struct screen *sc, void const *data, unsigned int size);
     
    8990/* Screens management */
    9091struct screen* create_screen(int w, int h, char *command);
     92#ifdef USE_GRAB
    9193struct screen* create_screen_grab(int w, int h, int pid);
     94#endif
    9295int destroy_screen(struct screen *s);
    9396int add_screen(struct screen_list *list, struct screen *s);
  • neercs/trunk/src/screens.c

    r2426 r2431  
    2929#include "neercs.h"
    3030
     31#ifdef USE_GRAB
    3132struct screen* create_screen_grab(int w, int h, int pid)
    3233{
     
    5657    return s;
    5758}
     59#endif
    5860
    5961struct screen* create_screen(int w, int h, char *command)
  • neercs/trunk/src/term.c

    r2429 r2431  
    578578}
    579579
     580#ifdef USE_GRAB
    580581int create_pty_grab(pid_t pid, unsigned int w, unsigned int h)
    581582{
     
    596597    return fdm;
    597598}
     599#endif
    598600
    599601int set_tty_size(int fd, unsigned int w, unsigned int h)
Note: See TracChangeset for help on using the changeset viewer.