#
# FreeTDS stuff...
#
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/tds.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/tds.h),)
- ifeq ($(shell grep -s TDS_VERSION_NO $(CROSS_COMPILE_TARGET)/usr/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/local/include/tdsver.h | grep -c 0.63),1)
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/tds.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/tds.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/include/freetds/tds.h),)
+ ifeq ($(shell grep -s TDS_VERSION_NO $(CROSS_COMPILE_TARGET)/usr/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/local/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/include/freetds/tdsver.h | grep -c 0.63),1)
CFLAGS += -DFREETDS_0_63
else
- ifeq ($(shell grep -s TDS_VERSION_NO $(CROSS_COMPILE_TARGET)/usr/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/local/include/tdsver.h | grep -c 0.62),1)
+ ifeq ($(shell grep -s TDS_VERSION_NO $(CROSS_COMPILE_TARGET)/usr/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/local/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/include/freetds/tdsver.h | grep -c 0.62),1)
CFLAGS += -DFREETDS_0_62
else
CFLAGS += -DFREETDS_PRE_0_62
store_config(cfg, ctg);
} while ( (ctg = ast_category_browse(cfg, ctg)) != NULL);
ast_config_destroy(cfg);
+ } else {
+ ast_log(LOG_NOTICE, "Unable to load config oss.conf\n");
+ return -1;
}
if (find_desc(oss_active) == NULL) {
ast_log(LOG_NOTICE, "Device %s not found\n", oss_active);
cfg = ast_config_load("logger.conf");
- /* If no config file, we're fine */
- if (!cfg)
+ /* If no config file, we're fine, set default options. */
+ if (!cfg) {
+ fprintf(stderr, "Unable to open logger.conf: %s\n", strerror(errno));
+ chan = malloc(sizeof(struct logchannel));
+ memset(chan, 0, sizeof(struct logchannel));
+ chan->type = LOGTYPE_CONSOLE;
+ chan->logmask = 28; /*warning,notice,error */
+ chan->next = logchannels;
+ logchannels = chan;
+ global_logmask |= chan->logmask;
return;
+ }
ast_mutex_lock(&loglock);
if ((s = ast_variable_retrieve(cfg, "general", "appendhostname"))) {