SRC_DIR = $(top_srcdir)/src
AM_CPPFLAGS = -I$(TCL_PREFIX)/include -I$(SRC_DIR) -I$(GD_LIB_DIR)
-LIBDIRS = -L$(libdir) -L$(SRC_DIR) -L../src/.libs
+LIBDIRS = -L$(libdir) -L$(SRC_DIR) -L../../src/.libs
LIB_RUNTIME_DIR = $(libdir)
if BUILD_TCL
tclrrd$(TCL_SHLIB_SUFFIX): tclrrd.o
- $(TCL_SHLIB_LD) $(LIBDIRS) $< -o $@ -lrrd_private -lm
+ $(TCL_SHLIB_LD) $(LIBDIRS) $< -o $@ -lrrd
tclrrd.o: tclrrd.c
- $(CC) $(CFLAGS) $(TCL_SHLIB_CFLAGS) $(INCLUDES) -c $< -DVERSION=\"$(VERSION)\"
+ $(CC) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $(TCL_SHLIB_CFLAGS) $(INCLUDES) -c $< -DVERSION=\"$(VERSION)\"
all-local: tclrrd$(TCL_SHLIB_SUFFIX)
/*
* some rrd_XXX() functions might modify the argv strings passed to it.
- * Furthermore, they use getopt() without initializing getopt's optind
- * variable themselves. Hence, we need to do some preparation before
+ * Hence, we need to do some preparation before
* calling the rrd library functions.
*/
static char ** getopt_init(argc, argv)
char **argv2;
int i;
- optind = 0;
-
argv2 = calloc(argc, sizeof(char *));
for (i = 0; i < argc; i++) {
argv2[i] = strdup(argv[i]);