Skip to content

Commit

Permalink
Additional changes for linux compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jonespm committed Jan 28, 2014
1 parent a792033 commit a6f80b3
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 5 deletions.
7 changes: 7 additions & 0 deletions libhtmlw/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# ----------------------------------------------------------------------------
# For normal machines with normal compilers:
ifeq ($(DEV_ARCH), "linux")
CC = cc
endif

ifeq ($(DEV_ARCH), "osx")
CC = cc -mmacosx-version-min=10.5 -arch i386
endif

# For Sun's and other non-at-least-pseudo-ANSI-C platforms:
# CC = gcc
# ----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions libwww/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# ----------------------------------------------------------------------------
# For normal machines with normal compilers:
ifeq ($(DEV_ARCH), "linux")
CC = cc
endif

ifeq ($(DEV_ARCH), "osx")
CC = cc -mmacosx-version-min=10.5 -arch i386
endif

# For Sun's and other non-at-least-pseudo-ANSI-C platforms:
# CC = gcc
# ----------------------------------------------------------------------------
Expand Down
22 changes: 20 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Makefile for NCSA Mosaic for the X Window System.
# Copyright 1993 National Center for Supercomputing Applications
#


# ----------------------------------------------------------------------------
# For normal machines with normal compilers:
Expand All @@ -11,7 +13,16 @@
# For HP-UX 8.00:
# CC = cc -Aa -D_HPUX_SOURCE -I/usr/include/Motif1.1 -I/usr/include/X11R4
# For NeXT:
CC = cc -DNEXT -I/usr/include/X11 -I/opt/X11/include -I/usr/OpenMotif/include -mmacosx-version-min=10.5 -arch i386

# For normal machines with normal compilers:
ifeq ($(DEV_ARCH), linux)
CC = cc -I/usr/include/X11 -I/usr/include -Dlinux
endif

ifeq ($(DEV_ARCH), osx)
CC = cc -DNEXT -I/usr/include/X11 -I/opt/X11/include -I/usr/OpenMotif/include -mmacosx-version-min=10.5 -arch i386 -Dosx
endif

# For Dell SVR4:
# CC = cc -DSVR4
# ----------------------------------------------------------------------------
Expand All @@ -29,7 +40,14 @@ AUX_CFLAGS =
# For HP-UX 8.00:
# X_LIBS = -L/usr/lib/Motif1.1 -lXm -L/usr/lib/X11R4 -lXmu -lXt -lX11
# For NeXT:
X_LIBS = -L/usr/OpenMotif/lib -L/usr/X11/lib -L/opt/X11/lib -lXm -lXmu -lXt -lX11
ifeq ($(DEV_ARCH), linux)
X_LIBS = -lXm -lXmu -lXt -lX11 -L/usr/lib -L/lib -L/usr/lib/x86_64-linux-gnu
endif

ifeq ($(DEV_ARCH), osx)
X_LIBS = -L/usr/OpenMotif/lib -L/usr/X11/lib -L/opt/X11/lib -lXm -lXmu -lXt -lX11
endif

# For nearly everyone else:
# X_LIBS = -lXm -lXmu -lXt -lX11
# For Sun's (at least running X/Motif as installed on our machines):
Expand Down
15 changes: 12 additions & 3 deletions src/picread.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,9 +748,14 @@ XColor *colrs;
FILE *fp;

/* Force all images to be GIF - at least they work */
sprintf(syscmd, "rm /tmp/lastconvert; mv %s /tmp/lastconvert; sips -s format gif /tmp/lastconvert --out %s",datafile, datafile);
#ifdef osx
sprintf(syscmd, "rm /tmp/lastconvert && mv %s /tmp/lastconvert && sips -s format gif /tmp/lastconvert --out %s",datafile, datafile);
#endif
#ifdef linux
sprintf(syscmd, "rm /tmp/lastconvert && mv %s /tmp/lastconvert && /usr/bin/convert /tmp/lastconvert %s.gif && mv %s.gif %s",datafile, datafile, datafile, datafile);
#endif
fprintf(stderr,"%s\n",syscmd);
system(syscmd);
int i = system(syscmd);

/* Obviously this isn't going to work. */
fp = fopen(datafile, "r");
Expand Down Expand Up @@ -779,7 +784,11 @@ XColor *colrs;
return(bit_data);
}
}
else {
fprintf(stderr,"Could not read file");
}


if (fp != stdin) fclose(fp);
return((unsigned char *)NULL);
}

0 comments on commit a6f80b3

Please sign in to comment.